forked from sjg20/paperman
/
qscannersetupdlg.h
142 lines (132 loc) · 3.52 KB
/
qscannersetupdlg.h
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/***************************************************************************
qscannersetupdlg.h - description
-------------------
begin : Thu Jun 29 2000
copyright : (C) 2000 by M. Herder
email : crapsite@gmx.net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 as *
* published by the Free Software Foundation. *
* *
***************************************************************************/
#ifndef QSCANNERSETUPDLG_H
#define QSCANNERSETUPDLG_H
#include <qdialog.h>
#include <qmap.h>
#include <QShowEvent>
#include <QTranslator>
/**
*@author M. Herder
*/
//forward declarations
class QTreeWidget;
class QTreeWidgetItem;
class QRadioButton;
class QWidget;
class QPushButton;
class QString;
class QScanner;
class QScanDialog;
class QTranslator;
class QScannerSetupDlg : public QDialog
{
Q_OBJECT
public:
QScannerSetupDlg(QScanner *sc=0, QWidget *parent=0, const char *name=0,
bool modal=false, Qt::WindowFlags f=0);
~QScannerSetupDlg();
/** */
void addLVItem(QString name,QString vendor,QString model,QString type);
/** */
void clearList();
/** */
QString device();
/** */
QString lastDevice();
/** */
virtual void show();
/** */
QMap <QString,QString> optionMap();
QScanner *scanner (void) { return mpScanner; }
bool setupLast();
/** */
static void initConfig();
/** Uninit the scanner, if any */
void uninitScanner();
private:
/** */
int mStyle;
/** */
QMap <QString,QString> mOptionMap;
/** */
QScanner* mpScanner;
/** */
QTreeWidget* mpListView;
QPushButton *mpQuitButton;
/** */
QPushButton* mpDeviceButton;
/** */
QPushButton* mpLocalDeviceButton;
/** */
QRadioButton* mpLastDeviceRadio;
/** */
QRadioButton* mpLocalDevicesRadio;
/** */
QRadioButton* mpAllDevicesRadio;
/** */
QRadioButton* mpSameDeviceRadio;
/** */
QTreeWidgetItem* mpLastItem;
/** */
int mQueryType;
/** */
QPushButton* mpSelectButton;
/** */
QScanDialog* mpScanDialog;
/** */
QString mSanePath;
/** */
bool mProcessExit;
private://methods
/** */
void initScanner();
/** */
void initDialog();
/** */
void createContents(bool intcall);
/** */
void createWhatsThisHelp();
/** Open the device settings file, if it exists at all.
This file is in XML format. If there are saved
settings for the currently listed devices, list them
as childitems of the device entries. */
void loadDeviceSettings();
/** No descriptions */
void loadBackendTranslation(QString name);
/** No descriptions */
void markLastDevice();
protected: // Protected methods
/** */
virtual void showEvent(QShowEvent * e);
private slots: // Private slots
/** */
void slotDeviceSelected();
/** */
void slotDeviceSelected(QTreeWidgetItem*, int);
/** */
void slotListViewClicked(QTreeWidgetItem*, int);
/** */
void slotAllDevices();
/** */
void slotLocalDevices();
/** */
void slotDeviceGroup(int id);
/** */
void slotProcessEvents();
/** */
void slotQuit();
};
#endif