00001 #ifndef SEARCH_H_ 00002 #define SEARCH_H_ 00003 00004 #include <qregexp.h> 00005 #include <mythtv/mythdialogs.h> 00006 #include <mythtv/mythwidgets.h> 00007 00008 class SearchListBoxItem: public QListBoxText 00009 { 00010 public: 00011 SearchListBoxItem(const QString &text, unsigned int id) 00012 : QListBoxText(text), id(id) {}; 00013 00014 unsigned int getId() { return id; } 00015 00016 private: 00017 virtual void paint(QPainter *p); 00018 unsigned int id; 00019 }; 00020 00021 class SearchDialog: public MythPopupBox 00022 { 00023 Q_OBJECT 00024 00025 public: 00026 00027 SearchDialog(MythMainWindow *parent, const char *name = 0); 00028 ~SearchDialog(); 00029 00030 void getWhereClause(QString &whereClause); 00031 00032 protected slots: 00033 00034 void searchTextChanged(const QString &searchText); 00035 void itemSelected(int i); 00036 00037 private: 00038 00039 void runQuery(QString searchText); 00040 00041 QLabel *caption; 00042 MythListBox *listbox; 00043 MythLineEdit *searchText; 00044 QButton *cancelButton; 00045 QButton *okButton; 00046 00047 QString whereClause; 00048 }; 00049 00050 #endif
1.5.5