ctkMenuButton.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 #ifndef __ctkMenuButton_h
00022 #define __ctkMenuButton_h
00023 
00024 // Qt includes
00025 #include <QPushButton>
00026 
00027 // CTK includes
00028 #include <ctkPimpl.h>
00029 
00030 #include "CTKWidgetsExport.h"
00031 
00032 class ctkMenuButtonPrivate;
00033 
00036 class CTK_WIDGETS_EXPORT ctkMenuButton : public QPushButton
00037 {
00038   Q_OBJECT
00039 
00040 public:
00041   ctkMenuButton(QWidget *parent = 0);
00042   ctkMenuButton(const QString& text, QWidget *parent = 0);
00043   virtual ~ctkMenuButton();
00044 
00045   virtual QSize minimumSizeHint()const;
00046   virtual QSize sizeHint()const;
00047 
00048 protected:
00049   virtual void paintEvent(QPaintEvent*);
00050   virtual void mousePressEvent(QMouseEvent* event);
00051 
00052   virtual bool hitButton(const QPoint & pos) const;
00053   virtual void initStyleOption ( QStyleOptionButton * option ) const;
00054 private:
00055   CTK_DECLARE_PRIVATE(ctkMenuButton);
00056 };
00057 
00058 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1