0
|
1 |
#ifndef MAINPANEL_H
|
|
2 |
#define MAINPANEL_H
|
|
3 |
|
|
4 |
|
|
5 |
#include <qmainwindow.h>
|
|
6 |
#include <qsqldatabase.h>
|
|
7 |
#include "tdbconfig.h"
|
|
8 |
//#include "infolabel.h"
|
|
9 |
|
|
10 |
class QWorkspace;
|
|
11 |
class QDialog;
|
|
12 |
class InfoLabel;
|
|
13 |
class ChartWindow;
|
|
14 |
|
|
15 |
/*!
|
|
16 |
Offers the main window of the YAGL application. It holds the database
|
|
17 |
connection information, and controls the actions in this main window.
|
|
18 |
*/
|
|
19 |
class MainPanel : public QMainWindow
|
|
20 |
{
|
|
21 |
Q_OBJECT
|
|
22 |
|
|
23 |
private: // Variables
|
|
24 |
Tdb_config db_config;
|
|
25 |
QWorkspace *workspace;
|
|
26 |
InfoLabel *info_connected;
|
|
27 |
|
|
28 |
QSqlDatabase *our_database;
|
|
29 |
|
|
30 |
InfoLabel *transactionsD;
|
|
31 |
ChartWindow *chartW;
|
|
32 |
|
|
33 |
public: // Methods
|
|
34 |
/*!
|
|
35 |
Constructor of the main window application
|
|
36 |
*/
|
|
37 |
MainPanel( QWidget *parent=0, const char *name = 0);
|
|
38 |
|
|
39 |
public slots:
|
|
40 |
/*!
|
|
41 |
Opens a dialog for managing transactions.
|
|
42 |
*/
|
|
43 |
void transactions();
|
|
44 |
/*!
|
|
45 |
Opens a dialog for managing the Chart of Accounts
|
|
46 |
*/
|
|
47 |
void accountChart();
|
|
48 |
void accountChartRemoved();
|
|
49 |
/*!
|
|
50 |
Connects to the database configured
|
|
51 |
*/
|
|
52 |
void dbConnect();
|
|
53 |
/*!
|
|
54 |
Disconnects from the database configured
|
|
55 |
*/
|
|
56 |
void dbDisconnect();
|
|
57 |
/*!
|
|
58 |
Opens a dialog prompting for database connection configuration
|
|
59 |
*/
|
|
60 |
void dbConfigure();
|
|
61 |
};
|
|
62 |
|
|
63 |
#endif //MAINPANEL_H
|