FreeDebks
1.0.3
Main Page
Related Pages
Classes
Files
File List
All
Classes
Files
Functions
Variables
Friends
Pages
src
gui
FdMainWindow.hpp
Go to the documentation of this file.
1
// --------------------------------------------------------------------
2
// Copyright © 2011-2013 Mathieu Schopfer
3
//
4
// This file is part of FreeDebks.
5
//
6
// FreeDebks is free software: you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation, either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// FreeDebks is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with FreeDebks. If not, see <http://www.gnu.org/licenses/>.
18
// --------------------------------------------------------------------
19
20
#ifndef FDMAINWINDOW_H
21
#define FDMAINWINDOW_H
22
23
#include "ui_FdMainWindow.h"
24
#include <QMessageBox>
25
#include <QDesktopServices>
26
#include <QWhatsThis>
27
#include "guiDefinitions.hpp"
28
36
#define mainWindow FdMainWindow::instance()
37
38
class
FdMainWindow
:
public
QMainWindow,
private
Ui::FdMainWindow
39
{
40
41
Q_OBJECT
42
private
:
43
static
FdMainWindow
*
self
;
44
TabRole
mActiveTab
;
45
QList<QAction*>
mRecentOpenedFiles
;
46
QList<QAction*>
mContextMenuActionsEdit
;
47
QList<QAction*>
mContextMenuActionsCoa
;
48
QList<QAction*>
mContextMenuActionsJournal
;
49
QList<QAction*>
mContextMenuActionsResults
;
50
QList<QAction*>
mContextMenuActionsAccount
;
51
QAction*
createOpenRecentFileAction
(QString file);
52
void
updateOpenRecentFileActions
(QString file);
53
54
protected
:
55
void
closeEvent
(QCloseEvent* event);
56
57
public
:
58
static
FdMainWindow
*
instance
() {
return
self
; }
59
FdMainWindow
(QWidget* parent = 0);
60
void
enableSaveAction
(
bool
value =
true
);
61
void
enableRemoveAction
(
bool
value =
true
);
62
void
enableShowAccountAction
(
bool
value =
true
);
63
void
enableShowEntryAction
(
bool
value =
true
);
64
QList<QAction*>
getContextMenuActionsEdit
()
const
;
65
QList<QAction*>
getContextMenuActionsCoa
()
const
;
66
QList<QAction*>
getContextMenuActionsJournal
()
const
;
67
QList<QAction*>
getContextMenuActionsResults
()
const
;
68
QList<QAction*>
getContextMenuActionsAccount
()
const
;
69
void
setDockText
(QString text =
""
);
70
void
activeTabChanged
(TabRole role = TabRole(0), QAction* redo =
new
QAction(0), QAction* undo =
new
QAction(0),
bool
windowModified =
false
);
71
void
subwindowAboutToClose
();
72
73
private
slots:
74
void
on_actionNew_triggered
();
75
void
on_actionOpen_triggered
();
76
void
open
(QString filePath);
77
void
openRecentFile
();
78
void
on_actionSave_triggered
();
79
void
on_actionPrint_triggered
();
80
bool
on_actionClose_triggered
();
81
void
on_actionQuit_triggered
();
82
void
on_actionAddLine_triggered
();
83
void
on_actionRemoveSelected_triggered
();
84
void
on_actionCopy_triggered
();
85
void
on_actionFindNext_triggered
();
86
void
on_actionRecomputeAll_triggered
();
87
void
on_actionEditProperties_triggered
();
88
void
on_actionCreateNewYear_triggered
();
89
void
on_actionCopyPreviousLine_triggered
();
90
void
on_actionOrderByDate_triggered
();
91
void
on_actionShowAccount_triggered
();
92
void
on_actionShowEntry_triggered
();
93
void
on_actionHelp_triggered
();
94
void
on_actionAbout_triggered
();
95
96
public
slots:
97
void
addSubWindow
(
FdSubWindow
* subwindow);
98
void
on_actionSaveAs_triggered
();
99
};
100
101
#endif // FDMAINWINDOW_H
Generated on Sat Aug 24 2013 21:18:03 for FreeDebks by
1.8.1.2