summaryrefslogtreecommitdiffstats
path: root/src/maingui/printergui.h
blob: 17fc8e662d9a40bc3249e6242f28209540698bd4 (plain) (blame)
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDebug>
#include <QDesktopWidget>
#include <QTreeWidget>
#include "cups/cups.h"

namespace Ui
{
class PrinterGui;
}

class QTimer;
class QLabel;
class QComboBox;
class QStringList;
typedef struct ppd_file_s ppd_file_t;

class PrinterGui : public QMainWindow
{
	Q_OBJECT

public:
	explicit PrinterGui(char *argv[], QWidget *parent = 0);
	~PrinterGui();

private slots:
	void on_printerList_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
	void on_buttonCancel_clicked();
	void on_buttonPrint_clicked();
	void bgTimer_timeout();

private:
	Ui::PrinterGui *ui;
	void initializeUI();
	void enableOptionSelection(ppd_file_t *ppd, QStringList &nameList, QComboBox *combo, QLabel *label);
	cups_dest_t *dests;
	int num_dests;
	char * user;
	char * file;
	QTimer * bgTimer;
	int bgTimeout;
};

#endif // MAINWINDOW_H