blob: 88ec685f233c15989160d8b96f7f7eb9da6af3cb (
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
48
49
50
51
52
53
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QDialog>
#include <QDebug>
#include <QDesktopWidget>
#include <QTreeWidget>
#include "cups/cups.h"
namespace Ui
{
class PrinterGui;
}
class QTimer;
class QStatusBar;
class QCloseEvent;
class QHideEvent;
class QKeyEvent;
class PrinterGui : public QDialog
{
Q_OBJECT
public:
explicit PrinterGui(char *argv[], QWidget *parent = 0);
~PrinterGui();
protected:
void closeEvent(QCloseEvent * e);
void hideEvent(QHideEvent * e);
void keyPressEvent(QKeyEvent * e);
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();
cups_dest_t *dests;
int num_dests;
char * user;
char * file;
QTimer * bgTimer;
QStatusBar *statusBar;
int bgTimeout;
int jobId;
};
#endif // MAINWINDOW_H
|