X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=pirselectkeysetform.h;h=28961e31b944f34afde901bdadc95687d5e60765;hb=HEAD;hp=2d88ac88c8ea8450f2e6b26d2ee7e73fd03cb8f3;hpb=d724312c55dabe2c72175e88abf694880312fac4;p=pierogi diff --git a/pirselectkeysetform.h b/pirselectkeysetform.h index 2d88ac8..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,13 +23,19 @@ class PIRSelectKeysetForm : public QWidget Q_OBJECT public: - explicit PIRSelectKeysetForm(QWidget *parent = 0); +// explicit PIRSelectKeysetForm(QWidget *parent = 0); + + PIRSelectKeysetForm( + MainWindow *mw); + ~PIRSelectKeysetForm(); +/* void addNameToList( QString name, unsigned int index, PIRMakeName make); +*/ void addWidgetItem( PIRKeysetWidgetItem *kwi); @@ -32,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