summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/todolist/todopluginwidget.cpp
Side-by-side diff
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.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp
index 2a0e5a3..4731b43 100644
--- a/core/pim/today/plugins/todolist/todopluginwidget.cpp
+++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp
@@ -29,8 +29,8 @@
-TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name)
- : QWidget(parent, name ) {
+TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name )
+ : QWidget( parent, name ) {
todoLabel= 0l;
-
todo = 0l;
+
if ( todo ) {
@@ -49,6 +49,7 @@ TodolistPluginWidget::~TodolistPluginWidget() {
+
void TodolistPluginWidget::readConfig() {
- Config cfg( "todaytodolistplugin" );
+ Config cfg( "todaytodoplugin" );
cfg.setGroup( "config" );
- m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 );
+ m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 );
}
@@ -63,3 +64,3 @@ void TodolistPluginWidget::getTodo() {
- if ( todoLabel ) {
+ if ( todoLabel ) {
delete todoLabel;
@@ -69,3 +70,4 @@ void TodolistPluginWidget::getTodo() {
todoLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
- connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) );
+ connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) );
+
QString output;
@@ -77,5 +79,5 @@ void TodolistPluginWidget::getTodo() {
QValueList<ToDoEvent> overDueList = todo->overDue();
- qBubbleSort(overDueList);
+ qBubbleSort( overDueList );
for ( QValueList<ToDoEvent>::Iterator it = overDueList.begin();
- it!=overDueList.end(); ++it ) {
+ it != overDueList.end(); ++it ) {
if (!(*it).isCompleted() && ( ammount < m_maxLinesTask ) ) {
@@ -85,3 +87,3 @@ void TodolistPluginWidget::getTodo() {
}
- tmpout += "<font color=#e00000><b>-" + desc.mid(0, m_maxCharClip) + "</b></font><br>";
+ tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>";
ammount++;
@@ -93,4 +95,4 @@ void TodolistPluginWidget::getTodo() {
qBubbleSort( openTodo );
- for ( QValueList<ToDoEvent>::Iterator it=openTodo.begin();
- it!=openTodo.end(); ++it ) {
+ for ( QValueList<ToDoEvent>::Iterator it = openTodo.begin();
+ it != openTodo.end(); ++it ) {
if ( !(*it).isCompleted() ){
@@ -104,3 +106,3 @@ void TodolistPluginWidget::getTodo() {
}
- tmpout += "<b>-</b>" + desc.mid(0, m_maxCharClip) + "<br>";
+ tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>";
ammount++;
@@ -115,3 +117,3 @@ void TodolistPluginWidget::getTodo() {
} else {
- output += QObject::tr( "There are <b> %1</b> active tasks: <br>" ).arg(count);
+ output += QObject::tr( "There are <b> %1</b> active tasks: <br>" ).arg( count );
}
@@ -120,3 +122,3 @@ void TodolistPluginWidget::getTodo() {
output = QObject::tr( "No active tasks" );
- }
+ }
todoLabel->setText( output );
@@ -129,4 +131,4 @@ void TodolistPluginWidget::getTodo() {
void TodolistPluginWidget::startTodolist() {
- QCopEnvelope e("QPE/System", "execute(QString)");
- e << QString("todolist");
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( "todolist" );
}