summaryrefslogtreecommitdiffstats
path: root/kdeui/kdatetbl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui/kdatetbl.cpp')
-rw-r--r--kdeui/kdatetbl.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kdeui/kdatetbl.cpp b/kdeui/kdatetbl.cpp
index bbf673a15..17f9bdfb8 100644
--- a/kdeui/kdatetbl.cpp
+++ b/kdeui/kdatetbl.cpp
@@ -122,7 +122,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags
if(!date_.isValid())
{
kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl;
- date_=TQDate::currentDate();
+ date_=TQDate::tqcurrentDate();
}
setFocusPolicy( TQWidget::StrongFocus );
setNumRows(7); // 6 weeks max + headline
@@ -146,7 +146,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f)
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
viewport()->setEraseColor(KGlobalSettings::baseColor());
- setDate(TQDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
+ setDate(TQDate::tqcurrentDate()); // this initializes firstday, numdays, numDaysPrevMonth
initAccels();
}
@@ -233,7 +233,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
( daynum == 6 && calendar->calendarName() == "gregorian" ) )
normalday=false;
- TQBrush brushInvertTitle(colorGroup().base());
+ TQBrush brushInvertTitle(tqcolorGroup().base());
TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
if (!normalday)
@@ -250,7 +250,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
}
painter->drawText(0, 0, w, h-1, AlignCenter,
calendar->weekDayName(daynum, true), -1, &rect);
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
painter->moveTo(0, h-1);
painter->lineTo(w-1, h-1);
// ----- draw the weekday:
@@ -267,7 +267,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
// ° painting a day of the previous month or
// ° painting a day of the following month
// TODO: don't hardcode gray here! Use a color with less contrast to the background than normal text.
- painter->setPen( colorGroup().mid() );
+ painter->setPen( tqcolorGroup().mid() );
// painter->setPen(gray);
} else { // paint a day of the current month
if ( d->useCustomColors )
@@ -292,9 +292,9 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
}
painter->setPen( mode->fgColor );
} else
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
} else //if ( firstWeekDay < 4 ) // <- this doesn' make sense at all!
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
}
pen=painter->pen();
@@ -308,25 +308,25 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
// draw the currently selected date
if (isEnabled())
{
- painter->setPen(colorGroup().highlight());
- painter->setBrush(colorGroup().highlight());
+ painter->setPen(tqcolorGroup().highlight());
+ painter->setBrush(tqcolorGroup().highlight());
}
else
{
- painter->setPen(colorGroup().text());
- painter->setBrush(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
+ painter->setBrush(tqcolorGroup().text());
}
- pen=colorGroup().highlightedText();
+ pen=tqcolorGroup().highlightedText();
} else {
painter->setBrush(paletteBackgroundColor());
painter->setPen(paletteBackgroundColor());
-// painter->setBrush(colorGroup().base());
-// painter->setPen(colorGroup().base());
+// painter->setBrush(tqcolorGroup().base());
+// painter->setPen(tqcolorGroup().base());
}
- if ( pCellDate == TQDate::currentDate() )
+ if ( pCellDate == TQDate::tqcurrentDate() )
{
- painter->setPen(colorGroup().text());
+ painter->setPen(tqcolorGroup().text());
}
if ( paintRect ) painter->drawRect(0, 0, w, h);
@@ -392,7 +392,7 @@ KDateTable::keyPressEvent( TQKeyEvent *e )
setDate(date.addDays(1));
break;
case Key_N:
- setDate(TQDate::currentDate());
+ setDate(TQDate::tqcurrentDate());
break;
case Key_Return:
case Key_Enter:
@@ -428,7 +428,7 @@ KDateTable::setFontSize(int size)
TQRect rect;
// ----- store rectangles:
fontsize=size;
- // ----- find largest day name:
+ // ----- tqfind largest day name:
maxCell.setWidth(0);
maxCell.setHeight(0);
for(count=0; count<7; ++count)
@@ -439,7 +439,7 @@ KDateTable::setFontSize(int size)
maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
}
// ----- compare with a real wide number and add some space:
- rect=metrics.boundingRect(TQString::fromLatin1("88"));
+ rect=metrics.boundingRect(TQString::tqfromLatin1("88"));
maxCell.setWidth(QMAX(maxCell.width()+2, rect.width()));
maxCell.setHeight(QMAX(maxCell.height()+4, rect.height()));
}
@@ -536,7 +536,7 @@ KDateTable::setDate(const TQDate& date_)
numDaysPrevMonth=calendar->daysInMonth(temp);
if(changed)
{
- repaintContents(false);
+ tqrepaintContents(false);
}
return true;
}
@@ -547,28 +547,28 @@ KDateTable::getDate() const
return date;
}
-// what are those repaintContents() good for? (pfeiffer)
+// what are those tqrepaintContents() good for? (pfeiffer)
void KDateTable::focusInEvent( TQFocusEvent *e )
{
-// repaintContents(false);
+// tqrepaintContents(false);
TQGridView::focusInEvent( e );
}
void KDateTable::focusOutEvent( TQFocusEvent *e )
{
-// repaintContents(false);
+// tqrepaintContents(false);
TQGridView::focusOutEvent( e );
}
QSize
-KDateTable::sizeHint() const
+KDateTable::tqsizeHint() const
{
if(maxCell.height()>0 && maxCell.width()>0)
{
return TQSize(maxCell.width()*numCols()+2*frameWidth(),
(maxCell.height()+2)*numRows()+2*frameWidth());
} else {
- kdDebug() << "KDateTable::sizeHint: obscure failure - " << endl;
+ kdDebug() << "KDateTable::tqsizeHint: obscure failure - " << endl;
return TQSize(-1, -1);
}
}
@@ -596,7 +596,7 @@ void KDateTable::setCustomDatePainting(const TQDate &date, const TQColor &fgColo
mode->fgColor=fgColor;
mode->bgColor=bgColor;
- d->customPaintingModes.replace( date.toString(), mode );
+ d->customPaintingModes.tqreplace( date.toString(), mode );
d->useCustomColors=true;
update();
}
@@ -660,7 +660,7 @@ KDateInternalWeekSelector::setMaxWeek(int max)
}
// ### CFM To avoid binary incompatibility.
-// In future releases, remove this and replace by a QDate
+// In future releases, remove this and tqreplace by a QDate
// private member, needed in KDateInternalMonthPicker::paintCell
class KDateInternalMonthPicker::KDateInternalMonthPrivate {
public:
@@ -695,10 +695,10 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
d = new KDateInternalMonthPrivate(date.year(), date.month(), date.day());
// For monthsInYear != 12
setNumRows( (KGlobal::locale()->calendar()->monthsInYear(date) + 2) / 3);
- // enable to find drawing failures:
+ // enable to tqfind drawing failures:
// setTableFlags(Tbl_clipCellPainting);
viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker
- // ----- find the preferred size
+ // ----- tqfind the preferred size
// (this is slow, possibly, but unfortunately it is needed here):
TQFontMetrics metrics(font);
for(int i = 1; ; ++i)
@@ -713,7 +713,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
}
QSize
-KDateInternalMonthPicker::sizeHint() const
+KDateInternalMonthPicker::tqsizeHint() const
{
return TQSize((max.width()+6)*numCols()+2*frameWidth(),
(max.height()+6)*numRows()+2*frameWidth());
@@ -743,7 +743,7 @@ KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
{
int index;
TQString text;
- // ----- find the number of the cell:
+ // ----- tqfind the number of the cell:
index=3*row+col+1;
text=KGlobal::locale()->calendar()->monthName(index,
KGlobal::locale()->calendar()->year(TQDate(d->year, d->month,
@@ -815,7 +815,7 @@ KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e)
updateCell( row, col /*, false */ ); // mark the new active cell
}
}
- if ( tmpRow > -1 ) // repaint the former active cell
+ if ( tmpRow > -1 ) // tqrepaint the former active cell
updateCell( tmpRow, tmpCol /*, true */ );
}
}
@@ -935,7 +935,7 @@ KPopupFrame::keyPressEvent(TQKeyEvent* e)
{
result=0; // rejected
d->exec = false;
- qApp->exit_loop();
+ tqApp->exit_loop();
}
}
@@ -944,7 +944,7 @@ KPopupFrame::close(int r)
{
result=r;
d->exec = false;
- qApp->exit_loop();
+ tqApp->exit_loop();
}
void
@@ -954,7 +954,7 @@ KPopupFrame::hide()
if (d->exec)
{
d->exec = false;
- qApp->exit_loop();
+ tqApp->exit_loop();
}
}
@@ -1006,10 +1006,10 @@ int
KPopupFrame::exec(TQPoint pos)
{
popup(pos);
- repaint();
+ tqrepaint();
d->exec = true;
const TQGuardedPtr<TQObject> that = this;
- qApp->enter_loop();
+ tqApp->enter_loop();
if ( !that )
return TQDialog::Rejected;
hide();