ctkTreeComboBox.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 __ctkTreeComboBox_h
00022 #define __ctkTreeComboBox_h
00023 
00024 // Qt includes
00025 #include <QComboBox>
00026 
00027 // CTK includes
00028 #include <ctkPimpl.h>
00029 
00030 #include "CTKWidgetsExport.h"
00031 
00045 //
00046 class ctkTreeComboBoxPrivate;
00047 
00048 class CTK_WIDGETS_EXPORT ctkTreeComboBox : public QComboBox
00049 {
00050   Q_OBJECT
00051 public:
00052   typedef QComboBox Superclass;
00053   explicit ctkTreeComboBox(QWidget* parent = 0);
00054   virtual ~ctkTreeComboBox(){}
00055 
00056   virtual bool eventFilter(QObject* object, QEvent* event);
00057   virtual void showPopup();
00058   virtual void hidePopup();
00059 
00060 protected:
00061   virtual void paintEvent(QPaintEvent*);
00062   
00063 protected slots:
00064   void onExpanded(const QModelIndex&);
00065   void onCollapsed(const QModelIndex&);
00066   
00067 private:
00068   CTK_DECLARE_PRIVATE(ctkTreeComboBox);
00069 };
00070 
00071 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines