blob: 94e342be2f461a29f3658478fd7ab431b02bd8f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
/***************************************************************************
dsmainwindow.h - description
-------------------
begin : Fre Jan 17 2003
copyright : (C) 2003 by Dominik Seichter
email : domseichter@web.de
***************************************************************************/
/***************************************************************************
* *
* 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 DSMAINWINDOW_H
#define DSMAINWINDOW_H
#include <tqwidget.h>
#include <tdemainwindow.h>
class TDEAction;
class TDEPopupMenu;
/** The base class of all main windows of KBarcode. It provides standard menu items
* for database connections, preferences, help, the first start wizard and donations.
* It checks also if this is the first start of KBarcode and if the configuration wizard
* should be started.
*MessageBox
* @author Dominik Seichter
*/
class DSMainWindow : public TDEMainWindow {
Q_OBJECT
public:
DSMainWindow(TQWidget *parent=0, const char *name=0, WFlags f = WType_TopLevel | WDestructiveClose );
~DSMainWindow();
/** Is this the first start of KBarcode ?
* If true, the configuration wizard will
* be started automatically.
*/
bool isFirstStart() const {
return first;
}
/** Do a system check and return a text
* informing the user about missing, programs
* and drivers for barcode support and database
* access.
*/
static TQString systemCheck();
public slots:
void wizard();
signals:
void connectedSQL();
private slots:
void connectMySQL();
void appHelpActivated();
void startInfo();
bool newTables();
void donations();
void showCheck();
protected slots:
void loadConfig();
void saveConfig();
protected:
void setupActions();
static bool autoconnect;
static bool startwizard;
void slotFunctionMap();
bool first;
TDEAction* connectAct;
TDEAction* importLabelDefAct;
TDEAction* importExampleAct;
TDEPopupMenu* file;
TDEPopupMenu* settings;
TDEPopupMenu* hlpMenu;
};
#endif
|