diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.h | 65 |
1 files changed, 65 insertions, 0 deletions
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 <QWidget> + +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 |
