mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:16:16 +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 <QPrintDialog>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#define SETTINGS_GROUP "PrintDialog"
|
#define SETTINGS_GROUP "PrintDialog"
|
||||||
|
|
||||||
|
@ -93,6 +94,13 @@ void PrintDialog::onFinished()
|
||||||
|
|
||||||
void PrintDialog::previewClicked(void)
|
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
|
QPrintPreviewDialog previewDialog(&qprinter, this, Qt::Window
|
||||||
| Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint
|
| Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint
|
||||||
| Qt::WindowTitleHint);
|
| Qt::WindowTitleHint);
|
||||||
|
@ -102,6 +110,13 @@ void PrintDialog::previewClicked(void)
|
||||||
|
|
||||||
void PrintDialog::printClicked(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);
|
QPrintDialog printDialog(&qprinter, this);
|
||||||
if (printDialog.exec() == QDialog::Accepted) {
|
if (printDialog.exec() == QDialog::Accepted) {
|
||||||
switch (printOptions.type) {
|
switch (printOptions.type) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue