Diffstat (limited to 'core/pim/today/plugins/todolist/todopluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginwidget.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp index 773e5cf..3242dac 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.cpp +++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp | |||
@@ -32,4 +32,5 @@ TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) | |||
32 | 32 | ||
33 | todoLabel = 0l; | ||
34 | todo = 0l; | 33 | todo = 0l; |
34 | layoutTodo = 0l; | ||
35 | todoLabel = 0l; | ||
35 | 36 | ||
@@ -38,3 +39,2 @@ TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) | |||
38 | } | 39 | } |
39 | |||
40 | todo = new OTodoAccess(); | 40 | todo = new OTodoAccess(); |
@@ -42,2 +42,16 @@ TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) | |||
42 | 42 | ||
43 | if ( layoutTodo ) { | ||
44 | delete layoutTodo; | ||
45 | } | ||
46 | layoutTodo = new QVBoxLayout( this ); | ||
47 | layoutTodo->setAutoAdd( true ); | ||
48 | |||
49 | |||
50 | if ( todoLabel ) { | ||
51 | delete todoLabel; | ||
52 | } | ||
53 | todoLabel = new OClickableLabel( this ); | ||
54 | |||
55 | connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); | ||
56 | |||
43 | readConfig(); | 57 | readConfig(); |
@@ -48,2 +62,4 @@ TodolistPluginWidget::~TodolistPluginWidget() { | |||
48 | delete todo; | 62 | delete todo; |
63 | delete todoLabel; | ||
64 | delete layoutTodo; | ||
49 | } | 65 | } |
@@ -58,2 +74,5 @@ void TodolistPluginWidget::readConfig() { | |||
58 | 74 | ||
75 | void TodolistPluginWidget:: refresh() { | ||
76 | getTodo(); | ||
77 | } | ||
59 | 78 | ||
@@ -64,10 +83,2 @@ void TodolistPluginWidget::getTodo() { | |||
64 | 83 | ||
65 | QVBoxLayout* layoutTodo = new QVBoxLayout( this ); | ||
66 | |||
67 | if ( todoLabel ) { | ||
68 | delete todoLabel; | ||
69 | } | ||
70 | |||
71 | todoLabel = new OClickableLabel( this ); | ||
72 | connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); | ||
73 | 84 | ||
@@ -88,3 +99,3 @@ void TodolistPluginWidget::getTodo() { | |||
88 | tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; | 99 | tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; |
89 | ammount++; | 100 | ammount++ ; |
90 | } | 101 | } |
@@ -120,3 +131,2 @@ void TodolistPluginWidget::getTodo() { | |||
120 | todoLabel->setText( output ); | 131 | todoLabel->setText( output ); |
121 | layoutTodo->addWidget( todoLabel ); | ||
122 | } | 132 | } |