From 35774a402027714ed6f93041aea1ebe5f5391205 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 1 Jul 2011 15:58:56 +0200 Subject: 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. --- mappingtablewidget.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mappingtablewidget.h') diff --git a/mappingtablewidget.h b/mappingtablewidget.h index 38c4fe1..02b37c3 100644 --- a/mappingtablewidget.h +++ b/mappingtablewidget.h @@ -10,6 +10,7 @@ #include #include +#include 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 -- cgit v1.2.3-70-g09d2