summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/printdialog.cpp11
-rw-r--r--qt-ui/printdialog.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index b6481372a..683d584ad 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -38,10 +38,14 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
connect(previewButton, SIGNAL(clicked(bool)), this, SLOT(previewClicked()));
hLayout->addWidget(previewButton);
- QPushButton *printButton = new QPushButton(tr("&Print"));
+ QPushButton *printButton = new QPushButton(tr("P&rint"));
connect(printButton, SIGNAL(clicked(bool)), this, SLOT(printClicked()));
hLayout->addWidget(printButton);
+ QPushButton *closeButton = new QPushButton(tr("&Close"));
+ connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(closeClicked()));
+ hLayout->addWidget(closeButton);
+
QProgressBar *progressBar = new QProgressBar();
connect(printLayout, SIGNAL(signalProgress(int)), progressBar, SLOT(setValue(int)));
progressBar->setMinimum(0);
@@ -75,6 +79,11 @@ void PrintDialog::printClicked(void)
printLayout->print();
}
+void PrintDialog::closeClicked(void)
+{
+ close();
+}
+
void PrintDialog::onPaintRequested(QPrinter *printerPtr)
{
printLayout->print();
diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h
index 5c5c1fbf6..924f21acc 100644
--- a/qt-ui/printdialog.h
+++ b/qt-ui/printdialog.h
@@ -25,6 +25,7 @@ private:
private slots:
void previewClicked();
void printClicked();
+ void closeClicked();
void onPaintRequested(QPrinter *);
};