summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/ui/export_page_dialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kivio/kiviopart/ui/export_page_dialog.cpp
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/ui/export_page_dialog.cpp')
-rw-r--r--kivio/kiviopart/ui/export_page_dialog.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/kivio/kiviopart/ui/export_page_dialog.cpp b/kivio/kiviopart/ui/export_page_dialog.cpp
new file mode 100644
index 00000000..941bd87a
--- /dev/null
+++ b/kivio/kiviopart/ui/export_page_dialog.cpp
@@ -0,0 +1,60 @@
+#include "export_page_dialog.h"
+
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+
+#include "export_page_dialog_base.h"
+#include "kivio_config.h"
+
+ExportPageDialog::ExportPageDialog( QWidget *parent, const char *name )
+ : KDialogBase(parent, name, true, i18n("Export Page"), Ok|Cancel, Ok)
+{
+ m_view = new ExportPageDialogBase(this);
+ setMainWidget(m_view);
+
+ m_view->m_checkCrop->setChecked(Kivio::Config::crop());
+ m_view->m_radioFullPage->setChecked(!Kivio::Config::selectedStencils());
+ m_view->m_radioSelectedStencils->setChecked(Kivio::Config::selectedStencils());
+ m_view->m_spinBorder->setValue(Kivio::Config::border());
+ m_view->m_spinQuality->setValue(Kivio::Config::quality());
+}
+
+int ExportPageDialog::quality()
+{
+ return m_view->m_spinQuality->value();
+}
+
+int ExportPageDialog::border()
+{
+ return m_view->m_spinBorder->value();
+}
+
+bool ExportPageDialog::crop()
+{
+ return m_view->m_checkCrop->isChecked();
+}
+
+bool ExportPageDialog::fullPage()
+{
+ return m_view->m_radioFullPage->isChecked();
+}
+
+bool ExportPageDialog::selectedStencils()
+{
+ return m_view->m_radioSelectedStencils->isChecked();
+}
+
+void ExportPageDialog::slotOk()
+{
+ Kivio::Config::setCrop(m_view->m_checkCrop->isChecked());
+ Kivio::Config::setSelectedStencils(m_view->m_radioSelectedStencils->isChecked());
+ Kivio::Config::setBorder(m_view->m_spinBorder->value());
+ Kivio::Config::setQuality(m_view->m_spinQuality->value());
+
+ accept();
+}
+
+#include "export_page_dialog.moc"