blob: 255e4a4f5f460a35a1aebbfa5f8ff0b75f03644d (
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
92
93
94
95
96
97
98
99
|
/***************************************************************************
kbarcode.h - description
-------------------
begin : Don Apr 18 12:34:56 CEST 2002
copyright : (C) 2002 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 KBARCODE_H
#define KBARCODE_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <tqstring.h>
enum linebreak {
NO_BREAK,
LINE_BREAK,
LABEL_X,
NEW_PAGE,
ARTICLE_GROUP_NO
};
#include "dsmainwindow.h"
#include "kbarcodeiface.h"
class KAction;
class KPushButton;
/** The main window of KBarcode. All submodules
* are started from here. Submodules are the LabelEditor
* LabelPrinter (Batchprinting), DatabaseBrowser and BarcodeDialog.
* There are also a few smaller modules.
*/
class KBarcode: public DSMainWindow, public KBarcodeIface {
Q_OBJECT
TQ_OBJECT
public:
KBarcode( TQWidget *parent=0, const char *name="kbarcode", WFlags f = WType_TopLevel | WDestructiveClose );
~KBarcode();
/** Parse all commandline options and start batchprinting
* if necessary.
* \returns true if the application should exit after this function
*/
bool parseCmdLine();
private slots:
void startBarcode();
void startLabelEditor();
void startBatchPrint();
void editArticles();
void editCustomers();
void editCustomerText();
void editLabelDef();
void enableData();
void importCSV();
private:
void setupActions();
/** allow the DCOP interface
* to check for an SQL connection.
*/
bool isSTQLConnected() const;
/** allow the DCOP interface
* to connect to the databases.
*/
bool connectSQL();
/** allow DCOP interface
* to start the configuration wizard.
*/
void showWizard();
/** show preferences from DCOP.
*/
void showConfigure();
KAction* connectAct;
KPushButton* buttonSingle;
KPushButton* buttonEditor;
KPushButton* buttonBatch;
KPushButton* buttonData;
};
#endif
|