Printing: show warning message for WIP features

Show warning message before proceeding to print 'Table' or
'Statistics' print layout. This should be used during the
development phase only.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Gehad elrobey 2015-06-24 05:12:45 +02:00 committed by Lubomir I. Ivanov
parent 3d5caabe4a
commit ce3d2abd83

View file

@ -8,6 +8,7 @@
#include <QPrintDialog>
#include <QShortcut>
#include <QSettings>
#include <QMessageBox>
#define SETTINGS_GROUP "PrintDialog"
@ -93,6 +94,13 @@ void PrintDialog::onFinished()
void PrintDialog::previewClicked(void)
{
if (printOptions.type == print_options::TABLE || printOptions.type == print_options::STATISTICS) {
QMessageBox msgBox;
msgBox.setText("This feature is not implemented yet");
msgBox.exec();
return;
}
QPrintPreviewDialog previewDialog(&qprinter, this, Qt::Window
| Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint
| Qt::WindowTitleHint);
@ -102,6 +110,13 @@ void PrintDialog::previewClicked(void)
void PrintDialog::printClicked(void)
{
if (printOptions.type == print_options::TABLE || printOptions.type == print_options::STATISTICS) {
QMessageBox msgBox;
msgBox.setText("This feature is not implemented yet");
msgBox.exec();
return;
}
QPrintDialog printDialog(&qprinter, this);
if (printDialog.exec() == QDialog::Accepted) {
switch (printOptions.type) {