diff options
author | Arno <am@disconnect.de> | 2011-07-01 15:58:56 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-07-01 15:58:56 +0200 |
commit | 35774a402027714ed6f93041aea1ebe5f5391205 (patch) | |
tree | 72e90eca0f4bbb20fb9ff69ece1b7429714d0767 /mappingtablewidget.h | |
parent | a06a6425d0ebd982a4fa34502dbb20b06806af49 (diff) | |
download | SheMov-35774a402027714ed6f93041aea1ebe5f5391205.tar.gz SheMov-35774a402027714ed6f93041aea1ebe5f5391205.tar.bz2 SheMov-35774a402027714ed6f93041aea1ebe5f5391205.zip |
Added partial search for MappingTableModel
Added a search button to NewMovieWizard to do partial searches on
the according table. Selected items will be inserted into the
QLineEdit of the Wizard page.
Diffstat (limited to 'mappingtablewidget.h')
-rw-r--r-- | mappingtablewidget.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/mappingtablewidget.h b/mappingtablewidget.h index 38c4fe1..02b37c3 100644 --- a/mappingtablewidget.h +++ b/mappingtablewidget.h @@ -10,6 +10,7 @@ #include <QWidget> #include <QStringListModel> +#include <QDialog> class QTreeView; class QLineEdit; @@ -29,6 +30,7 @@ class MappingTableWidget : public QWidget{ void setCurrentId(int id) { mCurrentId = id; } private slots: + void searchItem(); void addItem(); void removeItem(); @@ -36,6 +38,7 @@ class MappingTableWidget : public QWidget{ QTreeView *mView; QPushButton *mAddItem; QPushButton *mRemoveItem; + QPushButton *mSearchItem; QLineEdit *mItemEdit; MappingTableItemModel *mModel; MappingTableModel *mMappingModel; @@ -62,4 +65,21 @@ class MappingTableItemModel : public QStringListModel { QIcon mDecorationIcon; }; +class MappingTableResultDialog : public QDialog { + Q_OBJECT + public: + explicit MappingTableResultDialog(const QStringList &results, QWidget *parent = 0, Qt::WindowFlags f = 0); + QString selectedText() const { return mSelectedText; } + + private slots: + void accept(); + + private: + QTreeView *mView; + QStringListModel *mModel; + QPushButton *mOk; + QPushButton *mCancel; + QString mSelectedText; +}; + #endif // MAPPINGTABLEWIDGET_H |