~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to kivio/kiviopart/ui/pageoptionsdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "pageoptionsdialog.h"
2
 
 
3
 
#include "kivio_doc.h"
4
 
#include "kivio_view.h"
5
 
 
6
 
#include <qcheckbox.h>
7
 
 
8
 
PageOptionsDialog::PageOptionsDialog(KivioView* view, QWidget* parent, const char* name)
9
 
: PageOptionsDialogBase(parent, name)
10
 
{
11
 
  m_pView = view;
12
 
  units->setUnit(m_pView->doc()->units());
13
 
  showBorders->setChecked(m_pView->isShowPageBorders());
14
 
  showMargins->setChecked(m_pView->isShowPageMargins());
15
 
  showRules->setChecked(m_pView->isShowRulers());
16
 
}
17
 
 
18
 
PageOptionsDialog::~PageOptionsDialog()
19
 
{
20
 
}
21
 
 
22
 
void PageOptionsDialog::apply(QWidget* page)
23
 
{
24
 
  if (page != this)
25
 
    return;
26
 
 
27
 
  m_pView->doc()->setUnits(units->unit());
28
 
  m_pView->togglePageBorders(showBorders->isChecked());
29
 
  m_pView->togglePageMargins(showMargins->isChecked());
30
 
  m_pView->toggleShowRulers(showRules->isChecked());
31
 
}
32
 
 
33
 
#include "pageoptionsdialog.moc"