src/mainpanel.h
changeset 0 04114bce8fd0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mainpanel.h	Thu May 18 23:05:01 2006 +0200
@@ -0,0 +1,63 @@
+#ifndef MAINPANEL_H
+#define MAINPANEL_H
+
+
+#include <qmainwindow.h>
+#include <qsqldatabase.h>
+#include "tdbconfig.h"
+//#include "infolabel.h"
+
+class QWorkspace;
+class QDialog;
+class InfoLabel;
+class ChartWindow;
+
+/*!
+  Offers the main window of the YAGL application. It holds the database
+  connection information, and controls the actions in this main window.
+  */
+class MainPanel : public QMainWindow
+{
+	Q_OBJECT
+
+private: // Variables
+	Tdb_config db_config;
+	QWorkspace *workspace;
+	InfoLabel *info_connected;
+
+	QSqlDatabase *our_database;
+
+	InfoLabel *transactionsD;
+	ChartWindow *chartW;
+
+public: // Methods
+	/*!
+	  Constructor of the main window application
+	  */
+	MainPanel( QWidget *parent=0, const char *name = 0);
+
+public slots:
+	/*!
+	  Opens a dialog for managing transactions.
+	  */
+	void transactions();
+	/*!
+	  Opens a dialog for managing the Chart of Accounts
+	  */
+	void accountChart();
+	void accountChartRemoved();
+	/*!
+	  Connects to the database configured
+	  */
+	void dbConnect();
+	/*!
+	  Disconnects from the database configured
+	  */
+	void dbDisconnect();
+	/*!
+	  Opens a dialog prompting for database connection configuration
+	  */
+	void dbConfigure();
+};
+
+#endif //MAINPANEL_H