SpeedCrunch
0.11
|
00001 // This file is part of the SpeedCrunch project 00002 // Copyright (C) 2007 Ariya Hidayat <ariya@kde.org> 00003 // Copyright (C) 2008, 2009, 2010, 2011 Helder Correia <helder.pereira.correia@gmail.com> 00004 // 00005 // This program is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU General Public License 00007 // as published by the Free Software Foundation; either version 2 00008 // of the License, or (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; see the file COPYING. If not, write to 00017 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 // Boston, MA 02110-1301, USA. 00019 00020 #ifndef GUI_CONSTANTSWIDGET_H 00021 #define GUI_CONSTANTSWIDGET_H 00022 00023 #include <QWidget> 00024 00025 class QComboBox; 00026 class QLabel; 00027 class QLineEdit; 00028 class QTreeWidget; 00029 class QTreeWidgetItem; 00030 00031 class ConstantsWidget : public QWidget 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 explicit ConstantsWidget(QWidget *parent = 0); 00037 ~ConstantsWidget(); 00038 00039 signals: 00040 void constantSelected(const QString &); 00041 00042 public slots: 00043 void handleRadixCharacterChange(); 00044 00045 protected slots: 00046 void filter(); 00047 void handleItem(QTreeWidgetItem *); 00048 void retranslateText(); 00049 void triggerFilter(); 00050 void updateList(); 00051 00052 protected: 00053 virtual void changeEvent(QEvent *); 00054 00055 private: 00056 Q_DISABLE_COPY(ConstantsWidget) 00057 00058 QComboBox *m_category; 00059 QLabel *m_categoryLabel; 00060 QLineEdit *m_filter; 00061 QTimer *m_filterTimer; 00062 QLabel *m_label; 00063 QTreeWidget *m_list; 00064 QLabel *m_noMatchLabel; 00065 }; 00066 00067 #endif 00068