/***************************************************************************
copyright : (C) 1999 by Edwin Glaser
email : edwin@pannenleiter.de
version : $Id: datawidget.h,v 1.1.1.1 2000/02/07 21:41:38 ege Exp $
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DATAWIDGET_H
#define DATAWIDGET_H
// include files for QT
#include <qpopupmenu.h>
#include <qmainwindow.h>
#include <qaccel.h>
#include <qmenubar.h>
#include <qapp.h>
#include <qstatusbar.h>
#include <qmultilinedit.h>
// application specific includes
#include "resource.h"
#include "common.h"
/**
* This Class is the base class of the test application. It sets up the main
* window and providing a menubar, toolbar
* and statusbar. For the main view, an instance of class DataWidgetView is
* created which creates your view.
*/
class DataWidget : public QMainWindow
{
Q_OBJECT
QString dsn;
SQLHENV henv;
SQLHDBC hdbc;
QMultiLineEdit *logSink;
bool openConnection();
void closeConnection();
void showError(char *info, long errorcode);
//void resizeEvent ( QResizeEvent * );
public:
/** construtor */
DataWidget();
/** destructor */
~DataWidget();
/** initMenuBar creates the menu_bar and inserts the menuitems */
void initMenuBar();
/** this creates the toolbars. Change the toobar look and add new toolbars in this
* function */
void initStatusBar();
void open();
public slots:
/** open a new application window */
void slotConnect();
void slotTest0();
void slotTest1();
void slotTest2();
void slotTest3();
void slotTest4();
void slotTest5();
void slotTest6();
void slotTest7();
void slotTest8();
void slotTest9();
void slotFileQuit();
/** shows an about dlg*/
void slotHelpAbout();
/** change the status message of the whole statusbar temporary */
void slotStatusHelpMsg(const char *text);
void log(const char *);
private:
/** file_menu contains all items of the menubar entry "File" */
QPopupMenu *file_menu;
/** view_menu contains all items of the menubar entry "Help" */
QPopupMenu *help_menu;
QToolBar *file_toolbar;
};
#endif
Documentation generated by eg@wonko on Sam Feb 19 00:09:53 MET 2000