summaryrefslogblamecommitdiffstats
path: root/src/maingui/printergui.h
blob: 88ec685f233c15989160d8b96f7f7eb9da6af3cb (plain) (tree)
1
2
3
4
5
6
7
8
9


                    
                  




                         

            
                 

 
             



                  
 
                                 
 
                

       

                                                               
 




                                          
              


                                                                                                    
                               

        





                            
                         
                              
                      
                  


                      
#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