kivio

kiviooptionsdialog.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Peter Simonsson <psn@linux.se>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KIVIOOPTIONSDIALOG_H
21#define KIVIOOPTIONSDIALOG_H
22
23#include <kdialogbase.h>
24#include <KoPageLayout.h>
25#include <KoUnit.h>
26#include <tdelistview.h>
27
28class KivioView;
29class TQComboBox;
30class TQCheckBox;
31class TQLabel;
32class TQRadioButton;
33class KColorButton;
34class KURLRequester;
35class KoUnitDoubleSpinBox;
36class KivioGuideLineData;
37class TQGroupBox;
38class TQFont;
39
40// class GuidesListViewItem : public TDEListViewItem
41// {
42// public:
43// GuidesListViewItem(TQListView* parent, KivioGuideLineData *gd, KoUnit::Unit u);
44// ~GuidesListViewItem();
45//
46// void setUnit(KoUnit::Unit u);
47// void setPosition(double p, KoUnit::Unit u);
48// void setOrientation(TQt::Orientation o);
49// KivioGuideLineData* guideData() { return m_data; }
50//
51// private:
52// KivioGuideLineData* m_data;
53// };
54
55/***********************************************************************/
56
57class KivioOptionsDialog : public KDialogBase
58{
59 TQ_OBJECT
60
61 public:
62 KivioOptionsDialog(KivioView* parent, const char* name = 0);
63
64 protected:
65 void initPage();
66 void initGrid();
67
68 void applyPage();
69 void applyGrid();
70
71 void defaultPage();
72 void defaultGrid();
73
74 void setLayoutText(const KoPageLayout& l);
75 void setFontText(const TQFont& f);
76
77 protected slots:
78 void pageLayoutDlg();
79 void fontDlg();
80 void unitChanged(int u);
81 void slotOk();
82 void slotApply();
83 void slotDefault();
84 void setMaxHorizSnap(double v);
85 void setMaxVertSnap(double v);
86
87 private:
88 // Page indecies
89 int m_pageIndex;
90 int m_gridIndex;
91
92 TQComboBox* m_unitCombo;
93 TQCheckBox* m_marginsChBox;
94 TQCheckBox* m_rulersChBox;
95 TQLabel* m_layoutTxtLbl;
96 KoPageLayout m_layout;
97 TQLabel* m_fontTxtLbl;
98 TQFont m_font;
99 KoUnitDoubleSpinBox* m_spaceHorizUSpin;
100 KoUnitDoubleSpinBox* m_spaceVertUSpin;
101 KoUnitDoubleSpinBox* m_snapHorizUSpin;
102 KoUnitDoubleSpinBox* m_snapVertUSpin;
103 TQCheckBox* m_gridChBox;
104 TQCheckBox* m_snapChBox;
105 KColorButton* m_gridColorBtn;
106};
107
108#endif