X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=pirselectkeysetform.h;h=28961e31b944f34afde901bdadc95687d5e60765;hb=HEAD;hp=45706aa6ad7d00cab824085ed2aa818bf00ac7c5;hpb=ba2bdf24764a4fdda9acf6526ca07c653e142ad4;p=pierogi diff --git a/pirselectkeysetform.h b/pirselectkeysetform.h index 45706aa..28961e3 100644 --- a/pirselectkeysetform.h +++ b/pirselectkeysetform.h @@ -7,7 +7,12 @@ #include "pirmakenames.h" class QListWidget; +class QListWidgetItem; +class QKeyEvent; +class QComboBox; class PIRKeysetWidgetItem; +class PIREditKeysetDialog; +class MainWindow; namespace Ui { class PIRSelectKeysetForm; @@ -18,7 +23,11 @@ class PIRSelectKeysetForm : public QWidget Q_OBJECT public: - explicit PIRSelectKeysetForm(QWidget *parent = 0); +// explicit PIRSelectKeysetForm(QWidget *parent = 0); + + PIRSelectKeysetForm( + MainWindow *mw); + ~PIRSelectKeysetForm(); /* @@ -34,21 +43,52 @@ public: // This is a bit of a hack, but not sure how to create a connection otherwise. QListWidget *getKeysetListWidget(); + bool selectNextKeyset(); + bool selectPrevKeyset(); + bool selectFirstKeyset(); + + QString getCurrentKeysetName(); + + QString getKeysetName( + unsigned int id); + + void openCurrentKeysetDialog(); + + void selectKeyset( + unsigned int targetID); + + void populateKeysetComboBox( + QComboBox *comboBox); + +protected: + void keyPressEvent( + QKeyEvent *event); + private slots: void filterListByMake( int make); -/* - void filterListByDeviceType( - int deviceType); -*/ + void filterListByString( + QString string); + + void openKeysetDialog( + QListWidgetItem *); + void on_searchStringLineEdit_textChanged(const QString &arg1); + void on_ssClosePushButton_clicked(); + void on_showFavoritesCheckBox_toggled(bool checked); + private: void refilterList(); Ui::PIRSelectKeysetForm *ui; + MainWindow *mainWindow; + PIREditKeysetDialog *editDialog; + + bool showOnlyFavorites; PIRMakeName currentMake; + QString searchString; }; #endif // PIRSELECTKEYSETFORM_H