summaryrefslogtreecommitdiff
path: root/core/pim/todo/quickeditimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/quickeditimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/quickeditimpl.cpp48
1 files changed, 40 insertions, 8 deletions
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp
index 90ad19e..f700716 100644
--- a/core/pim/todo/quickeditimpl.cpp
+++ b/core/pim/todo/quickeditimpl.cpp
@@ -1,62 +1,94 @@
1/*
2                 This file is part of the Opie Project
3
4 Copyright (C) Opie Team <opie-devel@handhelds.org>
5 =.
6 .=l.
7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17 : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details.
22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA.
29*/
30
1#include <qaction.h> 31#include <qaction.h>
2#include <qlineedit.h> 32#include <qlineedit.h>
3#include <qwhatsthis.h> 33#include <qwhatsthis.h>
4 34
5#include <qpe/resource.h>
6
7#include <opie2/oclickablelabel.h> 35#include <opie2/oclickablelabel.h>
36#include <opie2/oresource.h>
8 37
9#include "mainwindow.h" 38#include "mainwindow.h"
10#include "quickeditimpl.h" 39#include "quickeditimpl.h"
11 40
12 41
13 42
14QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible ) 43QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible )
15 : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) { 44 : QToolBar( (QMainWindow *)parent ), Todo::QuickEdit( (Todo::MainWindow *)parent ) {
16 setHorizontalStretchable( TRUE ); 45 setHorizontalStretchable( TRUE );
17 46
18 // Load priority icons 47 // Load priority icons
19 // TODO - probably should be done globally somewhere else, 48 // TODO - probably should be done globally somewhere else,
20 // see also tableview.cpp/h, taskeditoroverview.cpp/h 49 // see also tableview.cpp/h, taskeditoroverview.cpp/h
21 priority1 = Resource::loadPixmap( "todo/priority1" ); 50 priority1 = Opie::Core::OResource::loadPixmap( "todo/priority1" );
22 priority3 = Resource::loadPixmap( "todo/priority3" ); 51 priority3 = Opie::Core::OResource::loadPixmap( "todo/priority3" );
23 priority5 = Resource::loadPixmap( "todo/priority5" ); 52 priority5 = Opie::Core::OResource::loadPixmap( "todo/priority5" );
24 53
25 m_lbl = new Opie::Ui::OClickableLabel( this ); 54 m_lbl = new Opie::Ui::OClickableLabel( this );
26 m_lbl->setMinimumWidth( 15 ); 55 m_lbl->setMinimumWidth( 15 );
27 m_lbl->setPixmap( priority3 ); 56 m_lbl->setPixmap( priority3 );
28 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); 57 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) );
29 QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 58 QWhatsThis::add( m_lbl, QWidget::tr( "Click here to set the priority of new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
30 59
31 m_edit = new QLineEdit( this ); 60 m_edit = new QLineEdit( this );
32 setStretchableWidget( m_edit ); 61 setStretchableWidget( m_edit );
33 QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 62 QWhatsThis::add( m_edit, QWidget::tr( "Enter description of new task here.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
34 63
35 /* 64 /*
36 * it's not implemented and won't be implemented for 1.0 65 * it's not implemented and won't be implemented for 1.0
37 */ 66 */
38#if 0 67#if 0
39 QAction *a = new QAction( QWidget::tr( "More" ), Resource::loadPixmap( "todo/more" ), QString::null, 0, this, 0 ); 68 QAction *a = new QAction( QWidget::tr( "More" ), Opie::Core::OResource::loadPixmap( "todo/more", Opie::Core::OResource::SmallIcon ),
69 QString::null, 0, this, 0 );
40 connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) ); 70 connect( a, SIGNAL( activated() ), this, SLOT( slotMore() ) );
41 a->addTo( this ); 71 a->addTo( this );
42 a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 72 a->setWhatsThis( QWidget::tr( "Click here to enter additional information for new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
43#endif 73#endif
44 74
45 QAction *a = new QAction( QWidget::tr( "Enter" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); 75 QAction *a = new QAction( QWidget::tr( "Enter" ), Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ),
76 QString::null, 0, this, 0 );
46 connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) ); 77 connect( a, SIGNAL( activated() ), this, SLOT( slotEnter() ) );
47 a->addTo( this ); 78 a->addTo( this );
48 a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 79 a->setWhatsThis( QWidget::tr( "Click here to add new task.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
49 80
50 a = new QAction( QWidget::tr( "Cancel" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 81 a = new QAction( QWidget::tr( "Cancel" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
82 QString::null, 0, this, 0 );
51 connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) ); 83 connect( a, SIGNAL( activated() ), this, SLOT( slotCancel() ) );
52 a->addTo( this ); 84 a->addTo( this );
53 a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) ); 85 a->setWhatsThis( QWidget::tr( "Click here to reset new task information.\n\nThis area is called the quick task bar.\n\nIt allows you to quickly add a new task to your list. This area can be shown or hidden by selecting Options->'Show quick task bar' from the menu above." ) );
54 86
55 m_visible = visible; 87 m_visible = visible;
56 if ( !m_visible ) { 88 if ( !m_visible ) {
57 hide(); 89 hide();
58 } 90 }
59 91
60 m_menu = 0l; 92 m_menu = 0l;
61 reinit(); 93 reinit();
62} 94}