blob: b898541d4e6f2f77d5548d5593e59e06c98a4d26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#include "export_page_dialog.h"
#include <tqcheckbox.h>
#include <tqradiobutton.h>
#include <tqspinbox.h>
#include <tdelocale.h>
#include "export_page_dialog_base.h"
#include "kivio_config.h"
ExportPageDialog::ExportPageDialog( TQWidget *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"
|