summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp44
-rw-r--r--korganizer/komonthview.h8
2 files changed, 26 insertions, 26 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 64b0e95..1c2d6a2 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -137,17 +137,17 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
{
int i = currentItem ();
if ( i >= 0 ) {
setSelected ( i, false );
}
QListBox::focusOutEvent ( e );
setVScrollBarMode(QScrollView::AlwaysOff);
setHScrollBarMode(QScrollView::AlwaysOff);
- emit highligtIncidence( 0, (MonthViewCell*)this, 0 );
+ emit highlightIncidence( 0, (MonthViewCell*)this, 0 );
}
QString KNoScrollListBox::getWhatsThisText(QPoint p)
{
QListBoxItem* item = itemAt ( p );
if ( ! item ) {
return i18n("Click in the cell\nto add an event!");
}
@@ -282,67 +282,67 @@ MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s)
: QListBoxItem()
{
mblockRepaint = true;
isWeekItem = KOPrefs::instance()->mMonthViewWeek;
recycle( incidence, s );
}
void MonthViewItem::recycle( Incidence *incidence, const QString & s)
{
- mDisplayHightlighted = false;
+ mDisplayHighlighted = false;
setText( s );
mMultiday = 0;
mIncidence = incidence;
mRecur = false;
mAlarm = false;
mReply = false;
mInfo = false;
mdayPos = 0;
}
bool MonthViewItem::setHighlightedFalse()
{
- if ( !mDisplayHightlighted )
+ if ( !mDisplayHighlighted )
return false;
- mDisplayHightlighted = false;
+ mDisplayHighlighted = false;
return true;
}
bool MonthViewItem::setHighlighted( Incidence * inc )
{
if ( inc == mIncidence ) {
- if ( mDisplayHightlighted )
+ if ( mDisplayHighlighted )
return false;
- mDisplayHightlighted = true;
+ mDisplayHighlighted = true;
return true;
} else {
- if ( !mDisplayHightlighted )
+ if ( !mDisplayHighlighted )
return false;
- mDisplayHightlighted = false;
+ mDisplayHighlighted = false;
return true;
}
return false;
}
void MonthViewItem::paint(QPainter *p)
{
if ( mblockRepaint || !mIncidence ) {
return;
}
#if QT_VERSION >= 0x030000
bool sel = isSelected();
#else
bool sel = selected();
#endif
int heihei = height( listBox () );
int x = 1;
- if (KOPrefs::instance()->mMonthViewUsesCategoryColor || mDisplayHightlighted || sel )
+ if (KOPrefs::instance()->mMonthViewUsesCategoryColor || mDisplayHighlighted || sel )
{
p->setBackgroundColor( palette().color( QPalette::Normal, \
- sel ||mDisplayHightlighted ? QColorGroup::Highlight : QColorGroup::Background ) );
+ sel ||mDisplayHighlighted ? QColorGroup::Highlight : QColorGroup::Background ) );
p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei );
}
//int y = 3;//(height() - mRecurPixmap.height()) /2;
int size = PIXMAP_SIZE;
if ( QApplication::desktop()->width() < 300 )
size = 3;
int y = (heihei - size -1 ) /2;
@@ -1095,35 +1095,35 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
Incidence *incidence = eventItem->incidence();
if ( incidence ) mMonthView->showContextMenu( incidence );
}
void MonthViewCell::selection( QListBoxItem *item )
{
if ( !item ) {
- emit highligtIncidence( 0 , this, 0 );
+ emit highlightIncidence( 0 , this, 0 );
return;
}
MonthViewItem * it = (static_cast<MonthViewItem *>( item ));
- emit highligtIncidence( it->incidence(), this, it->multiDay() );
+ emit highlightIncidence( it->incidence(), this, it->multiDay() );
mMonthView->setSelectedCell( this );
}
-void MonthViewCell::deHightLight()
+void MonthViewCell::deHighLight()
{
MonthViewItem *mitem = (MonthViewItem*) firstItem ();
while ( mitem ) {
if ( mitem->setHighlightedFalse() )
updateItem ( mitem );
mitem = (MonthViewItem *)mitem->next();
}
}
// returns true if no inc found
-bool MonthViewCell::doHightLight( Incidence * inc )
+bool MonthViewCell::doHighLight( Incidence * inc )
{
MonthViewItem *mitem = (MonthViewItem*) firstItem ();
while ( mitem ) {
if ( mitem->incidence() == inc ) {
if ( mitem->setHighlighted( inc ) )
updateItem ( mitem );
return false;
@@ -1238,17 +1238,17 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
SIGNAL( newEventSignal( QDateTime ) ) );
connect( cell, SIGNAL( showDaySignal( QDate ) ),
SIGNAL( showDaySignal( QDate ) ) );
connect( cell, SIGNAL( nextCell() ),
SLOT( nextCell() ) );
connect( cell, SIGNAL( prevCell() ),
SLOT( prevCell() ) );
- connect( cell, SIGNAL( highligtIncidence( Incidence * , MonthViewCell *, int ) ),
+ connect( cell, SIGNAL( highlightIncidence( Incidence * , MonthViewCell *, int ) ),
SLOT( incidenceHighlighted( Incidence *, MonthViewCell *, int ) ));
}
}
mCellsW.resize( mDaysPerWeek );
for( col = 0; col < mDaysPerWeek; ++col ) {
MonthViewCell *cell = new MonthViewCell( this, mWeekView );
mCellsW.insert( col, cell );
@@ -1257,17 +1257,17 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
SIGNAL( newEventSignal( QDateTime ) ) );
connect( cell, SIGNAL( showDaySignal( QDate ) ),
SIGNAL( showDaySignal( QDate ) ) );
connect( cell, SIGNAL( nextCell() ),
SLOT( nextCell() ) );
connect( cell, SIGNAL( prevCell() ),
SLOT( prevCell() ) );
- connect( cell, SIGNAL( highligtIncidence( Incidence * , MonthViewCell *, int ) ),
+ connect( cell, SIGNAL( highlightIncidence( Incidence * , MonthViewCell *, int ) ),
SLOT( incidenceHighlighted( Incidence *, MonthViewCell *, int ) ));
cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
}
//connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
mContextMenu = eventPopup();
mContextMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("New Event..."),this,
@@ -1332,61 +1332,61 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
KOMonthView::~KOMonthView()
{
delete mContextMenu;
}
void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday )
{
- //qDebug("KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday );
+ qDebug("11 KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday );
static Incidence * lastInc = 0;
static MonthViewCell * lastCell = 0;
if ( lastInc == inc && lastCell == mc )
return;
lastInc = inc;
lastCell = mc;
- //qDebug("KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday );
+ qDebug("222 KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday );
bool weekview = false;
int index = 0;
for (uint i = 0; i < mCellsW.count(); ++i) {
if ( mCellsW[i] == mc ) {
weekview = true;
index = i;
break;
}
}
QPtrVector<MonthViewCell> *cells;
if ( weekview )
- cells = &mCellsW;
+ cells = &mCellsW;
else {
for (uint i = 0; i < mCells.count(); ++i) {
if ( mCells[i] == mc ) {
index = i;
break;
}
}
cells = &mCells;
}
for (uint i = 0; i < (*cells).count(); ++i) {
- (*cells)[i]->deHightLight();
+ (*cells)[i]->deHighLight();
}
if ( ! inc )
return;
if ( mday > 1 && index > 0 )
for (int i = index-1; i >= 0; --i) {
//qDebug("index %d iii %d ", index, i);
- if ( (*cells)[(uint)i]->doHightLight(inc) )
+ if ( (*cells)[(uint)i]->doHighLight(inc) )
break;
}
if ( mday < 3 && mday > 0 && index < (*cells).count()-1)
for (uint i = index+1; i < (*cells).count(); ++i) {
- if ( (*cells)[i]->doHightLight(inc) )
+ if ( (*cells)[i]->doHighLight(inc) )
break;
}
}
void KOMonthView::selectInternalWeekNum ( int n )
{
switchView();
if ( !KOPrefs::instance()->mMonthViewWeek )
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 2622d10..0f3aa54 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -81,17 +81,17 @@ class KNoScrollListBox: public QListBox
QString getWhatsThisText(QPoint p) ;
signals:
void shiftDown();
void shiftUp();
void rightClick();
void nextCell();
void prevCell();
- void highligtIncidence( Incidence * , MonthViewCell*, int );
+ void highlightIncidence( Incidence * , MonthViewCell*, int );
protected slots:
void oneDown();
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void mousePressEvent(QMouseEvent *);
void focusInEvent ( QFocusEvent * );
void focusOutEvent ( QFocusEvent * );
@@ -132,17 +132,17 @@ class MonthViewItem: public QListBoxItem
int mdayPos;
bool isWeekItem;
bool mblockRepaint;
int mMultiday;
bool mRecur;
bool mAlarm;
bool mReply;
bool mInfo;
- bool mDisplayHightlighted;
+ bool mDisplayHighlighted;
QPalette mPalette;
QDate mDate;
Incidence *mIncidence;
};
@@ -173,18 +173,18 @@ class MonthViewCell : public KNoScrollListBox
void updateConfig( bool bigFont = false );
void enableScrollBars( bool );
Incidence *selectedIncidence();
QDate selectedIncidenceDate();
QPushButton * dateLabel() { return mLabel; }
- void deHightLight();
- bool doHightLight( Incidence *);
+ void deHighLight();
+ bool doHighLight( Incidence *);
void deselect();
void select();
#ifdef DESKTOP_VERSION
static QToolTipGroup *toolTipGroup();
#endif
signals:
void defaultAction( Incidence * );
void newEventSignal( QDateTime );