From 9fade0d6096807ed207c9a2c8d634251301a8e9a Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Tue, 8 Oct 2013 13:56:26 +0200 Subject: Widgets disabled by default. A failed printjob spawns error dialog --- src/main.cpp | 1 + src/mainwindow.cpp | 9 ++++++--- src/mainwindow.ui | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2b97c95..4186bc5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,6 +2,7 @@ #include #include "mainwindow.h" + int main(int argc, char *argv[]) { // First check parameter count diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index cc40d5e..2c56da2 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1,7 +1,6 @@ #include "mainwindow.h" #include "ui_mainwindow.h" -#include - + #include MainWindow::MainWindow(char *argv[], QWidget *parent) : @@ -268,7 +267,11 @@ void MainWindow::on_buttonPrint_clicked() NULL, dest->num_options, dest->options)) - return; // TODO ERROR OUTPUT + { + QMessageBox msgBox; + msgBox.setText(cupsLastErrorString()); + msgBox.exec(); + } else // Quit with code 0 QCoreApplication::instance()->quit(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 0a56de6..022275e 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -38,6 +38,9 @@ + + false + User: @@ -48,6 +51,9 @@ + + false + 0 @@ -60,6 +66,9 @@ + + false + Graustufen @@ -74,6 +83,9 @@ + + false + Simplex @@ -95,6 +107,9 @@ + + false + Password: @@ -105,6 +120,9 @@ + + false + 0 @@ -135,6 +153,9 @@ + + false + 0 @@ -152,6 +173,9 @@ + + false + Anzahl Kopien: @@ -162,6 +186,9 @@ + + false + 0 -- cgit v1.2.3-55-g7522