blob: e582a48e0a061e003bde8480c22303aa810923fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
|