#include "pirmakenames.h"
class QListWidget;
+class QListWidgetItem;
+class QKeyEvent;
+class QComboBox;
class PIRKeysetWidgetItem;
+class PIREditKeysetDialog;
+class MainWindow;
namespace Ui {
class PIRSelectKeysetForm;
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);
// 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