1 /**************************************************************************
5 Unix Remote Printing Operation
6 Copyright (c) Arto Hyvättinen 2010
8 This file is part of URPO.
10 URPO is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 URPO is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
21 **************************************************************************/
35 /*! GUI Widget of Urpo printing
37 @author Arto Hyvättinen
43 class PrintWidget : public QWidget
47 explicit PrintWidget(QWidget *parent = 0);
50 Set printers and enable printing if printer exists
52 @arg printers List of printer names
54 void setPrinters(QStringList printers);
57 /*! User press Cancel button */
59 /*! User press Reconnect button */
61 /*! User press Print button */
62 void print(QString file, QString options);
65 /*! Set status information
67 @arg message Message to show. Use html tags for red error color
68 @arg busy Show busy progress bar
70 void setStatus(QString message=QString(), bool busy=false);
71 /*! Set ready to print
73 Enable print button and set status message to ready
75 @arg ready Is ready to print
77 void setReady(bool ready);
78 void browseFile(); /*! Press browse button */
79 void doPrint(); /*! Press print button */
80 void doCancel() { emit cancel(); } /*! Press cancel button */
84 QLineEdit* filenameEdit;
85 QPushButton* browseButton;
86 QComboBox* printerCombo;
87 QComboBox* persheetCombo;
90 QPushButton* printButton;
92 QProgressBar* progressBar;
93 QPushButton* cancelButton;
94 QPushButton* reconnectButton;
97 #endif // PRINTWIDGET_H