author | zecke <zecke> | 2002-06-17 15:41:06 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-17 15:41:06 (UTC) |
commit | 02e724757f13f40d85136c3a14e0a3788d28236e (patch) (side-by-side diff) | |
tree | e927455a1b5f0b5e6739f180106dbc98b60628c0 | |
parent | dcba3fed4f2abf001ced72b573f6e50f6b37e1e6 (diff) | |
download | opie-02e724757f13f40d85136c3a14e0a3788d28236e.zip opie-02e724757f13f40d85136c3a14e0a3788d28236e.tar.gz opie-02e724757f13f40d85136c3a14e0a3788d28236e.tar.bz2 |
Fool Qt and fool QtDesigner to unfuck the designer .ui *evilgrin*
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/todoentry.ui | 630 | ||||
-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 4 |
3 files changed, 340 insertions, 296 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index fa9c221..d419166 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -185,49 +185,49 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f ) : edit->insertSeparator(); a = new QAction( QString::null, tr("Duplicate" ), 0, this, 0 ); connect(a, SIGNAL( activated() ), this, SLOT( slotDuplicate() ) ); a->addTo(edit ); a->setEnabled( FALSE ); duplicateAction = a; 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( edit ); a->addTo( bar ); } a = new QAction( tr( "Find" ), Resource::loadIconSet( "mag" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); - a->addTo( bar ); +// a->addTo( bar ); a->addTo( options ); options->insertSeparator(); if ( table->numRows() ) a->setEnabled( TRUE ); else a->setEnabled( FALSE ); //a->setEnabled( FALSE ); findAction = a; // qDebug("mainwindow #2: t=%d", t.elapsed() ); completedAction = new QAction( QString::null, tr("Completed tasks"), 0, this, 0, TRUE ); showdeadlineAction = new QAction( QString::null, tr( "Show Deadline" ), 0, this, 0, TRUE ); catMenu->setCheckable( true ); populateCategories(); completedAction->addTo( options ); completedAction->setOn( table->showCompleted() ); showdeadlineAction->addTo( options ); showdeadlineAction->setOn( table->showDeadline() ); diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui index 9ffa89b..1091852 100644 --- a/core/pim/todo/todoentry.ui +++ b/core/pim/todo/todoentry.ui @@ -9,405 +9,445 @@ ** 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>425</width> + <width>262</width> <height>321</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>New Task</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> - <widget> - <class>QLayoutWidget</class> + <grid> <property stdset="1"> - <name>name</name> - <cstring>Layout31</cstring> + <name>margin</name> + <number>11</number> </property> <property stdset="1"> - <name>geometry</name> - <rect> - <x>1</x> - <y>6</y> - <width>240</width> - <height>310</height> - </rect> + <name>spacing</name> + <number>6</number> </property> - <grid> + <widget row="2" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>Layout19</cstring> </property> - <property stdset="1"> - <name>spacing</name> - <number>6</number> - </property> - <widget row="2" column="0" > - <class>QLayoutWidget</class> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout19</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>txtProg</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>txtProg</cstring> + <property stdset="1"> + <name>text</name> + <string>Progress:</string> + </property> + </widget> + <widget> + <class>QComboBox</class> + <item> + <property> + <name>text</name> + <string>0%</string> </property> - <property stdset="1"> + </item> + <item> + <property> <name>text</name> - <string>Progress:</string> + <string>20%</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>cmbProg</cstring> + </item> + <item> + <property> + <name>text</name> + <string>40%</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>60%</string> </property> - <property stdset="1"> - <name>maximumSize</name> - <size> - <width>45</width> - <height>32767</height> - </size> + </item> + <item> + <property> + <name>text</name> + <string>80%</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>100%</string> </property> - </widget> - </hbox> - </widget> - <widget row="3" column="0" > - <class>QLayoutWidget</class> + </item> + <property stdset="1"> + <name>name</name> + <cstring>cmbProg</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>maximumSize</name> + <size> + <width>45</width> + <height>32767</height> + </size> + </property> + </widget> + </hbox> + </widget> + <widget row="0" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout20</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout18</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>TextLabel2</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel3</cstring> + <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> - <property stdset="1"> - <name>frameShape</name> - <enum>NoFrame</enum> + </item> + <item> + <property> + <name>text</name> + <string>2 - High</string> </property> - <property stdset="1"> + </item> + <item> + <property> <name>text</name> - <string>Category:</string> + <string>3 - Normal</string> </property> - </widget> - <widget> - <class>CategorySelect</class> - <property stdset="1"> - <name>name</name> - <cstring>comboCategory</cstring> + </item> + <item> + <property> + <name>text</name> + <string>4 - Low</string> </property> - <property stdset="1"> - <name>minimumSize</name> - <size> - <width>60</width> - <height>0</height> - </size> + </item> + <item> + <property> + <name>text</name> + <string>5 - Very Low</string> </property> - </widget> - </hbox> - </widget> - <widget row="0" column="0" > - <class>QLayoutWidget</class> + </item> + <property stdset="1"> + <name>name</name> + <cstring>comboPriority</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>currentItem</name> + <number>2</number> + </property> + </widget> + </hbox> + </widget> + <widget row="4" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout30</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> <property stdset="1"> - <name>name</name> - <cstring>Layout20</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>TextLabel1</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> </property> - <widget> - <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> - <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>sizePolicy</name> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - </sizepolicy> - </property> - <property stdset="1"> - <name>currentItem</name> - <number>2</number> - </property> - </widget> - </hbox> - </widget> - <widget row="5" column="0" > - <class>QMultiLineEdit</class> + <property stdset="1"> + <name>text</name> + <string>Summary:</string> + </property> + </widget> + <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> + <widget row="1" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout21</cstring> + </property> + <hbox> <property stdset="1"> - <name>name</name> - <cstring>txtTodo</cstring> + <name>margin</name> + <number>0</number> </property> - </widget> - <widget row="1" column="0" > - <class>QLayoutWidget</class> <property stdset="1"> - <name>name</name> - <cstring>Layout21</cstring> + <name>spacing</name> + <number>6</number> </property> - <hbox> + <widget> + <class>QCheckBox</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>checkCompleted</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>text</name> + <string>&Completed</string> </property> - <widget> - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>checkCompleted</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>&Completed</string> - </property> - </widget> - <widget> - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>checkDate</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>D&ue</string> - </property> - </widget> - <widget> - <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> - </hbox> - </widget> - <widget row="4" column="0" > - <class>QLayoutWidget</class> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>checkDate</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>D&ue</string> + </property> + </widget> + <widget> + <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> + </hbox> + </widget> + <widget row="5" column="0" > + <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> + </widget> + <widget row="3" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout33</cstring> + </property> + <hbox> <property stdset="1"> - <name>name</name> - <cstring>Layout30</cstring> + <name>margin</name> + <number>0</number> </property> - <hbox> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLabel</class> <property stdset="1"> - <name>margin</name> - <number>0</number> + <name>name</name> + <cstring>TextLabel3</cstring> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> </property> - <widget> - <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> - <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>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> + <property stdset="1"> + <name>frameShape</name> + <enum>NoFrame</enum> + </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> + </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> <customwidget> <class>OClickableLabel</class> <header location="global">opie/oclickablelabel.h</header> <sizehint> <width>-1</width> <height>-1</height> </sizehint> <container>0</container> diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp index dd01130..6af229c 100644 --- a/core/pim/todo/todoentryimpl.cpp +++ b/core/pim/todo/todoentryimpl.cpp @@ -12,48 +12,49 @@ ** 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/todoevent.h> #include <opie/tododb.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> NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent, const char *name, bool modal, WFlags fl ) : NewTaskDialogBase( parent, name, modal, fl ), todo( task ) { todo.setCategories( task.allCategories() ); if ( todo.hasDate() ) date = todo.date(); else date = QDate::currentDate(); init(); @@ -69,48 +70,51 @@ NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent, } /* * 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 ) { QArray<int> ids( 1 ); ids[0] = id; todo.setCategory( Qtopia::Record::idsToString( ids ) ); } init(); } void NewTaskDialog::init() { + if( layout() != 0 ){ + layout()->setMargin( 0 ); + } 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 ) ) ); 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 ); |