Advanced Settings Panel
[pierogi] / pirselectkeysetform.h
index 2d88ac8..28961e3 100644 (file)
@@ -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