From f48e27a63c59840979dd848893ffba3faefdfdde Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 4 Apr 2018 18:52:09 +0200 Subject: MoviePropertiesDialog: implement add actors and genres Only adds items to the view, doesn't do any changes to the database yet. Had to implement a custom InputDialog, because the standard InputDialog doesn't have a setter for the completer. --- sminputdialog.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 sminputdialog.h (limited to 'sminputdialog.h') diff --git a/sminputdialog.h b/sminputdialog.h new file mode 100644 index 0000000..5b80b9c --- /dev/null +++ b/sminputdialog.h @@ -0,0 +1,22 @@ +#ifndef SMINPUTDIALOG_H +#define SMINPUTDIALOG_H + +#include + +class QLineEdit; +class QCompleter; + +class SmInputDialog : public QDialog { + public: + explicit SmInputDialog(const QString &label, QWidget *parent = nullptr); + void setText(QString &text); + const QString text() const { return mLE->text(); } + void setCompleter(QCompleter *completer); + + private: + void setupDialog(); + QLineEdit *mLE; + QCompleter *mCompleter; +}; + +#endif // SMINPUTDIALOG_H -- cgit v1.2.3-70-g09d2