summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.cpp14
-rw-r--r--korganizer/koprefsdialog.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index df606d0..c32a2a4 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -54,25 +54,25 @@
54// ============================================================================ 54// ============================================================================
55 55
56DynamicTip::DynamicTip( QWidget * parent ) 56DynamicTip::DynamicTip( QWidget * parent )
57 : QToolTip( parent ) 57 : QToolTip( parent )
58{ 58{
59 matrix = (KODayMatrix*)parent; 59 matrix = (KODayMatrix*)parent;
60} 60}
61 61
62class KODaymatrixWhatsThis :public QWhatsThis 62class KODaymatrixWhatsThis :public QWhatsThis
63{ 63{
64public: 64public:
65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;}; 65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;};
66 ~KODaymatrixWhatsThis() { ; }; 66 ~KODaymatrixWhatsThis() { qDebug("DELETE KODaymatrixWhatsThis "); };
67 67
68protected: 68protected:
69 virtual QString text( const QPoint& p ) 69 virtual QString text( const QPoint& p )
70 { 70 {
71 return _view->getWhatsThisText( p ) ; 71 return _view->getWhatsThisText( p ) ;
72 } 72 }
73private: 73private:
74 KODayMatrix * _view; 74 KODayMatrix * _view;
75}; 75};
76 76
77void DynamicTip::maybeTip( const QPoint &pos ) 77void DynamicTip::maybeTip( const QPoint &pos )
78{ 78{
@@ -96,29 +96,27 @@ void DynamicTip::maybeTip( const QPoint &pos )
96 96
97 97
98// ============================================================================ 98// ============================================================================
99// K O D A Y M A T R I X 99// K O D A Y M A T R I X
100// ============================================================================ 100// ============================================================================
101 101
102const int KODayMatrix::NOSELECTION = -1000; 102const int KODayMatrix::NOSELECTION = -1000;
103const int KODayMatrix::NUMDAYS = 42; 103const int KODayMatrix::NUMDAYS = 42;
104 104
105KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) 105KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
106 : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) 106 : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 )
107 107
108#if 0 108
109KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) :
110 QFrame(parent, name)
111#endif
112{ 109{
110 mLastView = -1;
113 oldW = 0; 111 oldW = 0;
114 oldH = 0; 112 oldH = 0;
115 myPix.resize( 150, 120 ); 113 myPix.resize( 150, 120 );
116 mRedrawNeeded = true; 114 mRedrawNeeded = true;
117 mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); 115 mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this);
118 mPendingUpdateBeforeRepaint = false; 116 mPendingUpdateBeforeRepaint = false;
119 mouseDown = false; 117 mouseDown = false;
120 // initialize dynamic arrays 118 // initialize dynamic arrays
121 bDays.resize ( NUMDAYS ); 119 bDays.resize ( NUMDAYS );
122 pDays.resize ( NUMDAYS ); 120 pDays.resize ( NUMDAYS );
123 hDays.resize ( NUMDAYS ); 121 hDays.resize ( NUMDAYS );
124 eDays.resize ( NUMDAYS ); 122 eDays.resize ( NUMDAYS );
@@ -235,24 +233,30 @@ QColor KODayMatrix::getShadedColor(QColor color)
235 int s=0; 233 int s=0;
236 int v=0; 234 int v=0;
237 color.hsv(&h,&s,&v); 235 color.hsv(&h,&s,&v);
238 s = s/4; 236 s = s/4;
239 v = 192+v/4; 237 v = 192+v/4;
240 shaded.setHsv(h,s,v); 238 shaded.setHsv(h,s,v);
241 239
242 return shaded; 240 return shaded;
243} 241}
244 242
245KODayMatrix::~KODayMatrix() 243KODayMatrix::~KODayMatrix()
246{ 244{
245#if QT_VERSION >= 0x030000
246
247#else
248 delete mKODaymatrixWhatsThis;
249#endif
250
247 // delete mKODaymatrixWhatsThis; 251 // delete mKODaymatrixWhatsThis;
248 delete [] days; 252 delete [] days;
249 delete [] daylbls; 253 delete [] daylbls;
250 //delete [] events; 254 //delete [] events;
251 delete mToolTip; 255 delete mToolTip;
252} 256}
253 257
254/* 258/*
255void KODayMatrix::setStartDate(QDate start) 259void KODayMatrix::setStartDate(QDate start)
256{ 260{
257 updateView(start); 261 updateView(start);
258} 262}
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index d9d7924..e4bee63 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -1019,28 +1019,24 @@ dummy =
1019 dummyBox = new QHBox(topFrame); 1019 dummyBox = new QHBox(topFrame);
1020 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1020 new QLabel(i18n("Default suspend time in min:"),dummyBox);
1021 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1021 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
1022 topLayout->addWidget(dummyBox,iii++,0); 1022 topLayout->addWidget(dummyBox,iii++,0);
1023 1023
1024 dummyBox = new QHBox(topFrame); 1024 dummyBox = new QHBox(topFrame);
1025 new QLabel(i18n("Auto suspend count:"),dummyBox); 1025 new QLabel(i18n("Auto suspend count:"),dummyBox);
1026 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1026 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
1027 topLayout->addWidget(dummyBox,iii++,0); 1027 topLayout->addWidget(dummyBox,iii++,0);
1028 1028
1029 1029
1030 1030
1031
1032
1033
1034
1035 QHBox* hbo = new QHBox ( topFrame ); 1031 QHBox* hbo = new QHBox ( topFrame );
1036 mDefaultAlarmFile = new QLineEdit(hbo); 1032 mDefaultAlarmFile = new QLineEdit(hbo);
1037 QPushButton * loadTemplate = new QPushButton(hbo); 1033 QPushButton * loadTemplate = new QPushButton(hbo);
1038 QPixmap icon; 1034 QPixmap icon;
1039 if ( QApplication::desktop()->width() < 321 ) 1035 if ( QApplication::desktop()->width() < 321 )
1040 icon = SmallIcon("fileimport16"); 1036 icon = SmallIcon("fileimport16");
1041 else 1037 else
1042 icon = SmallIcon("fileimport"); 1038 icon = SmallIcon("fileimport");
1043 loadTemplate->setIconSet (icon ) ; 1039 loadTemplate->setIconSet (icon ) ;
1044 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 1040 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
1045 int size = loadTemplate->sizeHint().height(); 1041 int size = loadTemplate->sizeHint().height();
1046 loadTemplate->setFixedSize( size, size ); 1042 loadTemplate->setFixedSize( size, size );