From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- .../windows/bugreporthistorywindow.h | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h') diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h new file mode 100644 index 0000000..e582a48 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h @@ -0,0 +1,65 @@ +#ifndef BUGREPORTHISTORYWINDOW_H +#define BUGREPORTHISTORYWINDOW_H + +#include "mdichild.h" +#include + +namespace Ui { + class BugReportHistoryWindow; +} + +CFG_KEY_LIST(BugReportHistoryWindow, QObject::tr("Reports history window"), + CFG_KEY_ENTRY(DELETE_SELECTED, Qt::Key_Delete, QObject::tr("Delete selected entry")) +) + +class GUI_API_EXPORT BugReportHistoryWindow : public MdiChild +{ + Q_OBJECT + Q_ENUMS(Action) + + public: + enum Action + { + DELETE_SELECTED, + CLEAR_HISTORY + }; + + enum ToolBar + { + TOOLBAR + }; + + explicit BugReportHistoryWindow(QWidget *parent = 0); + ~BugReportHistoryWindow(); + + bool restoreSessionNextTime(); + bool isUncommited() const; + QString getQuitUncommitedConfirmMessage() const; + + protected: + QVariant saveSession(); + bool restoreSession(const QVariant &sessionValue); + Icon* getIconNameForMdiWindow(); + QString getTitleForMdiWindow(); + void createActions(); + void setupDefShortcuts(); + QToolBar* getToolBar(int toolbar) const; + + private: + enum UserRole + { + ENTRY_ID = Qt::UserRole + 1 + }; + + void init(); + + Ui::BugReportHistoryWindow *ui = nullptr; + + private slots: + void updateState(); + void reload(); + void clearHistory(); + void deleteSelected(); +}; + +#endif // BUGREPORTHISTORYWINDOW_H -- cgit v1.2.3