summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp14
-rw-r--r--core/pim/datebook/datebook.h2
-rw-r--r--core/pim/datebook/datebook.pro3
-rw-r--r--core/pim/datebook/datebookday.cpp65
-rw-r--r--core/pim/datebook/datebookday.h6
-rw-r--r--core/pim/datebook/datebooksettings.cpp20
-rw-r--r--core/pim/datebook/datebooksettings.h7
-rw-r--r--core/pim/datebook/datebooksettingsbase.ui371
-rw-r--r--core/pim/datebook/datebookweeklst.cpp64
9 files changed, 406 insertions, 146 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index c0d45c9..7dd93a6 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -81,4 +81,6 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
presetTime( -1 ),
startTime( 8 ), // an acceptable default
+ rowStyle( 0 ),
+ bJumpToCurTime(FALSE),
syncing(FALSE),
inSearch(FALSE),
@@ -250,4 +252,6 @@ void DateBook::slotSettings()
frmSettings.setStartTime( startTime );
frmSettings.setAlarmPreset( aPreset, presetTime );
+ frmSettings.setJumpToCurTime( bJumpToCurTime );
+ frmSettings.setRowStyle( rowStyle );
#if defined (Q_WS_QWS) || defined(_WS_QWS_)
frmSettings.showMaximized();
@@ -258,6 +262,10 @@ void DateBook::slotSettings()
presetTime = frmSettings.presetTime();
startTime = frmSettings.startTime();
+ bJumpToCurTime = frmSettings.jumpToCurTime();
+ rowStyle = frmSettings.rowStyle();
if ( dayView )
dayView->setStartViewTime( startTime );
+ dayView->setJumpToCurTime( bJumpToCurTime );
+ dayView->setRowStyle( rowStyle );
if ( weekView )
weekView->setStartViewTime( startTime );
@@ -454,4 +462,6 @@ void DateBook::initDay()
views->addWidget( dayView, DAY );
dayView->setStartViewTime( startTime );
+ dayView->setJumpToCurTime( bJumpToCurTime );
+ dayView->setRowStyle( rowStyle );
connect( this, SIGNAL( newEvent() ),
dayView, SLOT( redraw() ) );
@@ -548,4 +558,6 @@ void DateBook::loadSettings()
aPreset = config.readBoolEntry("alarmpreset");
presetTime = config.readNumEntry("presettime");
+ bJumpToCurTime = config.readBoolEntry("jumptocurtime");
+ rowStyle = config.readNumEntry("rowstyle");
}
}
@@ -559,4 +571,6 @@ void DateBook::saveSettings()
configDB.writeEntry("alarmpreset",aPreset);
configDB.writeEntry("presettime",presetTime);
+ configDB.writeEntry("jumptocurtime", bJumpToCurTime);
+ configDB.writeEntry("rowstyle", rowStyle);
}
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h
index e7be0dd..ba8f97e 100644
--- a/core/pim/datebook/datebook.h
+++ b/core/pim/datebook/datebook.h
@@ -115,4 +115,6 @@ private:
int presetTime; // the standard time for the alarm
int startTime;
+ int rowStyle;
+ bool bJumpToCurTime; //should jump to current time in dayview?
bool ampm;
bool onMonday;
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index 609b7dc..1db3e3a 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -8,4 +8,5 @@ HEADERS = datebookday.h \
datebookdayheaderimpl.h \
datebooksettings.h \
+ datebooksettingsbase.h \
datebookweek.h \
datebookweeklst.h \
@@ -21,4 +22,5 @@ SOURCES = main.cpp \
dateentryimpl.cpp \
datebookdayheaderimpl.cpp \
+ datebooksettingsbase.cpp \
datebooksettings.cpp \
datebookweek.cpp \
@@ -32,5 +34,4 @@ SOURCES = main.cpp \
INTERFACES = dateentry.ui \
datebookdayheader.ui \
- datebooksettingsbase.ui \
datebookweekheader.ui \
datebookweeklstheader.ui \
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index c15ccef..9cc5fcd 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -61,5 +61,5 @@ DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent,
tmp = new QTableItem( this, QTableItem::Never, QString::null);
setItem( row, 0, tmp );
- setRowHeight( row, 40);
+ //setRowHeight( row, 40);
}
initHeader();
@@ -160,4 +160,11 @@ void DateBookDayView::keyPressEvent( QKeyEvent *e )
}
+void DateBookDayView::setRowStyle( int style )
+{
+ if (style<0) style = 0;
+
+ for (int i=0; i<numRows(); i++)
+ setRowHeight(i, style*10+20);
+}
//===========================================================================
@@ -175,4 +182,5 @@ DateBookDay::DateBookDay( bool ampm, bool startOnMonday,
header->setDate( currDate.year(), currDate.month(), currDate.day() );
view = new DateBookDayView( ampm, this, "day view" );
+
connect( header, SIGNAL( dateChanged( int, int, int ) ),
this, SLOT( dateChanged( int, int, int ) ) );
@@ -194,4 +202,16 @@ DateBookDay::DateBookDay( bool ampm, bool startOnMonday,
timeMarker = new DateBookDayTimeMarker( this );
timeMarker->setTime( QTime::currentTime() );
+ rowStyle = -1; // initialize with bogus values
+}
+
+void DateBookDay::setJumpToCurTime( bool bJump )
+{
+ jumpToCurTime = bJump;
+}
+
+void DateBookDay::setRowStyle( int style )
+{
+ if (rowStyle != style) view->setRowStyle( style );
+ rowStyle = style;
}
@@ -258,13 +278,19 @@ void DateBookDay::dateChanged( int y, int m, int d )
dayView()->clearSelection();
QTableSelection ts;
- ts.init( startTime, 0 );
- ts.expandTo( startTime, 0 );
+
+ if (jumpToCurTime && this->date() == QDate::currentDate())
+ {
+ ts.init( QTime::currentTime().hour(), 0);
+ ts.expandTo( QTime::currentTime().hour(), 0);
+ } else
+ {
+ ts.init( startTime, 0 );
+ ts.expandTo( startTime, 0 );
+ }
+
dayView()->addSelection( ts );
selectedWidget = 0;
- if (this->date() == QDate::currentDate())
- timeMarker->show(); else timeMarker->hide();
-
}
@@ -400,5 +426,8 @@ void DateBookDay::relayoutPage( bool fromResize )
}
- view->setContentsPos( 0, startTime * view->rowHeight(0) );
+ if (jumpToCurTime && this->date() == QDate::currentDate())
+ view->setContentsPos( 0, QTime::currentTime().hour() * view->rowHeight(0) ); //set listview to current hour
+ else
+ view->setContentsPos( 0, startTime * view->rowHeight(0) );
@@ -445,9 +474,16 @@ void DateBookDay::relayoutPage( bool fromResize )
}
}
- view->setContentsPos( 0, startTime * view->rowHeight(0) );
+
+ if (jumpToCurTime && this->date() == QDate::currentDate())
+ view->setContentsPos( 0, QTime::currentTime().hour() * view->rowHeight(0) ); //set listview to current hour
+ else
+ view->setContentsPos( 0, startTime * view->rowHeight(0) );
}
timeMarker->setTime( QTime::currentTime() ); //display timeMarker
timeMarker->raise(); //on top of all widgets
+ if (this->date() == QDate::currentDate()) //only show timeMarker on current day
+ timeMarker->show(); else timeMarker->hide();
+
setUpdatesEnabled( TRUE );
return;
@@ -480,6 +516,15 @@ void DateBookDay::setStartViewTime( int startHere )
dayView()->clearSelection();
QTableSelection ts;
- ts.init( startTime, 0 );
- ts.expandTo( startTime, 0 );
+
+ if (jumpToCurTime && this->date() == QDate::currentDate()) //this should probably be in datebook.cpp where it's called?
+ {
+ ts.init( QTime::currentTime().hour(), 0);
+ ts.expandTo( QTime::currentTime().hour(), 0);
+ } else
+ {
+ ts.init( startTime, 0 );
+ ts.expandTo( startTime, 0 );
+ }
+
dayView()->addSelection( ts );
}
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h
index db0f3b6..be7cc45 100644
--- a/core/pim/datebook/datebookday.h
+++ b/core/pim/datebook/datebookday.h
@@ -41,4 +41,6 @@ public:
DateBookDayView( bool hourClock, QWidget *parent, const char *name );
bool whichClock() const;
+
+ void setRowStyle( int style );
public slots:
@@ -150,4 +152,6 @@ public:
void setSelectedWidget( DateBookDayWidget * );
DateBookDayWidget * getSelectedWidget( void );
+ void setJumpToCurTime( bool bJump );
+ void setRowStyle( int style );
public slots:
@@ -182,4 +186,6 @@ private:
WidgetListClass widgetList; //reimplemented QList for sorting widgets by height
int startTime;
+ bool jumpToCurTime; //should we jump to current time in dayview?
+ int rowStyle;
DateBookDayWidget *selectedWidget; //actual selected widget (obviously)
DateBookDayTimeMarker *timeMarker; //marker for current time
diff --git a/core/pim/datebook/datebooksettings.cpp b/core/pim/datebook/datebooksettings.cpp
index c5d8ac1..49fcd17 100644
--- a/core/pim/datebook/datebooksettings.cpp
+++ b/core/pim/datebook/datebooksettings.cpp
@@ -134,2 +134,22 @@ void DateBookSettings::slotChangeClock( bool whichClock )
setStartTime( saveMe );
}
+
+void DateBookSettings::setJumpToCurTime( bool bJump )
+{
+ chkJumpToCurTime->setChecked( bJump );
+}
+
+bool DateBookSettings::jumpToCurTime() const
+{
+ return chkJumpToCurTime->isChecked();
+}
+
+void DateBookSettings::setRowStyle( int style )
+{
+ comboRowStyle->setCurrentItem( style );
+}
+
+int DateBookSettings::rowStyle() const
+{
+ return comboRowStyle->currentItem();
+}
diff --git a/core/pim/datebook/datebooksettings.h b/core/pim/datebook/datebooksettings.h
index ee9f39c..90a07f9 100644
--- a/core/pim/datebook/datebooksettings.h
+++ b/core/pim/datebook/datebooksettings.h
@@ -36,5 +36,10 @@ public:
void setAlarmType( int alarmType );
int alarmType() const;
-
+
+ void setJumpToCurTime( bool bJump );
+ bool jumpToCurTime() const;
+ void setRowStyle( int style );
+ int rowStyle() const;
+
private slots:
void slot12Hour( int );
diff --git a/core/pim/datebook/datebooksettingsbase.ui b/core/pim/datebook/datebooksettingsbase.ui
index 0f40773..816a441 100644
--- a/core/pim/datebook/datebooksettingsbase.ui
+++ b/core/pim/datebook/datebooksettingsbase.ui
@@ -33,5 +33,5 @@
<x>0</x>
<y>0</y>
- <width>232</width>
+ <width>220</width>
<height>290</height>
</rect>
@@ -47,14 +47,14 @@
<name>layoutSpacing</name>
</property>
- <vbox>
+ <grid>
<property stdset="1">
<name>margin</name>
- <number>5</number>
+ <number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>1</number>
+ <number>6</number>
</property>
- <widget>
+ <widget row="0" column="0" >
<class>QGroupBox</class>
<property stdset="1">
@@ -74,63 +74,100 @@
<string>Start viewing events</string>
</property>
- <vbox>
+ <widget>
+ <class>QLayoutWidget</class>
<property stdset="1">
- <name>margin</name>
- <number>11</number>
+ <name>name</name>
+ <cstring>Layout6</cstring>
</property>
<property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <name>geometry</name>
+ <rect>
+ <x>3</x>
+ <y>21</y>
+ <width>210</width>
+ <height>53</height>
+ </rect>
</property>
- <widget>
- <class>QLayoutWidget</class>
+ <grid>
<property stdset="1">
- <name>name</name>
- <cstring>Layout1</cstring>
+ <name>margin</name>
+ <number>0</number>
</property>
- <hbox>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <spacer row="1" column="0" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
<property stdset="1">
- <name>margin</name>
- <number>0</number>
+ <name>orientation</name>
+ <enum>Vertical</enum>
</property>
<property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>lblStartTime</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Start Time:</string>
- </property>
- </widget>
- <widget>
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>spinStart</cstring>
- </property>
- <property stdset="1">
- <name>suffix</name>
- <string>:00</string>
- </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
<property stdset="1">
- <name>wrapping</name>
- <bool>true</bool>
+ <name>margin</name>
+ <number>0</number>
</property>
<property stdset="1">
- <name>maxValue</name>
- <number>23</number>
+ <name>spacing</name>
+ <number>6</number>
</property>
- </widget>
- </hbox>
- </widget>
- </vbox>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>lblStartTime</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Start Time:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>spinStart</cstring>
+ </property>
+ <property stdset="1">
+ <name>suffix</name>
+ <string>:00</string>
+ </property>
+ <property stdset="1">
+ <name>wrapping</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>23</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
</widget>
- <widget>
+ <widget row="1" column="0" >
<class>QGroupBox</class>
<property stdset="1">
@@ -142,75 +179,205 @@
<string>Alarm Settings</string>
</property>
- <vbox>
+ <widget>
+ <class>QLayoutWidget</class>
<property stdset="1">
- <name>margin</name>
- <number>11</number>
+ <name>name</name>
+ <cstring>Layout4</cstring>
</property>
<property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <name>geometry</name>
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>200</width>
+ <height>53</height>
+ </rect>
</property>
- <widget>
- <class>QLayoutWidget</class>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
<property stdset="1">
- <name>name</name>
- <cstring>Layout6</cstring>
+ <name>spacing</name>
+ <number>6</number>
</property>
- <hbox>
+ <spacer row="1" column="0" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer2</cstring>
+ </property>
<property stdset="1">
- <name>margin</name>
- <number>0</number>
+ <name>orientation</name>
+ <enum>Vertical</enum>
</property>
<property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>chkAlarmPreset</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Alarm Preset</string>
- </property>
- </widget>
- <widget>
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>spinPreset</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout6</cstring>
+ </property>
+ <hbox>
<property stdset="1">
- <name>suffix</name>
- <string> minutes</string>
+ <name>margin</name>
+ <number>0</number>
</property>
<property stdset="1">
- <name>maxValue</name>
- <number>180</number>
+ <name>spacing</name>
+ <number>6</number>
</property>
- <property stdset="1">
- <name>minValue</name>
- <number>0</number>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>chkAlarmPreset</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Alarm Preset</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>spinPreset</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>suffix</name>
+ <string> minutes</string>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>180</number>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>lineStep</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>5</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>fraMisc</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Misc</string>
+ </property>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout5</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>170</width>
+ <height>24</height>
+ </rect>
+ </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>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Row style:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Default</string>
</property>
- <property stdset="1">
- <name>lineStep</name>
- <number>5</number>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Medium</string>
</property>
- <property stdset="1">
- <name>value</name>
- <number>5</number>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>Large</string>
</property>
- </widget>
- </hbox>
- </widget>
- </vbox>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>comboRowStyle</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>chkJumpToCurTime</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>200</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Jump to current time (dayview)</string>
+ </property>
+ </widget>
</widget>
- </vbox>
+ </grid>
</widget>
<connections>
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 8e88377..58a9c53 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -21,6 +21,6 @@
#include <qtoolbutton.h>
#include <qvbox.h>
-#include <qsizepolicy.h>
-#include <qabstractlayout.h>
+#include <qsizepolicy.h>
+#include <qabstractlayout.h>
#include <qtl.h>
@@ -28,5 +28,5 @@ bool calcWeek(const QDate &d, int &week, int &year,
bool startOnMonday = false);
-DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent,
+DateBookWeekLstHeader::DateBookWeekLstHeader(bool /*onM*/, QWidget* parent,
const char* name, WFlags fl)
: DateBookWeekLstHeaderBase(parent, name, fl)
@@ -55,10 +55,10 @@ void DateBookWeekLstHeader::setDate(const QDate &d) {
calcWeek(d,week,year,onMonday);
labelWeek->setText("W: " + QString::number(week));
-
+
QDate start=date;
QDate stop=start.addDays(6);
- labelDate->setText( QString::number(start.day()) + " " +
+ labelDate->setText( QString::number(start.day()) + " " +
start.monthName(start.month()) + " - " +
- QString::number(stop.day()) + " " +
+ QString::number(stop.day()) + " " +
start.monthName(stop.month()) );
emit dateChanged(year,week);
@@ -93,7 +93,7 @@ void DateBookWeekLstHeader::prevWeek() {
DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool onM,
- QWidget* parent,
- const char* name,
- WFlags fl )
+ QWidget* parent,
+ const char* name,
+ WFlags fl )
: DateBookWeekLstDayHdrBase(parent, name, fl) {
@@ -103,5 +103,5 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool onM,
char day=wdays[d.dayOfWeek()-1];
- label->setText( QString(QChar(day)) + " " +
+ label->setText( QString(QChar(day)) + " " +
QString::number(d.day()) );
add->setText("+");
@@ -111,5 +111,5 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool onM,
pal.setColor(QColorGroup::Foreground, QColor(0,0,255));
label->setPalette(pal);
-
+
/*
QFont f=label->font();
@@ -140,7 +140,7 @@ void DateBookWeekLstDayHdr::newEvent() {
emit addEvent(start,stop,"");
}
-DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
- QWidget* parent,
- const char* name,
+DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
+ QWidget* parent,
+ const char* name,
WFlags fl) :
OClickableLabel(parent,name,fl),
@@ -166,7 +166,7 @@ void DateBookWeekLstEvent::editMe() {
-DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
+DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
const QDate &d, bool onM,
- QWidget* parent,
+ QWidget* parent,
const char* name, WFlags fl)
: QWidget( parent, name, fl )
@@ -177,5 +177,5 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
QVBoxLayout *layout = new QVBoxLayout( this );
-
+
qBubbleSort(ev);
QValueListIterator<EffectiveEvent> it;
@@ -183,5 +183,5 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
int dayOrder[7];
- if (onMonday)
+ if (onMonday)
for (int d=0; d<7; d++) dayOrder[d]=d+1;
else {
@@ -194,14 +194,14 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i),
onMonday,this);
- connect(hdr, SIGNAL(showDate(int,int,int)),
+ connect(hdr, SIGNAL(showDate(int,int,int)),
this, SIGNAL(showDate(int,int,int)));
- connect(hdr, SIGNAL(addEvent(const QDateTime &,
+ connect(hdr, SIGNAL(addEvent(const QDateTime &,
const QDateTime &,
- const QString &)),
- this, SIGNAL(addEvent(const QDateTime &,
+ const QString &)),
+ this, SIGNAL(addEvent(const QDateTime &,
const QDateTime &,
const QString &)));
layout->addWidget(hdr);
-
+
// Events
while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
@@ -212,5 +212,5 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
it++;
}
-
+
layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
}
@@ -219,8 +219,8 @@ DateBookWeekLstView::~DateBookWeekLstView(){}
void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();}
-DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
- QValueList<EffectiveEvent> &ev2,
+DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
+ QValueList<EffectiveEvent> &ev2,
QDate &d, bool onM,
- QWidget* parent,
+ QWidget* parent,
const char* name, WFlags fl)
: QWidget( parent, name, fl )
@@ -252,6 +252,6 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
}
-DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
- QWidget *parent,
+DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
+ QWidget *parent,
const char *name )
: QWidget( parent, name ),
@@ -267,8 +267,8 @@ DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
header=new DateBookWeekLstHeader(onM, this);
layout->addWidget( header );
- connect(header, SIGNAL(dateChanged(int,int)),
+ connect(header, SIGNAL(dateChanged(int,int)),
this, SLOT(dateChanged(int,int)));
connect(header, SIGNAL(setDbl(bool)),
- this, SLOT(setDbl(bool)));
+ this, SLOT(setDbl(bool)));
scroll=new QScrollView(this);
@@ -311,5 +311,5 @@ QDate DateBookWeekLst::date() const {
if (dow==7) dow=1;
else dow++;
-
+
d=d.addDays( (_week-1)*7 - dow + 1 );
return d;