Diffstat (limited to 'core/pim/today/plugins/todolist') (more/less context) (ignore whitespace changes)
4 files changed, 150 insertions, 30 deletions
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro index c8730bb..6a63f4e 100644 --- a/core/pim/today/plugins/todolist/todolist.pro +++ b/core/pim/today/plugins/todolist/todolist.pro | |||
@@ -2,3 +2,3 @@ TEMPLATE = lib | |||
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt plugin release | 3 | CONFIG += qt release |
4 | 4 | ||
@@ -9,2 +9,3 @@ SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ | |||
9 | todopluginwidget.cpp | 9 | todopluginwidget.cpp |
10 | INTERFACES= todopluginconfigbase.ui | ||
10 | 11 | ||
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index c83f83b..4821776 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp | |||
@@ -21,4 +21,2 @@ | |||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | ||
23 | #include <qlabel.h> | ||
24 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
@@ -26,3 +24,2 @@ | |||
26 | 24 | ||
27 | |||
28 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | 25 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) |
@@ -31,25 +28,6 @@ TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | |||
31 | QVBoxLayout * layout = new QVBoxLayout( this ); | 28 | QVBoxLayout * layout = new QVBoxLayout( this ); |
32 | layout->setMargin( 20 ); | ||
33 | |||
34 | QHBox *box1 = new QHBox( this ); | ||
35 | |||
36 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | ||
37 | TextLabel6->setText( tr( "tasks shown " ) ); | ||
38 | |||
39 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | ||
40 | SpinBox2->setMaxValue( 40 ); | ||
41 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); | ||
42 | |||
43 | |||
44 | |||
45 | QHBox *box2 = new QHBox( this ); | ||
46 | 29 | ||
47 | QLabel* clipLabel = new QLabel( box2, "" ); | 30 | m_gui = new TodoPluginConfigBase( this ); |
48 | clipLabel->setText( tr( "Clip line after X chars" ) ); | ||
49 | 31 | ||
50 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 32 | layout->addWidget( m_gui ); |
51 | SpinBoxClip->setMaxValue( 200 ); | ||
52 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | ||
53 | layout->addWidget( box1 ); | ||
54 | layout->addWidget( box2 ); | ||
55 | 33 | ||
@@ -62,5 +40,5 @@ void TodolistPluginConfig::readConfig() { | |||
62 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); | 40 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); |
63 | SpinBox2->setValue( m_max_lines_task ); | 41 | m_gui->SpinBox2->setValue( m_max_lines_task ); |
64 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 42 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
65 | SpinBoxClip->setValue( m_maxCharClip ); | 43 | m_gui->SpinBoxClip->setValue( m_maxCharClip ); |
66 | } | 44 | } |
@@ -71,5 +49,5 @@ void TodolistPluginConfig::writeConfig() { | |||
71 | cfg.setGroup( "config" ); | 49 | cfg.setGroup( "config" ); |
72 | m_max_lines_task = SpinBox2->value(); | 50 | m_max_lines_task = m_gui->SpinBox2->value(); |
73 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 51 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
74 | m_maxCharClip = SpinBoxClip->value(); | 52 | m_maxCharClip = m_gui->SpinBoxClip->value(); |
75 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); | 53 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); |
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index 54d35cf..a2d7d2c 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h | |||
@@ -26,3 +26,2 @@ | |||
26 | class TodolistPluginConfig : public TodayConfigWidget { | 26 | class TodolistPluginConfig : public TodayConfigWidget { |
27 | |||
28 | Q_OBJECT | 27 | Q_OBJECT |
diff --git a/core/pim/today/plugins/todolist/todopluginconfigbase.ui b/core/pim/today/plugins/todolist/todopluginconfigbase.ui new file mode 100644 index 0000000..d3dcfb7 --- a/dev/null +++ b/core/pim/today/plugins/todolist/todopluginconfigbase.ui | |||
@@ -0,0 +1,142 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>TodoPluginConfigBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>TodoPluginConfigBase</cstring> | ||
8 | </property> | ||
9 | <vbox> | ||
10 | <property stdset="1"> | ||
11 | <name>margin</name> | ||
12 | <number>11</number> | ||
13 | </property> | ||
14 | <property stdset="1"> | ||
15 | <name>spacing</name> | ||
16 | <number>6</number> | ||
17 | </property> | ||
18 | <widget> | ||
19 | <class>QLayoutWidget</class> | ||
20 | <property stdset="1"> | ||
21 | <name>name</name> | ||
22 | <cstring>Layout1</cstring> | ||
23 | </property> | ||
24 | <hbox> | ||
25 | <property stdset="1"> | ||
26 | <name>margin</name> | ||
27 | <number>0</number> | ||
28 | </property> | ||
29 | <property stdset="1"> | ||
30 | <name>spacing</name> | ||
31 | <number>6</number> | ||
32 | </property> | ||
33 | <widget> | ||
34 | <class>QSpinBox</class> | ||
35 | <property stdset="1"> | ||
36 | <name>name</name> | ||
37 | <cstring>SpinBox2</cstring> | ||
38 | </property> | ||
39 | <property stdset="1"> | ||
40 | <name>maxValue</name> | ||
41 | <number>40</number> | ||
42 | </property> | ||
43 | <property> | ||
44 | <name>whatsThis</name> | ||
45 | <string>Set the maximum number of task that should be shown</string> | ||
46 | </property> | ||
47 | </widget> | ||
48 | <widget> | ||
49 | <class>QLabel</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>TextLabel1</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>text</name> | ||
56 | <string>tasks shown</string> | ||
57 | </property> | ||
58 | <property> | ||
59 | <name>whatsThis</name> | ||
60 | <string>Set the maximum number of task that should be shown</string> | ||
61 | </property> | ||
62 | </widget> | ||
63 | </hbox> | ||
64 | </widget> | ||
65 | <widget> | ||
66 | <class>QLayoutWidget</class> | ||
67 | <property stdset="1"> | ||
68 | <name>name</name> | ||
69 | <cstring>Layout2</cstring> | ||
70 | </property> | ||
71 | <hbox> | ||
72 | <property stdset="1"> | ||
73 | <name>margin</name> | ||
74 | <number>0</number> | ||
75 | </property> | ||
76 | <property stdset="1"> | ||
77 | <name>spacing</name> | ||
78 | <number>6</number> | ||
79 | </property> | ||
80 | <widget> | ||
81 | <class>QSpinBox</class> | ||
82 | <property stdset="1"> | ||
83 | <name>name</name> | ||
84 | <cstring>SpinBoxClip</cstring> | ||
85 | </property> | ||
86 | <property stdset="1"> | ||
87 | <name>maxValue</name> | ||
88 | <number>200</number> | ||
89 | </property> | ||
90 | <property> | ||
91 | <name>whatsThis</name> | ||
92 | <string>After how many chars should be the info about the task be cut off</string> | ||
93 | </property> | ||
94 | </widget> | ||
95 | <widget> | ||
96 | <class>QLabel</class> | ||
97 | <property stdset="1"> | ||
98 | <name>name</name> | ||
99 | <cstring>TextLabel2</cstring> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>text</name> | ||
103 | <string>Clip line after X chars</string> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>alignment</name> | ||
107 | <set>WordBreak|AlignVCenter|AlignLeft</set> | ||
108 | </property> | ||
109 | <property> | ||
110 | <name>whatsThis</name> | ||
111 | <string>After how many chars should be the info about the task be cut off</string> | ||
112 | </property> | ||
113 | <property> | ||
114 | <name>wordwrap</name> | ||
115 | </property> | ||
116 | </widget> | ||
117 | </hbox> | ||
118 | </widget> | ||
119 | <spacer> | ||
120 | <property> | ||
121 | <name>name</name> | ||
122 | <cstring>Spacer1</cstring> | ||
123 | </property> | ||
124 | <property stdset="1"> | ||
125 | <name>orientation</name> | ||
126 | <enum>Vertical</enum> | ||
127 | </property> | ||
128 | <property stdset="1"> | ||
129 | <name>sizeType</name> | ||
130 | <enum>Expanding</enum> | ||
131 | </property> | ||
132 | <property> | ||
133 | <name>sizeHint</name> | ||
134 | <size> | ||
135 | <width>20</width> | ||
136 | <height>20</height> | ||
137 | </size> | ||
138 | </property> | ||
139 | </spacer> | ||
140 | </vbox> | ||
141 | </widget> | ||
142 | </UI> | ||