summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-08 22:19:44 (UTC)
committer harlekin <harlekin>2003-03-08 22:19:44 (UTC)
commit1d96fca5d80a2e7e96f2bd28168175a6e5c5c04a (patch) (side-by-side diff)
tree00ba4dd57941d11a2592e024cb76e71b9b45e6cf
parent6d0502893df34cc9918a3848133cb8b581e127cc (diff)
downloadopie-1d96fca5d80a2e7e96f2bd28168175a6e5c5c04a.zip
opie-1d96fca5d80a2e7e96f2bd28168175a6e5c5c04a.tar.gz
opie-1d96fca5d80a2e7e96f2bd28168175a6e5c5c04a.tar.bz2
use icons from inline instead of inlining some icons in the ui file
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookdayheader.ui14
-rw-r--r--core/pim/datebook/datebookdayheaderimpl.cpp5
2 files changed, 7 insertions, 12 deletions
diff --git a/core/pim/datebook/datebookdayheader.ui b/core/pim/datebook/datebookdayheader.ui
index bb0c1ac..308bad3 100644
--- a/core/pim/datebook/datebookdayheader.ui
+++ b/core/pim/datebook/datebookdayheader.ui
@@ -34,65 +34,65 @@
<y>0</y>
<width>249</width>
<height>26</height>
</rect>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>0</number>
</property>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>back</cstring>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>pixmap</name>
- <pixmap>image0</pixmap>
+ <pixmap></pixmap>
</property>
<property stdset="1">
<name>toggleButton</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>autoRepeat</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>autoRaise</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>toggleButton</name>
<bool>false</bool>
</property>
<property>
<name>toolTip</name>
<string></string>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>date</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
@@ -341,80 +341,70 @@
</property>
<property stdset="1">
<name>toggleButton</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>autoRaise</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>toggleButton</name>
<bool>true</bool>
</property>
<property>
<name>toolTip</name>
<string></string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>forward</cstring>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>pixmap</name>
- <pixmap>image1</pixmap>
+ <pixmap></pixmap>
</property>
<property stdset="1">
<name>autoRepeat</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>autoRaise</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
-<images>
- <image>
- <name>image0</name>
- <data format="XPM.GZ" length="582">789c6dcfcd4e843010c0f13b4fd1d01b31bb6cb325211b1f41e3d1c4789876a60bcbd7aeae07637c773b6d5985d870e0f7ef50605b88e7a707516cb3f72b5c5b2b6c036fa2c08f61f87c79bdffcaf2dd5ef0558b5d7e97e51b61c5e33412df4b7f2fcbb09896a94ab557817063cd744cad74a915734aac35308740d018d9332d5ab0c8ec1229f2c2448d156a661b489ee1ab4e4cf2a08a790e24020abb0dd355442eec8e914e45526215790c749e8e89891069125de466b1fe14295705ccaa5863e2d05cc01894925b2a7e8217dd8a631eb169fd509af10fd1a9ebfbdf32008d9d0c07cd274f70ee162773ba2cdfee935c977ffe6b2edf87ec07796f81cd</data>
- </image>
- <image>
- <name>image1</name>
- <data format="XPM.GZ" length="627">789c7dcfc94ec3301006e07b9ec28a6f114a13cbb1a8108f00e28884387819676993340b07847877329ea8697a60ec83bfdf232f8784bdbfbdb0e4104db39e6bcb6ca54796b8afb6fdfef87cfe89e25cb2650ac1f2f8218a5366d96bdf01aef9b2e65928a4458a0c07b25c29890352e63293e19c53a0968f52230159e8c22981744495133552097554a1f982b4ce6aeb9013d215165c81ec894e109b4070ca85378f2b35f18c04050214b20d04d010762ba457003eecd6442f88f34a45f4817ea147762b35d1acf4c47457d784737d9f18ebee1363614bf852c6f812b6c460f90abb6e93ba694ed7c49fdbaeee2f76b83da71ba772e0db5d9ccf4b07dfdd5e858edd9b2948fff9d796fc3e457f660e8d47</data>
- </image>
-</images>
<connections>
<connection>
<sender>forward</sender>
<signal>clicked()</signal>
<receiver>DateBookDayHeaderBase</receiver>
<slot>goForward()</slot>
</connection>
<connection>
<sender>back</sender>
<signal>clicked()</signal>
<receiver>DateBookDayHeaderBase</receiver>
<slot>goBack()</slot>
</connection>
<connection>
<sender>grpDays</sender>
<signal>clicked(int)</signal>
<receiver>DateBookDayHeaderBase</receiver>
<slot>setDay( int )</slot>
</connection>
<slot access="public">goBack()</slot>
<slot access="public">goForward()</slot>
<slot access="public">setDate( int, int, int )</slot>
<slot access="public">setDay( int )</slot>
</connections>
</UI>
diff --git a/core/pim/datebook/datebookdayheaderimpl.cpp b/core/pim/datebook/datebookdayheaderimpl.cpp
index fbcb3d2..7d77153 100644
--- a/core/pim/datebook/datebookdayheaderimpl.cpp
+++ b/core/pim/datebook/datebookdayheaderimpl.cpp
@@ -1,78 +1,83 @@
/**********************************************************************
** 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.
**
**********************************************************************/
#include "datebookdayheaderimpl.h"
#include <qpe/datebookmonth.h>
+#include <qpe/resource.h>
#include <qpe/timestring.h>
#include <qbuttongroup.h>
#include <qpopupmenu.h>
#include <qstringlist.h>
#include <qtimer.h>
#include <qtoolbutton.h>
+
/*
* Constructs a DateBookDayHeader 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.
*/
DateBookDayHeader::DateBookDayHeader( bool useMonday,
QWidget* parent, const char* name )
: DateBookDayHeaderBase( parent, name ),
bUseMonday( useMonday )
{
connect(date,SIGNAL(pressed()),this,SLOT(pickDate()));
setupNames();
+ forward->setPixmap( Resource::loadPixmap( "forward" ) );
+ back->setPixmap( Resource::loadPixmap( "back" ) );
+
setBackgroundMode( PaletteButton );
grpDays->setBackgroundMode( PaletteButton );
}
/*
* Destroys the object and frees any allocated resources
*/
DateBookDayHeader::~DateBookDayHeader()
{
// no need to delete child widgets, Qt does it all for us
}
void DateBookDayHeader::setStartOfWeek( bool onMonday )
{
bUseMonday = onMonday;
setupNames();
setDate( currDate.year(), currDate.month(), currDate.day() );
}
void DateBookDayHeader::setupNames()
{
if ( bUseMonday ) {
cmdDay1->setText( DateBookDayHeaderBase::tr("Monday").left(1) );
cmdDay2->setText( DateBookDayHeaderBase::tr("Tuesday").left(1) );
cmdDay3->setText( DateBookDayHeaderBase::tr("Wednesday").left(1) );
cmdDay4->setText( DateBookDayHeaderBase::tr("Thursday").left(1) );
cmdDay5->setText( DateBookDayHeaderBase::tr("Friday").left(1) );
cmdDay6->setText( DateBookDayHeaderBase::tr("Saturday").left(1) );
cmdDay7->setText( DateBookDayHeaderBase::tr("Sunday").left(1) );
} else {
cmdDay1->setText( DateBookDayHeaderBase::tr("Sunday").left(1) );
cmdDay2->setText( DateBookDayHeaderBase::tr("Monday").left(1) );