diff options
author | Ken Moore <ken@ixsystems.com> | 2017-12-21 09:47:39 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-12-21 09:47:39 -0500 |
commit | 6fa4f14708a67c57d7b6753c4e933df2e6b2f583 (patch) | |
tree | e867e7fc3c61535b1c74d956556cc31c630a5ead /src-qt5/desktop-utils/lumina-pdf/propDialog.cpp | |
parent | Turn of some stdout messages within the Qt theme plugin. (diff) | |
parent | Merge branch 'master' of https://github.com/trueos/lumina (diff) | |
download | lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.tar.gz lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.tar.bz2 lumina-6fa4f14708a67c57d7b6753c4e933df2e6b2f583.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/propDialog.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-pdf/propDialog.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/propDialog.cpp b/src-qt5/desktop-utils/lumina-pdf/propDialog.cpp new file mode 100644 index 00000000..6dbdee69 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-pdf/propDialog.cpp @@ -0,0 +1,54 @@ +//=========================================== +// Lumina Desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== + +#include "propDialog.h" +#include "ui_propDialog.h" + +#include <LuminaXDG.h> + +PropDialog::PropDialog(Poppler::Document *DOC) : QDialog(), ui(new Ui::PropDialog()){ + this->setWindowTitle(tr("PDF Information")); + this->setWindowIcon( LXDG::findIcon("dialog-information","unknown")); + int verMa, verMi; + QString version; + QSize size = DOC->page(0)->pageSize(); + + //Grab the version + DOC->getPdfVersion(&verMa, &verMi); + version = QString::number(verMa)+"."+QString::number(verMi); + + ui->setupUi(this); + + //Setup translations + ui->titleL->setText(tr("Title:")); + ui->subjectL->setText(tr("Subject:")); + ui->authorL->setText(tr("Author:")); + ui->creatorL->setText(tr("Creator:")); + ui->producerL->setText(tr("Producer:")); + ui->keywordsL->setText(tr("Keywords:")); + ui->createdL->setText(tr("Created:")); + ui->modifiedL->setText(tr("Modified:")); + ui->versionL->setText(tr("PDF Version:")); + ui->sizeL->setText(tr("Page Size:")); + ui->numberL->setText(tr("Number of Pages:")); + ui->saveButton->setText(tr("Save")); + ui->closeButton->setText(tr("Close")); + + //Fill the text boxes with information from the document + ui->titleE->setText(DOC->title()); + ui->subjectE->setText(DOC->subject()); + ui->authorE->setText(DOC->author()); + ui->creatorE->setText(DOC->creator()); + ui->producerE->setText(DOC->producer()); + ui->keywordE->setText(DOC->keywords()); + ui->createdEntry->setText(DOC->creationDate().toString(Qt::TextDate)); + ui->modifiedEntry->setText(DOC->modificationDate().toString(Qt::TextDate)); + ui->versionL->setText(ui->versionL->text()+version); + ui->sizeL->setText(ui->sizeL->text()+QString::number(size.height())+ + ", "+QString::number(size.width())); + ui->numberL->setText(ui->numberL->text()+QString::number(DOC->numPages())); +} |