summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2006-01-31 20:09:27 (UTC)
committer zautrix <zautrix>2006-01-31 20:09:27 (UTC)
commit987757f168bbae56100f2aff763b865e81ceec18 (patch) (side-by-side diff)
tree65c6aecfb32989bd122af893b5bd4a9ff97c35fd /korganizer
parent1bb72406b4f160efa20bf4329539543e000295a5 (diff)
downloadkdepimpi-987757f168bbae56100f2aff763b865e81ceec18.zip
kdepimpi-987757f168bbae56100f2aff763b865e81ceec18.tar.gz
kdepimpi-987757f168bbae56100f2aff763b865e81ceec18.tar.bz2
compile fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp22
-rw-r--r--korganizer/koeditordetails.cpp4
2 files changed, 12 insertions, 14 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index f9c8b73..ea510f1 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -39,25 +39,24 @@ DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
const char *name )
: QWidget( parent, name ), mCalendar( 0 ),
mHorizontalCount( 1 ), mVerticalCount( 1 )
{
mResizeEnabled = false;
mExtraViews.setAutoDelete( true );
mNavigatorView = new KDateNavigator( this, name );
mNavigatorView->hide();
connectNavigatorView( mNavigatorView );
//setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
mLastDisplayedDN = 0;
- mUpdateTimer;
mUpdateTimer = new QTimer( this );
connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( checkUpdateDayMatrixDates() ));
mFirstSelectedDate = QDate::currentDate();
mSelectedDateCount = 1;
}
DateNavigatorContainer::~DateNavigatorContainer()
{
}
void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v )
{
@@ -142,25 +141,25 @@ void DateNavigatorContainer::computeMonthSelected( int month , bool forceEmit )
else {
setBaseDates();
if ( forceEmit )
updateDayMatrixDates();
if ( forceEmit )
emit monthSelected( month );
}
}
void DateNavigatorContainer::setCalendar( Calendar *cal )
{
mCalendar = cal;
mNavigatorView->setCalendar( cal );
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
n->setCalendar( cal );
}
}
void DateNavigatorContainer::checkUpdateDayMatrixDates()
{
//qDebug("KODNC: wid %d hei %d ", width(), height());
mUpdateTimer->stop();
//return;
if ( width() < 3 || height() < 3 )
return;
static int lastWid = 0;
@@ -181,25 +180,24 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
if ( horizontalCount == 1)
horizontalCount = size().width() / mNavigatorView->yourFullSizeHint().width();
QFont fo;
if ( horizontalCount != mHorizontalCount ||
verticalCount != mVerticalCount ) {
uint count = horizontalCount * verticalCount;
if ( count == 0 ) {
bool ok;
fo = mNavigatorView->yourFontHint( size() , &ok );
//mNavigatorView->resize( size() );
//if ( ! ok )
// return;
- int butt = 2;
horizontalCount = size().width() / mNavigatorView->sizeHintTwoButtons( ).width();
if ( horizontalCount <= 1 )
minSize = mNavigatorView->sizeHintTwoButtons( 4 );
else
minSize = mNavigatorView->sizeHintTwoButtons();
verticalCount = size().height() / minSize.height();
horizontalCount = size().width() / minSize.width();
if ( horizontalCount == 0 )
horizontalCount = 1;
if ( verticalCount == 0 )
verticalCount = 1;
fontchange = true;
@@ -246,40 +244,40 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
view->changeFont( fo );
}
}
int theight = height() / mVerticalCount;
int twidth = width() / mHorizontalCount;
NavigatorBar *bar = mNavigatorView->navigatorBar();
if ( mHorizontalCount > 1 ) bar->showButtons( true, false );
else bar->showButtons( true, true );
mNavigatorView->setGeometry(0,
0, twidth, theight );
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
int x = ( i + 1 ) % mHorizontalCount;
int y = ( i + 1 ) / mHorizontalCount;
KDateNavigator *view = mExtraViews.at( i );
bar = view->navigatorBar();
if ( y > 0 ) bar->showButtons( false, false );
else {
if ( x + 1 == mHorizontalCount ) bar->showButtons( false, true );
else bar->showButtons( false, false );
}
view->setGeometry( x * twidth,
y * theight, twidth, theight );
}
- int iii = 0;
- int ccc = mHorizontalCount * mVerticalCount;
+ uint iii = 0;
+ uint ccc = mHorizontalCount * mVerticalCount;
mNavigatorView->show();
while ( iii < ( mExtraViews.count() ) ) {
if ( iii < ccc-1 )
mExtraViews.at( iii )->show();
else
mExtraViews.at( iii )->hide();
++iii;
}
}
QDate last = lastAvailableDate();
QDate first = firstAvailableDate();
@@ -291,66 +289,66 @@ void DateNavigatorContainer::checkUpdateDayMatrixDates()
}
else {
updateDayMatrixDates();
emit monthSelected( mFirstSelectedDate.month() );
}
}
void DateNavigatorContainer::updateDayMatrixDates()
{
QDate fDate = mFirstSelectedDate;
QDate lDate = fDate.addDays( mSelectedDateCount - 1 );
mNavigatorView->dayMatrix()->setSelectedDaysFrom( fDate , lDate );
mNavigatorView->dayMatrix()->repaint( false );
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
if ( n->dayMatrix()->setSelectedDaysFrom( fDate , lDate ) ) {
n->dayMatrix()->repaint( false );
}
}
}
void DateNavigatorContainer::updateDayMatrix()
{
mNavigatorView->updateDayMatrix();
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
n->updateDayMatrix();
}
}
void DateNavigatorContainer::updateToday()
{
qDebug("DateNavigatorContainer::updateToday() NOT IMPL ");
#if 0
mNavigatorView->updateToday();
KDateNavigator *n;
for( n = mExtraViews.first(); n; n = mExtraViews.next() ) {
n->updateToday();
}
#endif
}
void DateNavigatorContainer::updateView()
{
mNavigatorView->updateView();
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
n->updateView();
}
}
void DateNavigatorContainer::updateConfig()
{
mNavigatorView->updateConfig();
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
n->updateConfig();
}
}
QDate DateNavigatorContainer::lastAvailableDate() const
{
QDate date = mNavigatorView->baseDate();
QDate last = QDate ( date.year(), date.month(), date.daysInMonth() );
int iii = mLastDisplayedDN;
if ( mLastDisplayedDN )
last = last.addDays( 1);
while ( iii ) {
@@ -391,37 +389,37 @@ void DateNavigatorContainer::selectDates( const DateList &dateList )
if ( mLastDisplayedDN > 1 ) {
KDateNavigator *view = mExtraViews.at( 1 );
view->dayMatrix()->setSelectedDaysFrom(*(dateList.begin()), *(--dateList.end()));
view->dayMatrix()->repaint( false );
}
}
}
void DateNavigatorContainer::setBaseDates()
{
QDate baseDate = mNavigatorView->baseDate();
bool doRepaint = true;
- for( uint i = 0; i < mLastDisplayedDN; ++i ) {
+ for( int i = 0; i < mLastDisplayedDN; ++i ) {
KDateNavigator *n = mExtraViews.at( i );
baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 );
n->setBaseDate( baseDate, doRepaint );
}
}
void DateNavigatorContainer::setResizeEnabled()
{
mResizeEnabled = true;
//qDebug("DateNavigatorContainer::setResizeEnabled ");
checkUpdateDayMatrixDates();
}
-void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
+void DateNavigatorContainer::resizeEvent( QResizeEvent * )
{
//qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height());
//qDebug("COUNT %d ", mExtraViews.count());
if ( ! mResizeEnabled ) {
//qDebug("NOT ResizeEnabled");
return;
}
else
#ifdef DESKTOP_VERSION
mUpdateTimer->start( 100 );
#else
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index b90b9eb..9a4b4ec 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -45,31 +45,31 @@
#include <externalapphandler.h>
#endif //DESKTOP_VERSION
#endif
#include <libkcal/incidence.h>
#include "koprefs.h"
#include "koeditordetails.h"
template <>
-CustomListViewItem<class Attendee *>::~CustomListViewItem()
+CustomListViewItem<Attendee *>::~CustomListViewItem()
{
delete mData;
}
template <>
-void CustomListViewItem<class Attendee *>::updateItem()
+void CustomListViewItem<Attendee *>::updateItem()
{
setText(0,mData->name());
setText(1,mData->email());
setText(2,mData->roleStr());
setText(3,mData->statusStr());
if (mData->RSVP() && !mData->email().isEmpty()) {
setPixmap(4,SmallIcon("mailappt"));
setSortKey(4,"j");
}
else {
setPixmap(4,SmallIcon("nomailappt"));
setSortKey(4,"n");