Commit 1f560fb8 authored by Laurent Montel's avatar Laurent Montel 😁

Hide

parent 1f3914c9
......@@ -30,6 +30,7 @@ using namespace WebEngineViewer;
PrintPreviewDialog::PrintPreviewDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Preview"));
QVBoxLayout *layout = new QVBoxLayout;
setLayout(layout);
......
......@@ -43,9 +43,9 @@ PrintPreviewPageWidget::PrintPreviewPageWidget(QWidget *parent)
hbox->setObjectName(QStringLiteral("layoutcombobox"));
hbox->setMargin(0);
layout->addLayout(hbox);
QLabel *lab = new QLabel(i18n("Page:"), this);
lab->setObjectName(QStringLiteral("labelcombobox"));
hbox->addWidget(lab);
mPageComboboxLab = new QLabel(i18n("Page:"), this);
mPageComboboxLab->setObjectName(QStringLiteral("labelcombobox"));
hbox->addWidget(mPageComboboxLab);
mPageComboBox = new QComboBox(this);
mPageComboBox->setObjectName(QStringLiteral("pagecombobox"));
......@@ -102,6 +102,10 @@ void PrintPreviewPageWidget::fillComboBox()
for (int i = 0; i < pageCount; ++i) {
mPageComboBox->addItem(QString::number(i + 1));
}
if (pageCount == 1) {
mPageComboBox->hide();
mPageComboboxLab->hide();
}
}
bool PrintPreviewPageWidget::deleteFile() const
......
......@@ -21,6 +21,7 @@
#include <QWidget>
class QComboBox;
class QLabel;
namespace Poppler
{
class Document;
......@@ -50,6 +51,7 @@ private:
PrintPreviewPageViewer *mPrintPreviewPage;
Poppler::Document *mDoc;
QComboBox *mPageComboBox;
QLabel *mPageComboboxLab;
};
}
#endif // PRINTPREVIEWPAGEWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment