src/mainpanel.h
author viric@llimona
Thu, 18 May 2006 23:05:01 +0200
changeset 0 04114bce8fd0
permissions -rw-r--r--
Initial from sourceforge's cvs.

#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