mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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:
parent
3d5caabe4a
commit
ce3d2abd83
1 changed files with 15 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue