author | zecke <zecke> | 2002-06-17 13:47:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-17 13:47:54 (UTC) |
commit | 77ec78630c69c80a3d8bad7f7feb9cc9f18ab346 (patch) (side-by-side diff) | |
tree | e8dca2e2fe6bae5fc814758f5edc8c0f66528a79 | |
parent | 282007e58a8a038a0db042341528510e73ac80fc (diff) | |
download | opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.zip opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.tar.gz opie-77ec78630c69c80a3d8bad7f7feb9cc9f18ab346.tar.bz2 |
fix overlapping
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 1358f1c..fa9c221 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -1,173 +1,174 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** Copyright (C) 2002 zecke ** Copyright (C) 2002 Stefan Eilers (se, eilers.stefan@epost.de) ** ** 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. ** **********************************************************************/ #define QTOPIA_INTERNAL_FD #include "mainwindow.h" #include "todoentryimpl.h" #include "todotable.h" #include "todolabel.h" #include <opie/tododb.h> #include <opie/todovcalresource.h> #include <opie/ofontmenu.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/finddialog.h> #include <qpe/global.h> #include <qpe/ir.h> #include <qpe/qpemenubar.h> #include <qpe/qpemessagebox.h> #include <qpe/resource.h> //#include <qpe/task.h> #include <qpe/qpetoolbar.h> #include <qaction.h> #include <qarray.h> #include <qdatastream.h> #include <qdatetime.h> #include <qfile.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <qwidgetstack.h> #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> static QString todolistXMLFilename() { return Global::applicationFileName("todolist","todolist.xml"); } static QString categoriesXMLFilename() { return Global::applicationFileName("todolist","categories.xml"); } TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : QMainWindow( parent, name, f ), syncing(FALSE) { // QTime t; // t.start(); mView = 0l; mStack = new QWidgetStack(this, "main stack"); + setCentralWidget( mStack ); setCaption( tr("Todo") ); QString str; table = new TodoTable( this ); table->setColumnWidth( 2, 10 ); table->setPaintingEnabled( FALSE ); table->setUpdatesEnabled( FALSE ); table->viewport()->setUpdatesEnabled( FALSE ); { str = todolistXMLFilename(); if ( str.isNull() ) QMessageBox::critical( this, tr("Out of Space"), tr("Unable to create startup files\n" "Free up some space\n" "before you enter any data") ); else table->load( str ); } // repeat for categories... str = categoriesXMLFilename(); if ( str.isNull() ) QMessageBox::critical( this, tr( "Out of Space" ), tr( "Unable to create startup files\n" "Free up some space\n" "before you enter any data") ); mStack->addWidget(table, 1 ); mStack->raiseWidget( 1 ); setCentralWidget( mStack ); setToolBarsMovable( FALSE ); // qDebug("after load: t=%d", t.elapsed() ); Config config( "todo" ); config.setGroup( "View" ); bool complete = config.readBoolEntry( "ShowComplete", true ); table->setShowCompleted( complete ); bool showdeadline = config.readBoolEntry("ShowDeadLine", true); table->setShowDeadline (showdeadline); QString category = config.readEntry( "Category", QString::null ); table->setShowCategory( category ); QPEToolBar *bar = new QPEToolBar( this ); bar->setHorizontalStretchable( TRUE ); QPEMenuBar *mb = new QPEMenuBar( bar ); catMenu = new QPopupMenu( this ); QPopupMenu *edit = new QPopupMenu( this ); QPopupMenu *options = new QPopupMenu(this ); contextMenu = new QPopupMenu( this ); bar = new QPEToolBar( this ); QAction *a = new QAction( tr( "New Task" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotNew() ) ); a->addTo( bar ); a->addTo( edit ); a = new QAction( tr( "Edit Task" ), Resource::loadIconSet( "edit" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotEdit() ) ); a->addTo( bar ); a->addTo( edit ); a->addTo( contextMenu ); a->setEnabled( FALSE ); editAction = a; a = new QAction( QString::null, tr("View Task"), 0, this, 0 ); a->addTo( edit ); a->addTo( contextMenu ); connect( a, SIGNAL( activated() ), this, SLOT(slotShowDetails() ) ); edit->insertSeparator(); a = new QAction( tr( "Delete..." ), Resource::loadIconSet( "trash" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotDelete() ) ); a->addTo( bar ); a->addTo( edit ); a->addTo( contextMenu ); a->setEnabled( FALSE ); deleteAction = a; // delete All in category is missing.... |