summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp3
-rw-r--r--core/pim/todo/otaskeditor.cpp83
-rw-r--r--core/pim/todo/otaskeditor.h37
-rw-r--r--core/pim/todo/taskeditoradvanced.ui222
-rw-r--r--core/pim/todo/taskeditoralarms.ui148
-rw-r--r--core/pim/todo/taskeditoroverview.ui542
-rw-r--r--core/pim/todo/taskeditoroverviewimpl.cpp169
-rw-r--r--core/pim/todo/taskeditoroverviewimpl.h54
-rw-r--r--core/pim/todo/todo.pro12
-rw-r--r--core/pim/todo/todoeditor.cpp12
-rw-r--r--core/pim/todo/todoentry.ui481
-rw-r--r--core/pim/todo/todoentryimpl.cpp189
-rw-r--r--core/pim/todo/todoentryimpl.h65
13 files changed, 1271 insertions, 746 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 8377573..bf9fc23 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -45,662 +45,663 @@
#include <qpe/qpemessagebox.h>
#include <opie/otodoaccessvcal.h>
#include "quickeditimpl.h"
#include "todotemplatemanager.h"
#include "templateeditor.h"
#include "todoentryimpl.h"
#include "tableview.h"
#include "textviewshow.h"
#include "todoeditor.h"
#include "mainwindow.h"
using namespace Todo;
MainWindow::MainWindow( QWidget* parent,
const char* name ) {
m_syncing = false;
m_counter = 0;
m_tempManager = new TemplateManager();
m_tempManager->load();
initUI();
initConfig();
initViews();
initActions();
initEditor();
initShow();
initTemplate();
populateTemplates();
raiseCurrentView();
QTimer::singleShot(0, this, SLOT(populateCategories() ) );
}
void MainWindow::initTemplate() {
m_curTempEd = new TemplateEditor( this, templateManager() );
}
void MainWindow::initActions() {
QAction* a = new QAction( tr("New Task" ), Resource::loadPixmap( "new" ),
QString::null, 0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotNew() ) );
a->addTo(m_tool );
a->addTo(m_edit );
a = new QAction( tr("Edit Task"), Resource::loadIconSet( "edit" ),
QString::null, 0, this, 0 );
connect(a, SIGNAL(activated() ),
this, SLOT( slotEdit() ) );
a->addTo( m_tool );
a->addTo( m_edit );
m_editAction = a;
a = new QAction( QString::null, tr("View Task"), 0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotShowDetails() ) );
a->addTo( m_edit );
m_edit->insertSeparator();
a = new QAction( tr("Delete..."), Resource::loadIconSet( "trash" ),
QString::null, 0, this, 0 );
connect(a, SIGNAL(activated() ),
this, SLOT(slotDelete() ) );
a->addTo( m_tool );
a->addTo( m_edit );
m_deleteAction = a;
a = new QAction( QString::null, tr("Delete all..."), 0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotDeleteAll() ) );
a->addTo(m_edit );
m_deleteAllAction = a;
a = new QAction( QString::null, tr("Delete completed"),
0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotDeleteCompleted() ) );
a->addTo(m_edit );
a->setEnabled( TRUE );
m_deleteCompleteAction = a;
m_edit->insertSeparator();
a = new QAction( QString::null, tr("Duplicate"), 0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotDuplicate() ) );
a->addTo(m_edit );
m_duplicateAction = a;
m_edit->insertSeparator();
if ( Ir::supported() ) {
a = new QAction( tr( "Beam" ), Resource::loadPixmap( "beam" ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ),
this, SLOT( slotBeam() ) );
a->addTo( m_edit );
a->addTo( m_tool );
}
a = new QAction( tr("Find"), Resource::loadIconSet( "mag" ),
QString::null, 0, this, 0 );
connect(a, SIGNAL( activated() ),
this, SLOT( slotFind() ) );
a->addTo( m_options );
m_findAction = a;
m_options->insertSeparator();
m_completedAction = new QAction( QString::null, tr("Completed tasks"),
0, this, 0, TRUE );
m_completedAction->addTo( m_options );
m_completedAction->setOn( showCompleted() );
connect(m_completedAction, SIGNAL( toggled(bool) ),
this, SLOT(slotShowCompleted(bool) ) );
m_showDeadLineAction = new QAction( QString::null, tr("Show Deadline"),
0, this, 0, TRUE );
m_showDeadLineAction->addTo( m_options );
m_showDeadLineAction->setOn( showDeadline() );
connect(m_showDeadLineAction, SIGNAL(toggled(bool) ),
this, SLOT( slotShowDeadLine( bool ) ) );
m_options->insertSeparator();
m_bar->insertItem( tr("Data") ,m_edit );
m_bar->insertItem( tr("Category"), m_catMenu );
m_bar->insertItem( tr("Options"), m_options );
/* initialize the view menu */
a = new QAction( QString::null, tr("Show over due"),
0, this, 0, TRUE );
a->addTo( m_view );
a->setOn( showOverDue() );
connect(a, SIGNAL(toggled(bool)),
this, SLOT(slotShowDue(bool) ) );
m_view->insertSeparator();
m_bar->insertItem( tr("View"), m_view );
/* templates */
m_edit->insertItem(tr("New from template"), m_template,
-1, 0 );
}
/* m_curCat from Config */
void MainWindow::initConfig() {
Config config( "todo" );
config.setGroup( "View" );
m_completed = config.readBoolEntry( "ShowComplete", TRUE );
m_curCat = config.readEntry( "Category", QString::null );
m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE);
m_overdue = config.readBoolEntry("ShowOverDue", TRUE );
}
void MainWindow::initUI() {
m_mainBox = new QVBox(this, "main box ");
m_curQuick = new QuickEditImpl(this, m_mainBox );
m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) );
m_quickEdit.append( m_curQuick );
m_stack = new QWidgetStack(m_mainBox, "main stack");
setCentralWidget( m_mainBox );
setToolBarsMovable( FALSE );
m_tool = new QToolBar( this );
m_tool->setHorizontalStretchable( TRUE );
m_bar = new QMenuBar( m_tool );
/** QPopupMenu */
m_edit = new QPopupMenu( this );
m_options = new QPopupMenu( this );
m_view = new QPopupMenu( this );
m_catMenu = new QPopupMenu( this );
m_template = new QPopupMenu( this );
m_catMenu->setCheckable( TRUE );
m_template->setCheckable( TRUE );
connect(m_catMenu, SIGNAL(activated(int) ),
this, SLOT(setCategory(int) ) );
connect(m_template, SIGNAL(activated(int) ),
this, SLOT(slotNewFromTemplate(int) ) );
}
void MainWindow::initViews() {
TableView* tableView = new TableView( this, m_stack );
m_stack->addWidget( tableView, m_counter++ );
m_views.append( tableView );
m_curView = tableView;
connectBase( tableView );
/* add QString type + QString configname to
* the View menu
* and subdirs for multiple views
*/
}
void MainWindow::initEditor() {
m_curEdit = new Editor();
}
void MainWindow::initShow() {
m_curShow = new TextViewShow(this);
m_stack->addWidget( m_curShow->widget() , m_counter++ );
}
MainWindow::~MainWindow() {
delete templateManager();
}
void MainWindow::connectBase( ViewBase* base) {
base->connectShow( this, SLOT(slotShow(int) ) );
base->connectEdit( this, SLOT(slotEdit(int) ) );
base->connectUpdateSmall( this,
SLOT(slotUpate1(int, const Todo::SmallTodo&) ));
base->connectUpdateBig( this,
SLOT(slotUpate2(int, const OTodo& ) ) );
base->connectUpdateView( this, SLOT(slotUpdate3( QWidget* ) ) ) ;
base->connectRemove(&m_todoMgr,
SLOT(remove(int)) );
}
QPopupMenu* MainWindow::contextMenu( int uid ) {
QPopupMenu* menu = new QPopupMenu();
m_editAction->addTo( menu );
m_deleteAction->addTo( menu );
m_duplicateAction->addTo( menu );
menu->insertSeparator();
return menu;
}
QPopupMenu* MainWindow::options() {
qWarning("Options");
return m_options;
}
QPopupMenu* MainWindow::edit() {
return m_edit;
}
QPopupMenu* MainWindow::view() {
return m_view;
}
QToolBar* MainWindow::toolbar() {
return m_tool;
}
OTodoAccess::List MainWindow::list()const {
return m_todoMgr.list();
}
OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) {
int cat = 0;
if ( m_curCat != tr("All Categories") )
cat = currentCatId();
int filter = 1;
if (!m_completed )
filter |= 4;
if (m_overdue)
filter |= 2;
return m_todoMgr.sorted( asc, sortOrder, filter, cat );
}
OTodoAccess::List MainWindow::sorted( bool asc, int sortOrder, int addFilter) {
int cat = 0;
if ( m_curCat != tr("All Categories") )
cat = currentCatId();
return m_todoMgr.sorted(asc, sortOrder, addFilter, cat );
}
OTodo MainWindow::event( int uid ) {
return m_todoMgr.event( uid );
}
bool MainWindow::isSyncing()const {
return m_syncing;
}
TemplateManager* MainWindow::templateManager() {
return m_tempManager;
}
Editor* MainWindow::currentEditor() {
return m_curEdit;
}
TodoShow* MainWindow::currentShow() {
return m_curShow;
}
void MainWindow::slotReload() {
m_todoMgr.reload();
currentView()->updateView( );
raiseCurrentView();
}
void MainWindow::closeEvent( QCloseEvent* e ) {
if (m_stack->visibleWidget() == currentShow()->widget() ) {
raiseCurrentView();
e->ignore();
return;
}
/*
* we should have flushed and now we're still saving
* so there is no need to flush
*/
if (m_syncing ) {
e->accept();
return;
}
bool quit = false;
if ( m_todoMgr.saveAll() ){
qWarning("saved");
quit = true;
}else {
if ( QMessageBox::critical( this, tr("Out of space"),
tr("Todo was unable\n"
"to save your changes.\n"
"Free up some space\n"
"and try again.\n"
"\nQuit Anyway?"),
QMessageBox::Yes|QMessageBox::Escape,
QMessageBox::No|QMessageBox::Default)
!= QMessageBox::No ) {
e->accept();
quit = true;
}else
e->ignore();
}
if (quit ) {
Config config( "todo" );
config.setGroup( "View" );
config.writeEntry( "ShowComplete", showCompleted() );
config.writeEntry( "Category", currentCategory() );
config.writeEntry( "ShowDeadLine", showDeadline());
config.writeEntry( "ShowOverDue", showOverDue() );
/* svae templates */
templateManager()->save();
e->accept();
}
}
void MainWindow::populateTemplates() {
m_template->clear();
QStringList list = templateManager()->templates();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
m_template->insertItem( (*it) );
}
}
/*
* slotNewFromTemplate
* We use the edit widget to do
* the config but we setUid(-1)
* to get a new uid
*/
/*
* first we get the name of the template
* then we will use the TemplateManager
*/
void MainWindow::slotNewFromTemplate( int id ) {
QString name = m_template->text( id );
OTodo event = templateManager()->templateEvent( name );
event = currentEditor()->edit(this,
event );
if ( currentEditor()->accepted() ) {
/* assign new todo */
event.setUid( -1 );
currentView()->addEvent( event );
m_todoMgr.add( event );
populateCategories();
}
}
void MainWindow::slotNew() {
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
OTodo todo = currentEditor()->newTodo( currentCatId(),
this );
if ( currentEditor()->accepted() ) {
//todo.assignUid();
- currentView()->addEvent( todo );
m_todoMgr.add( todo );
+ currentView()->addEvent( todo );
+
// I'm afraid we must call this every time now, otherwise
// spend expensive time comparing all these strings...
// but only call if we changed something -zecke
populateCategories();
}
raiseCurrentView( );
}
void MainWindow::slotDuplicate() {
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
OTodo ev = m_todoMgr.event( currentView()->current() );
/* let's generate a new uid */
ev.setUid(-1);
m_todoMgr.add( ev );
currentView()->addEvent( ev );
raiseCurrentView();
}
void MainWindow::slotDelete() {
if (!currentView()->current() )
return;
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
QString strName = currentView()->currentRepresentation();
if (!QPEMessageBox::confirmDelete(this, tr("Todo"), strName ) )
return;
m_todoMgr.remove( currentView()->current() );
currentView()->removeEvent( currentView()->current() );
raiseCurrentView();
}
void MainWindow::slotDeleteAll() {
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
//QString strName = table->text( table->currentRow(), 2 ).left( 30 );
if ( !QPEMessageBox::confirmDelete( this, tr( "Todo" ), tr("all tasks?") ) )
return;
m_todoMgr.removeAll();
currentView()->clear();
raiseCurrentView();
}
void MainWindow::slotDeleteCompleted() {
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
if ( !QPEMessageBox::confirmDelete( this, tr( "Todo" ), tr("all completed tasks?") ) )
return;
// FIXME
//m_todoMgr.remove( currentView()->completed() );
currentView()->updateView( );
}
void MainWindow::slotFind() {
}
void MainWindow::slotEdit() {
slotEdit( currentView()->current() );
}
/*
* set the category
*/
void MainWindow::setCategory( int c) {
if ( c <= 0 ) return;
qWarning("Iterating over cats %d", c );
for ( unsigned int i = 1; i < m_catMenu->count(); i++ )
m_catMenu->setItemChecked(i, c == (int)i );
if (c == 1 ) {
m_curCat = QString::null;
setCaption( tr("Todo") + " - " + tr("All Categories" ) );
}else if ( c == (int)m_catMenu->count() - 1 ) {
m_curCat = tr("Unfiled");
setCaption( tr("Todo") + " - " + tr("Unfiled") );
}else {
m_curCat = m_todoMgr.categories()[c-2];
setCaption( tr("Todo") + " - " + m_curCat );
}
m_catMenu->setItemChecked( c, true );
currentView()->setShowCategory( m_curCat );
raiseCurrentView();
}
void MainWindow::slotShowDeadLine( bool dead) {
m_deadline = dead;
currentView()->setShowDeadline( dead );
}
void MainWindow::slotShowCompleted( bool show) {
m_completed = show;
currentView()->setShowCompleted( m_completed );
}
bool MainWindow::showOverDue()const {
return m_overdue;
}
void MainWindow::setDocument( const QString& fi) {
DocLnk doc(fi);
if (doc.isValid() )
receiveFile(doc.file() );
else
receiveFile(fi );
}
static const char *beamfile = "/tmp/opie-todo.vcs";
void MainWindow::slotBeam() {
::unlink( beamfile );
OTodo todo = event( currentView()->current() );
OTodoAccessVCal* cal = new OTodoAccessVCal(QString::fromLatin1(beamfile) );
OTodoAccess acc( cal );
acc.load();
acc.add( todo );
acc.save();
Ir* ir = new Ir(this );
connect(ir, SIGNAL(done(Ir*) ),
this, SLOT(beamDone(Ir*) ) );
ir->send( beamfile, todo.summary(), "text/x-vCalendar" );
}
void MainWindow::beamDone( Ir* ir) {
delete ir;
::unlink( beamfile );
}
void MainWindow::receiveFile( const QString& filename ) {
OTodoAccessVCal* cal = new OTodoAccessVCal(filename );
OTodoAccess acc( cal );
acc.load();
OTodoAccess::List list = acc.allRecords();
QString message = tr("<P>%1 new tasks arrived.<p>Would you like to add them to your Todolist?").arg(list.count() );
if ( QMessageBox::information(this, tr("New Tasks"),
message, QMessageBox::Ok,
QMessageBox::Cancel ) == QMessageBox::Ok ) {
OTodoAccess::List::Iterator it;
for ( it = list.begin(); it != list.end(); ++it )
m_todoMgr.add( (*it) );
currentView()->updateView();
}
}
void MainWindow::slotFlush() {
m_syncing = FALSE;
m_todoMgr.save();
}
void MainWindow::slotShowDetails() {
slotShow( currentView()->current() );
}
/*
* populate the Categories
* Menu
*/
void MainWindow::populateCategories() {
m_todoMgr.load();
m_catMenu->clear();
int id, rememberId;
id = 1;
rememberId = 1;
m_catMenu->insertItem( tr( "All Categories" ), id++ );
m_catMenu->insertSeparator();
QStringList categories = m_todoMgr.categories();
categories.append( tr( "Unfiled" ) );
for ( QStringList::Iterator it = categories.begin();
it != categories.end(); ++it ) {
m_catMenu->insertItem( *it, id );
if ( *it == currentCategory() )
rememberId = id;
++id;
}
setCategory( rememberId );
}
bool MainWindow::showCompleted()const {
return m_completed;
}
bool MainWindow::showDeadline()const {
return m_deadline;
}
QString MainWindow::currentCategory()const {
return m_curCat;
}
int MainWindow::currentCatId() {
return m_todoMgr.catId( m_curCat );
}
ViewBase* MainWindow::currentView() {
return m_curView;
}
void MainWindow::raiseCurrentView() {
m_stack->raiseWidget( m_curView->widget() );
}
void MainWindow::slotShowDue(bool ov) {
m_overdue = ov;
currentView()->showOverDue( ov );
raiseCurrentView();
}
void MainWindow::slotShow( int uid ) {
qWarning("slotShow");
currentShow()->slotShow( event( uid ) );
m_stack->raiseWidget( currentShow()->widget() );
}
void MainWindow::slotEdit( int uid ) {
if(m_syncing) {
QMessageBox::warning(this, tr("Todo"),
tr("Can not edit data, currently syncing"));
return;
}
OTodo todo = m_todoMgr.event( uid );
todo = currentEditor()->edit(this, todo );
/* if completed */
if ( currentEditor()->accepted() ) {
qWarning("Replacing now" );
m_todoMgr.update( todo.uid(), todo );
currentView()->replaceEvent( todo );
/* a Category might have changed */
populateCategories();
}
raiseCurrentView();
}
/*
void MainWindow::slotUpdate1( int uid, const SmallTodo& ev) {
m_todoMgr.update( uid, ev );
}
*/
void MainWindow::updateTodo( const OTodo& ev) {
m_todoMgr.update( ev.uid() , ev );
}
/* The view changed it's configuration
* update the view menu
*/
void MainWindow::slotUpdate3( QWidget* ) {
}
void MainWindow::updateList() {
m_todoMgr.updateList();
}
void MainWindow::setReadAhead( uint count ) {
if (m_todoMgr.todoDB() )
m_todoMgr.todoDB()->setReadAhead( count );
}
void MainWindow::slotQuickEntered() {
qWarning("entered");
OTodo todo = quickEditor()->todo();
if (todo.isEmpty() )
return;
m_todoMgr.add( todo );
currentView()->addEvent( todo );
raiseCurrentView();
}
QuickEditBase* MainWindow::quickEditor() {
return m_curQuick;
}
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
new file mode 100644
index 0000000..e8e922f
--- a/dev/null
+++ b/core/pim/todo/otaskeditor.cpp
@@ -0,0 +1,83 @@
+#include <qdatetime.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qmultilineedit.h>
+
+#include <opie/orecurrancewidget.h>
+
+#include "taskeditoroverviewimpl.h"
+#include "taskeditoradvanced.h"
+#include "taskeditoralarms.h"
+
+#include "otaskeditor.h"
+
+OTaskEditor::OTaskEditor(int cur)
+ : QDialog(0, 0, TRUE ) {
+ init();
+ OTodo to;
+ to.setCategories( cur );
+ load(to);
+ m_uid = 1; // generate a new one
+}
+OTaskEditor::OTaskEditor( const OTodo& to)
+ : QDialog(0, 0, TRUE ) {
+ init();
+ load( to );
+ m_uid = to.uid();
+}
+OTaskEditor::~OTaskEditor() {
+
+}
+OTodo OTaskEditor::todo()const{
+ qWarning("saving!");
+ OTodo to;
+ to.setUid(m_uid );
+ m_overView->save( to );
+ to.setDescription( m_line->text() );
+
+ return to;
+}
+void OTaskEditor::load(const OTodo& to) {
+ m_overView->load( to );
+ m_line->setText( to.description() );
+}
+void OTaskEditor::init() {
+ QVBoxLayout* lay = new QVBoxLayout(this);
+ setCaption("Task Editor");
+ m_tab = new OTabWidget(this);
+
+ /*
+ * Add the Widgets
+ */
+ m_overView = new TaskEditorOverViewImpl(m_tab );
+ m_tab->addTab( m_overView, QString::null, tr("Overview") );
+
+ m_adv = new TaskEditorAdvanced( m_tab );
+ m_line = new QMultiLineEdit(m_adv );
+ QLabel* label = new QLabel(m_adv );
+ label->setText( tr("Description") );
+ ((QGridLayout*) m_adv->layout() )->addWidget( label,3, 0 );
+ ((QGridLayout*) m_adv->layout())->addWidget( m_line,4,0 );
+ m_tab->addTab( m_adv, QString::null, tr("Advanced") );
+
+ m_alarm = new TaskEditorAlarms( m_tab );
+ m_tab->addTab( m_alarm, QString::null, tr("Alarms") );
+
+ m_remind = new TaskEditorAlarms( m_tab );
+ m_tab->addTab( m_remind, QString::null, tr("Reminders") );
+
+ QLabel* lbl = new QLabel(m_tab );
+ lbl->setText( tr("X-Ref") );
+ m_tab->addTab( lbl, QString::null, tr("X-Ref") );
+
+ m_rec = new ORecurranceWidget( true, QDate::currentDate(), this );
+ m_tab->addTab( m_rec, QString::null, tr("Recurrance") );
+
+ lay->addWidget(m_tab );
+
+ /* signal and slots */
+ connect(m_overView, SIGNAL(recurranceEnabled(bool) ),
+ m_rec, SLOT(setEnabled(bool) ) );
+
+ m_tab->setCurrentTab( m_overView );
+}
diff --git a/core/pim/todo/otaskeditor.h b/core/pim/todo/otaskeditor.h
new file mode 100644
index 0000000..5842fdc
--- a/dev/null
+++ b/core/pim/todo/otaskeditor.h
@@ -0,0 +1,37 @@
+#ifndef OPIE_TASK_EDITOR_H
+#define OPIE_TASK_EDITOR_H
+
+#include <qdialog.h>
+
+#include <opie/otodo.h>
+#include <opie/otabwidget.h>
+
+class TaskEditorOverViewImpl;
+class TaskEditorAdvanced;
+class TaskEditorAlarms;
+class ORecurranceWidget;
+class QMultiLineEdit;
+class OTaskEditor : public QDialog {
+ Q_OBJECT
+public:
+ OTaskEditor(int cur);
+ OTaskEditor( const OTodo& todo );
+ ~OTaskEditor();
+
+ OTodo todo()const;
+private:
+ void load( const OTodo& );
+ void init();
+
+ OTabWidget *m_tab;
+ TaskEditorOverViewImpl* m_overView;
+ TaskEditorAdvanced *m_adv;
+ TaskEditorAlarms *m_alarm;
+ TaskEditorAlarms* m_remind;
+ ORecurranceWidget* m_rec;
+ QMultiLineEdit* m_line;
+ int m_uid;
+
+};
+
+#endif
diff --git a/core/pim/todo/taskeditoradvanced.ui b/core/pim/todo/taskeditoradvanced.ui
new file mode 100644
index 0000000..3ea1346
--- a/dev/null
+++ b/core/pim/todo/taskeditoradvanced.ui
@@ -0,0 +1,222 @@
+<!DOCTYPE UI><UI>
+<class>TaskEditorAdvanced</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TaskEditorAdvanced</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>236</width>
+ <height>307</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form2</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>8</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout13</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblState</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>State:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Started</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Postponed</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Finished</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Not started</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbState</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout17</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblMaintainer</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Maintainer</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtMaintainer</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>test</string>
+ </property>
+ <property stdset="1">
+ <name>textFormat</name>
+ <enum>RichText</enum>
+ </property>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout16</cstring>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QToolButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tbtMaintainer</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>...</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout4</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtMode</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Maintain Mode:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Responsible</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Done By</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Coordinating</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbMode</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+</UI>
diff --git a/core/pim/todo/taskeditoralarms.ui b/core/pim/todo/taskeditoralarms.ui
new file mode 100644
index 0000000..ab21796
--- a/dev/null
+++ b/core/pim/todo/taskeditoralarms.ui
@@ -0,0 +1,148 @@
+<!DOCTYPE UI><UI>
+<class>TaskEditorAlarms</class>
+<author>zecke</author>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TaskEditorAlarms</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>195</width>
+ <height>271</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form3</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>8</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout19</cstring>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtAlarm</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>empty</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QListView</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lstAlarms</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout23</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>alAdd</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Add</string>
+ </property>
+ <property stdset="1">
+ <name>autoResize</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>alEdit</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Edit</string>
+ </property>
+ <property stdset="1">
+ <name>autoResize</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>alRemove</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&amp;Remove</string>
+ </property>
+ <property stdset="1">
+ <name>autoResize</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+</UI>
diff --git a/core/pim/todo/taskeditoroverview.ui b/core/pim/todo/taskeditoroverview.ui
new file mode 100644
index 0000000..a6bf645
--- a/dev/null
+++ b/core/pim/todo/taskeditoroverview.ui
@@ -0,0 +1,542 @@
+<!DOCTYPE UI><UI>
+<class>TaskEditorOverView</class>
+<author>zecke</author>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TaskEditorOverView</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>308</width>
+ <height>445</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form1</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>4</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="5" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtPrio</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Priority</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>1 - Very High</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>2 - High</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>3 - Normal</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>4 - Low</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>5 - Very Low</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbPrio</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="4" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtProgress</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Progress</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>0 %</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>20 %</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>40 %</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>60 %</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>80 %</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>100 %</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbProgress</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="2" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout9</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ckbDue</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Due Date:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>btnDue</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>1 Januar 2002</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout8</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ckbStart</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Start Date:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>btnStart</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>1 Januar 2001</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="0" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout7</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblSum</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Summary</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Complete</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>work on</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>buy</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>organize</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>get</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Update</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Create</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Plan</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Call</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Mail</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>cmbSum</cstring>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="3" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ckbComp</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Completed Date</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>btnComp</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>1 Januar 2002</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="6" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ckbCompleted</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Completed</string>
+ </property>
+ </widget>
+ <widget row="7" column="0" rowspan="1" colspan="2" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout12</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>txtCategory</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Category</string>
+ </property>
+ </widget>
+ <widget>
+ <class>CategorySelect</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>comboCategory</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>60</width>
+ <height>20</height>
+ </size>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget row="8" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CheckBox7</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Enable Recurrance</string>
+ </property>
+ </widget>
+ <spacer row="9" column="1" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>CategorySelect</class>
+ <header location="global">qpe/categoryselect.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>7</hordata>
+ <verdata>1</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>ckbStart</sender>
+ <signal>clicked()</signal>
+ <receiver>TaskEditorOverView</receiver>
+ <slot>slotStartChecked()</slot>
+ </connection>
+ <connection>
+ <sender>ckbDue</sender>
+ <signal>clicked()</signal>
+ <receiver>TaskEditorOverView</receiver>
+ <slot>slotDueChecked()</slot>
+ </connection>
+ <connection>
+ <sender>ckbComp</sender>
+ <signal>clicked()</signal>
+ <receiver>TaskEditorOverView</receiver>
+ <slot>slotCompletedChecked()</slot>
+ </connection>
+ <slot access="protected">slotCompletedChecked()</slot>
+ <slot access="protected">slotDueChecked()</slot>
+ <slot access="protected">slotStartChecked()</slot>
+</connections>
+</UI>
diff --git a/core/pim/todo/taskeditoroverviewimpl.cpp b/core/pim/todo/taskeditoroverviewimpl.cpp
new file mode 100644
index 0000000..b9b2ae6
--- a/dev/null
+++ b/core/pim/todo/taskeditoroverviewimpl.cpp
@@ -0,0 +1,169 @@
+#include <qapplication.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qpopupmenu.h>
+
+#include <qpe/datebookmonth.h>
+#include <qpe/categoryselect.h>
+#include <qpe/timestring.h>
+
+#include "taskeditoroverviewimpl.h"
+
+/*
+ * we need to hack
+ */
+
+TaskEditorOverViewImpl::TaskEditorOverViewImpl( QWidget* parent, const char* name )
+ : TaskEditorOverView( parent, name ) {
+ init();
+}
+TaskEditorOverViewImpl::~TaskEditorOverViewImpl() {
+}
+void TaskEditorOverViewImpl::load( const OTodo& todo) {
+ QDate date = QDate::currentDate();
+ QString str = TimeString::longDateString( date );
+
+ emit recurranceEnabled( FALSE );
+ ckbStart->setChecked( FALSE );
+ btnStart->setText( str );
+
+ ckbComp->setChecked( FALSE );
+ btnComp->setText( str );
+
+ cmbProgress->setCurrentItem( todo.progress()/20 );
+ cmbSum->insertItem( todo.summary(), 0 );
+ cmbSum->setCurrentItem( 0 );
+
+ ckbDue->setChecked( todo.hasDueDate() );
+ btnDue->setText( TimeString::longDateString( todo.dueDate() ) );
+
+ cmbPrio->setCurrentItem( todo.priority() -1 );
+ ckbCompleted->setChecked( todo.isCompleted() );
+
+ comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") );
+
+}
+void TaskEditorOverViewImpl::save( OTodo& to) {
+ qWarning("save it now");
+ if ( ckbDue->isChecked() ) {
+ to.setDueDate( m_due );
+ to.setHasDueDate( true );
+ }else
+ to.setHasDueDate( false );
+ if ( comboCategory->currentCategory() != -1 ) {
+ QArray<int> arr = comboCategory->currentCategories();
+ to.setCategories( arr );
+ }
+ to.setPriority( cmbPrio->currentItem() + 1 );
+ to.setCompleted( ckbCompleted->isChecked() );
+ to.setSummary( cmbSum->currentText() );
+ to.setProgress( cmbProgress->currentItem() * 20 );
+}
+/*
+ * here we will init the basic view
+ * one Popup for each Date Button
+ * and some other signal and slots connection
+ */
+void TaskEditorOverViewImpl::init() {
+ QDate curDate = QDate::currentDate();
+ m_start = m_comp = m_due = curDate;
+ QString str = TimeString::longDateString( curDate );
+
+ /* Start Date Picker */
+ m_startPop = new QPopupMenu(this);
+ m_startBook = new DateBookMonth(m_startPop, 0, TRUE );
+ m_startPop->insertItem( m_startBook );
+ connect( m_startBook, SIGNAL( dateClicked(int, int, int) ),
+ this, SLOT(slotStartChanged(int, int, int) ) );
+
+
+ /* Due Date Picker */
+ m_duePop = new QPopupMenu(this);
+ m_dueBook = new DateBookMonth(m_duePop, 0, TRUE );
+ m_duePop->insertItem( m_dueBook );
+ connect( m_dueBook, SIGNAL( dateClicked(int, int, int) ),
+ this, SLOT(slotDueChanged(int, int, int) ) );
+
+ m_compPop = new QPopupMenu(this);
+ m_compBook = new DateBookMonth(m_compPop, 0, TRUE );
+ m_compPop->insertItem(m_compBook );
+ connect( m_compBook, SIGNAL(dateClicked(int, int, int) ),
+ this, SLOT(slotCompletedChanged(int, int, int) ) );
+
+
+ /*
+ * another part of the hack
+ * it's deprecated in Qt2 but
+ * still available in my qt-copy of Qt3.1beta2
+ */
+ btnDue->setIsMenuButton( TRUE );
+ btnStart->setIsMenuButton( TRUE );
+ btnComp->setIsMenuButton( TRUE );
+
+ /* now connect the hack */
+ connect(btnDue, SIGNAL(clicked() ),
+ this, SLOT(hackySlotHack2() ) );
+ connect(btnStart, SIGNAL(clicked() ),
+ this, SLOT(hackySlotHack1() ) );
+ connect(btnComp, SIGNAL(clicked() ),
+ this, SLOT(hackySlotHack3() ) );
+
+ /* recurrance */
+ connect(CheckBox7, SIGNAL(clicked() ),
+ this, SLOT(slotRecClicked() ) );
+}
+
+void TaskEditorOverViewImpl::slotStartChecked() {
+ qWarning("slotStartChecked");
+ btnStart->setEnabled( ckbStart->isChecked() );
+}
+void TaskEditorOverViewImpl::slotStartChanged(int y, int m, int d) {
+ m_start.setYMD( y, m, d );
+ btnStart->setText( TimeString::longDateString( m_start ) );
+}
+void TaskEditorOverViewImpl::slotDueChecked() {
+ btnDue->setEnabled( ckbDue->isChecked() );
+ qWarning("slotDueChecked");
+}
+void TaskEditorOverViewImpl::slotDueChanged(int y, int m, int d ) {
+ m_due.setYMD(y, m, d );
+ btnDue->setText( TimeString::longDateString( m_due ) );
+}
+void TaskEditorOverViewImpl::slotCompletedChecked() {
+ btnComp->setEnabled( ckbComp->isChecked() );
+ qWarning("slotCompletedChecked");
+}
+void TaskEditorOverViewImpl::slotCompletedChanged(int y, int m, int d) {
+ m_comp.setYMD( y, m, d );
+ btnComp->setText( TimeString::longDateString( m_comp ) );
+}
+/*
+ * called by a button pressed event...
+ * three slots to avoid ugly name() tests
+ * to sender()
+ */
+void TaskEditorOverViewImpl::hackySlotHack1() {
+ btnStart->setDown( FALSE );
+ popup( btnStart, m_startPop );
+}
+void TaskEditorOverViewImpl::hackySlotHack2() {
+ btnDue->setDown( FALSE );
+ popup( btnDue, m_duePop );
+}
+void TaskEditorOverViewImpl::hackySlotHack3() {
+ btnComp->setDown( FALSE );
+ popup( btnComp, m_compPop );
+}
+void TaskEditorOverViewImpl::slotRecClicked() {
+ qWarning("enabled recurrance");
+ emit recurranceEnabled( CheckBox7->isChecked() );
+}
+/*
+ * GPL from TT QPushButton code
+ */
+void TaskEditorOverViewImpl::popup( QPushButton* pu, QPopupMenu* pop) {
+ if ( pu->mapToGlobal( QPoint(0, pu->rect().bottom() ) ).y() + pop->sizeHint().height() <= qApp->desktop()->height() )
+ pop->exec( pu->mapToGlobal( pu->rect().bottomLeft() ) );
+ else
+ pop->exec( pu->mapToGlobal( pu->rect().topLeft() - QPoint(0, pu->sizeHint().height() ) ) );
+}
diff --git a/core/pim/todo/taskeditoroverviewimpl.h b/core/pim/todo/taskeditoroverviewimpl.h
new file mode 100644
index 0000000..4fab381
--- a/dev/null
+++ b/core/pim/todo/taskeditoroverviewimpl.h
@@ -0,0 +1,54 @@
+#ifndef OPIE_TASK_EDITOR_VIEW_IMPL_H
+#define OPIE_TASK_EDITOR_VIEW_IMPL_H
+
+#include <qsize.h>
+
+#include <opie/otodo.h>
+
+#include "taskeditoroverview.h"
+
+class DateBookMonth;
+class QPushButton;
+class QPopupMenu;
+class TaskEditorOverViewImpl : public TaskEditorOverView {
+ Q_OBJECT
+public:
+ TaskEditorOverViewImpl(QWidget* parent, const char* name = 0);
+ ~TaskEditorOverViewImpl();
+
+ void load( const OTodo& );
+ void save( OTodo& );
+signals:
+ void recurranceEnabled( bool );
+
+private:
+ void init();
+ void popup(QPushButton*, QPopupMenu*);
+ DateBookMonth* m_dueBook;
+ DateBookMonth* m_startBook;
+ DateBookMonth* m_compBook;
+ QDate m_start;
+ QDate m_comp;
+ QDate m_due;
+ QPopupMenu* m_startPop;
+ QPopupMenu* m_compPop;
+ QPopupMenu* m_duePop;
+ bool m_bDue : 1;
+
+private slots:
+ void slotStartChecked();
+ void slotStartChanged(int, int, int );
+ void slotDueChecked();
+ void slotDueChanged(int, int, int );
+ void slotCompletedChecked();
+ void slotCompletedChanged(int, int, int );
+
+ void hackySlotHack1();
+ void hackySlotHack2();
+ void hackySlotHack3();
+
+ void slotRecClicked();
+};
+
+
+#endif
diff --git a/core/pim/todo/todo.pro b/core/pim/todo/todo.pro
index d432e78..8f21416 100644
--- a/core/pim/todo/todo.pro
+++ b/core/pim/todo/todo.pro
@@ -1,59 +1,61 @@
TEMPLATE = app
CONFIG = qt warn_on release
DESTDIR = $(OPIEDIR)/bin
HEADERS = smalltodo.h \
todomanager.h \
mainwindow.h \
todoview.h \
- todoentryimpl.h \
tableview.h \
tableitems.h \
todotemplatemanager.h \
todoeditor.h \
todoshow.h \
textviewshow.h \
templateeditor.h \
templatedialog.h \
templatedialogimpl.h \
quickedit.h \
- quickeditimpl.h
+ quickeditimpl.h \
+ otaskeditor.h \
+ taskeditoroverviewimpl.h
SOURCES = smalltodo.cpp \
todomanager.cpp \
mainwindow.cpp \
main.cpp \
- todoentryimpl.cpp \
tableview.cpp \
tableitems.cpp \
todoview.cpp \
todotemplatemanager.cpp \
todoeditor.cpp \
todoshow.cpp \
textviewshow.cpp \
templateeditor.cpp \
templatedialog.cpp \
templatedialogimpl.cpp \
quickeditimpl.cpp \
- quickedit.cpp
+ quickedit.cpp \
+ otaskeditor.cpp \
+ taskeditoroverviewimpl.cpp
-INTERFACES = todoentry.ui
+INTERFACES = taskeditoradvanced.ui taskeditoralarms.ui taskeditoroverview.ui
TARGET = todolist
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
TRANSLATIONS = ../../../i18n/de/todolist.ts \
../../../i18n/en/todolist.ts \
../../../i18n/es/todolist.ts \
../../../i18n/fr/todolist.ts \
../../../i18n/hu/todolist.ts \
../../../i18n/ja/todolist.ts \
../../../i18n/ko/todolist.ts \
../../../i18n/no/todolist.ts \
../../../i18n/pl/todolist.ts \
../../../i18n/pt/todolist.ts \
../../../i18n/pt_BR/todolist.ts \
../../../i18n/sl/todolist.ts \
../../../i18n/zh_CN/todolist.ts \
../../../i18n/zh_TW/todolist.ts
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp
index c9ade20..e19ab8d 100644
--- a/core/pim/todo/todoeditor.cpp
+++ b/core/pim/todo/todoeditor.cpp
@@ -1,53 +1,55 @@
-#include "todoentryimpl.h"
+#include "otaskeditor.h"
#include "todoeditor.h"
using namespace Todo;
Editor::Editor() {
m_accepted = false;
}
Editor::~Editor() {
}
OTodo Editor::newTodo( int cur,
QWidget* par) {
- NewTaskDialog e( cur, par, 0, TRUE );
+ OTaskEditor e( cur);
#if defined(Q_WS_QWS) || defined(_WS_QWS_)
e.showMaximized();
#endif
int ret = e.exec();
if ( QDialog::Accepted == ret ) {
m_accepted = true;
}else
m_accepted = false;
- OTodo ev = e.todoEntry();
+ OTodo ev = e.todo();
+ qWarning("Todo uid");
+ qWarning("Todo %s %d %d", ev.summary().latin1(), ev.progress(), ev.isCompleted() );
ev.setUid(1);
return ev;
}
OTodo Editor::edit( QWidget *wid,
const OTodo& todo ) {
- NewTaskDialog e( todo, wid, 0, TRUE );
+ OTaskEditor e( todo );
e.setCaption( QObject::tr( "Edit Task" ) );
#if defined(Q_WS_QWS) || defined(_WS_QWS_)
e.showMaximized();
#endif
int ret = e.exec();
- OTodo ev = e.todoEntry();
+ OTodo ev = e.todo();
if ( ret == QDialog::Accepted )
m_accepted = true;
else
m_accepted = false;
return ev;
}
bool Editor::accepted()const {
return m_accepted;
}
diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui
deleted file mode 100644
index 60547f2..0000000
--- a/core/pim/todo/todoentry.ui
+++ b/dev/null
@@ -1,481 +0,0 @@
-<!DOCTYPE UI><UI>
-<class>NewTaskDialogBase</class>
-<comment>*********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-**
-** This file is part of Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-*********************************************************************</comment>
-<widget>
- <class>QDialog</class>
- <property stdset="1">
- <name>name</name>
- <cstring>NewTaskDialogBase</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>0</x>
- <y>0</y>
- <width>239</width>
- <height>320</height>
- </rect>
- </property>
- <property stdset="1">
- <name>caption</name>
- <string>New Task</string>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <vbox>
- <property stdset="1">
- <name>margin</name>
- <number>4</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>4</number>
- </property>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout19</cstring>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <grid>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>4</number>
- </property>
- <widget row="3" column="1" >
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout6</cstring>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>4</number>
- </property>
- <widget>
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>0%</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>20%</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>40%</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>60%</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>80%</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>100%</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>cmbProg</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>maximumSize</name>
- <size>
- <width>32767</width>
- <height>32767</height>
- </size>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>checkCompleted</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>&amp;Completed</string>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget row="0" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Priority:</string>
- </property>
- </widget>
- <widget row="4" column="1" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>buttonDate</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>1 Jan 2001</string>
- </property>
- </widget>
- <widget row="3" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>txtProg</cstring>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>MShape</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>MShadow</enum>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Progress:</string>
- </property>
- </widget>
- <widget row="2" column="1" >
- <class>QPushButton</class>
- <property stdset="1">
- <name>name</name>
- <cstring>selectGroupButton</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Select</string>
- </property>
- </widget>
- <widget row="2" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>txtProg_2</cstring>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>MShape</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>MShadow</enum>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Group:</string>
- </property>
- </widget>
- <widget row="4" column="0" >
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>checkDate</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>D&amp;ue</string>
- </property>
- </widget>
- <widget row="1" column="1" >
- <class>CategorySelect</class>
- <property stdset="1">
- <name>name</name>
- <cstring>comboCategory</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>minimumSize</name>
- <size>
- <width>60</width>
- <height>20</height>
- </size>
- </property>
- </widget>
- <widget row="0" column="1" >
- <class>QComboBox</class>
- <item>
- <property>
- <name>text</name>
- <string>1 - Very High</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>2 - High</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>3 - Normal</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>4 - Low</string>
- </property>
- </item>
- <item>
- <property>
- <name>text</name>
- <string>5 - Very Low</string>
- </property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>comboPriority</cstring>
- </property>
- <property stdset="1">
- <name>currentItem</name>
- <number>2</number>
- </property>
- </widget>
- <widget row="5" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel1</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Summary:</string>
- </property>
- </widget>
- <widget row="1" column="0" >
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel3</cstring>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Category:</string>
- </property>
- </widget>
- <widget row="5" column="1" >
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout8</cstring>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>4</number>
- </property>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>lneSum</cstring>
- </property>
- </widget>
- <widget>
- <class>OClickableLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>lblDown</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>minimumSize</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- <property stdset="1">
- <name>maximumSize</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </widget>
- </hbox>
- </widget>
- </grid>
- </widget>
- <widget>
- <class>QMultiLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>txtTodo</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>wordWrap</name>
- <enum>WidgetWidth</enum>
- </property>
- </widget>
- </vbox>
-</widget>
-<customwidgets>
- <customwidget>
- <class>CategorySelect</class>
- <header location="global">qpe/categoryselect.h</header>
- <sizehint>
- <width>-1</width>
- <height>-1</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>7</hordata>
- <verdata>1</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- </customwidget>
- <customwidget>
- <class>OClickableLabel</class>
- <header location="global">opie/oclickablelabel.h</header>
- <sizehint>
- <width>-1</width>
- <height>-1</height>
- </sizehint>
- <container>0</container>
- <sizepolicy>
- <hordata>5</hordata>
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- <signal>clicked()</signal>
- <signal>toggled(bool)</signal>
- <slot access="public">slotOn(bool)</slot>
- </customwidget>
-</customwidgets>
-<images>
- <image>
- <name>image0</name>
- <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>checkDate</sender>
- <signal>toggled(bool)</signal>
- <receiver>buttonDate</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>lblDown</sender>
- <signal>clicked()</signal>
- <receiver>NewTaskDialogBase</receiver>
- <slot>slotCopy()</slot>
- </connection>
- <slot access="protected">dateChanged( const QString &amp; )</slot>
- <slot access="protected">dateChanged( int, int, int )</slot>
- <slot access="protected">slotCopy()</slot>
-</connections>
-<tabstops>
- <tabstop>comboPriority</tabstop>
- <tabstop>comboCategory</tabstop>
- <tabstop>selectGroupButton</tabstop>
- <tabstop>cmbProg</tabstop>
- <tabstop>checkCompleted</tabstop>
- <tabstop>checkDate</tabstop>
- <tabstop>buttonDate</tabstop>
- <tabstop>lneSum</tabstop>
- <tabstop>lblDown</tabstop>
- <tabstop>txtTodo</tabstop>
-</tabstops>
-</UI>
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp
deleted file mode 100644
index 4211ae2..0000000
--- a/core/pim/todo/todoentryimpl.cpp
+++ b/dev/null
@@ -1,189 +0,0 @@
-/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-** Copyright (C) 2002 zecke
-**
-** This file is part of Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#include "todoentryimpl.h"
-
-#include <opie/oclickablelabel.h>
-#include <opie/otodo.h>
-
-#include <qpe/categoryselect.h>
-#include <qpe/datebookmonth.h>
-#include <qpe/global.h>
-#include <qpe/resource.h>
-#include <qpe/imageedit.h>
-#include <qpe/timestring.h>
-#include <qpe/palmtoprecord.h>
-
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qvaluelist.h>
-
-NewTaskDialog::NewTaskDialog( const OTodo& task, QWidget *parent,
- const char *name, bool modal, WFlags fl )
- : NewTaskDialogBase( parent, name, modal, fl ),
- todo( task )
-{
- todo.setCategories( task.categories() );
- if ( todo.hasDueDate() )
- date = todo.dueDate();
- else
- date = QDate::currentDate();
-
- init();
- comboPriority->setCurrentItem( task.priority() - 1 );
-
- checkCompleted->setChecked( task.isCompleted() );
- checkDate->setChecked( task.hasDueDate() );
- buttonDate->setText( TimeString::longDateString( date ) );
-
- txtTodo->setText( task.description() );
- lneSum->setText( task.summary() );
- cmbProg->setCurrentItem( task.progress()/20 );
-}
-
-/*
- * Constructs a NewTaskDialog which is a child of 'parent', with the
- * name 'name' and widget flags set to 'f'
- *
- * The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
- */
-NewTaskDialog::NewTaskDialog( int id, QWidget* parent, const char* name, bool modal,
- WFlags fl )
- : NewTaskDialogBase( parent, name, modal, fl ),
- date( QDate::currentDate() )
-{
- if ( id != -1 )
- todo.setCategories( id );
- init();
-}
-
-void NewTaskDialog::init()
-{
- if( layout() != 0 ){
- layout()->setMargin( 2 );
- }
- QPopupMenu *m1 = new QPopupMenu( this );
- picker = new DateBookMonth( m1, 0, TRUE );
- m1->insertItem( picker );
- buttonDate->setPopup( m1 );
- comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") );
-
- connect( picker, SIGNAL( dateClicked( int, int, int ) ),
- this, SLOT( dateChanged( int, int, int ) ) );
-
- connect ( selectGroupButton, SIGNAL( clicked() ),
- this, SLOT( groupButtonClicked () ) );
-
- buttonDate->setText( TimeString::longDateString( date ) );
- picker->setDate( date.year(), date.month(), date.day() );
- lblDown->setPixmap(Resource::loadPixmap("down") );
-}
-
-/*
- * Destroys the object and frees any allocated resources
- */
-NewTaskDialog::~NewTaskDialog()
-{
- // no need to delete child widgets, Qt does it all for us
-}
-void NewTaskDialog::dateChanged( int y, int m, int d )
-{
- date = QDate( y, m, d );
- buttonDate->setText( TimeString::longDateString( date ) );
-}
-void NewTaskDialog::groupButtonClicked ()
-{
-/* OContactSelectorDialog cd( this );
- QArray<int> todo_relations = todo.relations ( "addressbook" );
- QValueList<int> selectedContacts;
-
- for ( uint i=0; i < todo_relations.size(); i++ ){
- printf ("old: %d\n", todo_relations[i]);
- selectedContacts.append( todo_relations[i] );
- }
- cd.setSelected (selectedContacts);
- cd.showMaximized();
- if ( cd.exec() == QDialog::Accepted ){
- selectedContacts = cd.selected ();
- QValueListIterator<int> it;
- todo.clearRelated("addressbook");
- for( it = selectedContacts.begin(); it != selectedContacts.end(); ++it ){
- printf ("Adding: %d\n", (*it));
- todo.addRelated( "addressbook", (*it) );
- }
-
- }
-*/
-}
-
-OTodo NewTaskDialog::todoEntry()
-{
- if( checkDate->isChecked() ){
- todo.setDueDate( date );
- todo.setHasDueDate( true );
- }else{
- todo.setHasDueDate( false );
- }
- if ( comboCategory->currentCategory() != -1 ) {
- QArray<int> arr = comboCategory->currentCategories();
- QStringList list;
- todo.setCategories( arr );
- }
- todo.setPriority( comboPriority->currentItem() + 1 );
- todo.setCompleted( checkCompleted->isChecked() );
-
- todo.setDescription( txtTodo->text() );
- todo.setSummary( lneSum->text() );
- QString text = cmbProg->currentText();
- todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() );
- return todo;
-}
-void NewTaskDialog::slotCopy()
-{
- txtTodo->clear();
- txtTodo->setText( lneSum->text() );
-}
-
-/*!
-
-*/
-
-void NewTaskDialog::accept()
-{
- QString strText = txtTodo->text();
- QString strSumm = lneSum->text();
- if ( strSumm.isEmpty() && strText.isEmpty() ) {
- // hmm... just decline it then, the user obviously didn't care about it
- QDialog::reject();
- return;
- }
- QDialog::accept();
-}
diff --git a/core/pim/todo/todoentryimpl.h b/core/pim/todo/todoentryimpl.h
deleted file mode 100644
index 2dfdd22..0000000
--- a/core/pim/todo/todoentryimpl.h
+++ b/dev/null
@@ -1,65 +0,0 @@
-/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
-**
-** This file is part of Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
-#ifndef NEWTASKDIALOG_H
-#define NEWTASKDIALOG_H
-
-#include "todoentry.h"
-
-#include <opie/otodo.h>
-//#include <opie/ocontactselector.h>
-
-#include <qdatetime.h>
-#include <qpalette.h>
-
-class QLabel;
-class QTimer;
-class DateBookMonth;
-
-
-
-class NewTaskDialog : public NewTaskDialogBase
-{
- Q_OBJECT
-
-public:
- NewTaskDialog( const OTodo& task, QWidget *parent = 0, const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
- NewTaskDialog( int id, QWidget* parent = 0, const char* name = 0,
- bool modal = FALSE, WFlags fl = 0 );
- ~NewTaskDialog();
-
- OTodo todoEntry();
-
-protected slots:
- void dateChanged( int y, int m, int d );
- void groupButtonClicked ();
- void slotCopy();
-protected:
- virtual void accept();
-
-private:
- void init();
- OTodo todo;
- QDate date;
- DateBookMonth *picker;
-};
-
-#endif // NEWTASKDIALOG_H