summaryrefslogtreecommitdiffstats
path: root/tdeui/kdatetbl.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:47:22 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:47:22 -0600
commit28edc0aa2ab09297288186f5bc15765eb7be58c0 (patch)
tree7b7a01768b3781763186c825af21bb14717d2c32 /tdeui/kdatetbl.cpp
parent07c48c43ff72c237e4028154f4594102b798073f (diff)
downloadtdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.tar.gz
tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'tdeui/kdatetbl.cpp')
-rw-r--r--tdeui/kdatetbl.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp
index 9387a6322..632c7deea 100644
--- a/tdeui/kdatetbl.cpp
+++ b/tdeui/kdatetbl.cpp
@@ -99,7 +99,7 @@ KDateValidator::validate(TQString& text, int&) const
TQValidator::State
KDateValidator::date(const TQString& text, TQDate& d) const
{
- TQDate tmp = KGlobal::locale()->readDate(text);
+ TQDate tmp = TDEGlobal::locale()->readDate(text);
if (!tmp.isNull())
{
d = tmp;
@@ -129,7 +129,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- viewport()->setEraseColor(KGlobalSettings::baseColor());
+ viewport()->setEraseColor(TDEGlobalSettings::baseColor());
setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth
initAccels();
@@ -145,7 +145,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f)
setNumCols(7); // 7 days a week
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
- viewport()->setEraseColor(KGlobalSettings::baseColor());
+ viewport()->setEraseColor(TDEGlobalSettings::baseColor());
setDate(TQDate::currentDate()); // this initializes firstday, numdays, numDaysPrevMonth
initAccels();
}
@@ -169,8 +169,8 @@ void KDateTable::initAccels()
int KDateTable::posFromDate( const TQDate &dt )
{
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- const int firstWeekDay = KGlobal::locale()->weekStartDay();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
+ const int firstWeekDay = TDEGlobal::locale()->weekStartDay();
int pos = calendar->day( dt );
int offset = (firstday - firstWeekDay + 7) % 7;
// make sure at least one day of the previous month is visible.
@@ -182,10 +182,10 @@ int KDateTable::posFromDate( const TQDate &dt )
TQDate KDateTable::dateFromPos( int pos )
{
TQDate pCellDate;
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
calendar->setYMD(pCellDate, calendar->year(date), calendar->month(date), 1);
- int firstWeekDay = KGlobal::locale()->weekStartDay();
+ int firstWeekDay = TDEGlobal::locale()->weekStartDay();
int offset = (firstday - firstWeekDay + 7) % 7;
// make sure at least one day of the previous month is visible.
// adjust this <1 if more days should be forced visible:
@@ -211,14 +211,14 @@ KDateTable::paintEmptyArea(TQPainter *paint, int, int, int, int)
void
KDateTable::paintCell(TQPainter *painter, int row, int col)
{
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
TQRect rect;
TQString text;
TQPen pen;
int w=cellWidth();
int h=cellHeight();
- TQFont font=KGlobalSettings::generalFont();
+ TQFont font=TDEGlobalSettings::generalFont();
// -----
if(row == 0)
@@ -226,7 +226,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
font.setBold(true);
painter->setFont(font);
bool normalday = true;
- int firstWeekDay = KGlobal::locale()->weekStartDay();
+ int firstWeekDay = TDEGlobal::locale()->weekStartDay();
int daynum = ( col+firstWeekDay < 8 ) ? col+firstWeekDay :
col+firstWeekDay-7;
if ( daynum == calendar->weekDayOfPray() ||
@@ -234,8 +234,8 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
normalday=false;
TQBrush brushInvertTitle(colorGroup().base());
- TQColor titleColor(isEnabled()?( KGlobalSettings::activeTitleColor() ):( KGlobalSettings::inactiveTitleColor() ) );
- TQColor textColor(isEnabled()?( KGlobalSettings::activeTextColor() ):( KGlobalSettings::inactiveTextColor() ) );
+ TQColor titleColor(isEnabled()?( TDEGlobalSettings::activeTitleColor() ):( TDEGlobalSettings::inactiveTitleColor() ) );
+ TQColor textColor(isEnabled()?( TDEGlobalSettings::activeTextColor() ):( TDEGlobalSettings::inactiveTextColor() ) );
if (!normalday)
{
painter->setPen(textColor);
@@ -298,7 +298,7 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
}
pen=painter->pen();
- int firstWeekDay=KGlobal::locale()->weekStartDay();
+ int firstWeekDay=TDEGlobal::locale()->weekStartDay();
int offset=firstday-firstWeekDay;
if(offset<1)
offset+=7;
@@ -339,13 +339,13 @@ KDateTable::paintCell(TQPainter *painter, int row, int col)
void KDateTable::nextMonth()
{
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
setDate(calendar->addMonths( date, 1 ));
}
void KDateTable::previousMonth()
{
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
setDate(calendar->addMonths( date, -1 ));
}
@@ -433,7 +433,7 @@ KDateTable::setFontSize(int size)
maxCell.setHeight(0);
for(count=0; count<7; ++count)
{
- rect=metrics.boundingRect(KGlobal::locale()->calendar()
+ rect=metrics.boundingRect(TDEGlobal::locale()->calendar()
->weekDayName(count+1, true));
maxCell.setWidth(QMAX(maxCell.width(), rect.width()));
maxCell.setHeight(QMAX(maxCell.height(), rect.height()));
@@ -500,7 +500,7 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e)
if ( e->button() == Qt::RightButton && d->popupMenuEnabled )
{
KPopupMenu *menu = new KPopupMenu();
- menu->insertTitle( KGlobal::locale()->formatDate(clickedDate) );
+ menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) );
emit aboutToShowContextMenu( menu, clickedDate );
menu->popup(e->globalPos());
}
@@ -524,7 +524,7 @@ KDateTable::setDate(const TQDate& date_)
emit(dateChanged(date));
changed=true;
}
- const KCalendarSystem * calendar = KGlobal::locale()->calendar();
+ const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
calendar->setYMD(temp, calendar->year(date), calendar->month(date), 1);
//temp.setYMD(date.year(), date.month(), 1);
@@ -614,7 +614,7 @@ KDateInternalWeekSelector::KDateInternalWeekSelector
{
TQFont font;
// -----
- font=KGlobalSettings::generalFont();
+ font=TDEGlobalSettings::generalFont();
setFont(font);
setFrameStyle(TQFrame::NoFrame);
setValidator(val);
@@ -686,7 +686,7 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
// -----
activeCol = -1;
activeRow = -1;
- font=KGlobalSettings::generalFont();
+ font=TDEGlobalSettings::generalFont();
setFont(font);
setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff);
@@ -694,17 +694,17 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
setNumCols(3);
d = new KDateInternalMonthPrivate(date.year(), date.month(), date.day());
// For monthsInYear != 12
- setNumRows( (KGlobal::locale()->calendar()->monthsInYear(date) + 2) / 3);
+ setNumRows( (TDEGlobal::locale()->calendar()->monthsInYear(date) + 2) / 3);
// enable to find drawing failures:
// setTableFlags(Tbl_clipCellPainting);
- viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker
+ viewport()->setEraseColor(TDEGlobalSettings::baseColor()); // for consistency with the datepicker
// ----- find the preferred size
// (this is slow, possibly, but unfortunately it is needed here):
TQFontMetrics metrics(font);
for(int i = 1; ; ++i)
{
- TQString str = KGlobal::locale()->calendar()->monthName(i,
- KGlobal::locale()->calendar()->year(date), false);
+ TQString str = TDEGlobal::locale()->calendar()->monthName(i,
+ TDEGlobal::locale()->calendar()->year(date), false);
if (str.isNull()) break;
rect=metrics.boundingRect(str);
if(max.width()<rect.width()) max.setWidth(rect.width());
@@ -728,7 +728,7 @@ KDateInternalMonthPicker::getResult() const
void
KDateInternalMonthPicker::setupPainter(TQPainter *p)
{
- p->setPen(KGlobalSettings::textColor());
+ p->setPen(TDEGlobalSettings::textColor());
}
void
@@ -745,8 +745,8 @@ KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
TQString text;
// ----- find 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,
+ text=TDEGlobal::locale()->calendar()->monthName(index,
+ TDEGlobal::locale()->calendar()->year(TQDate(d->year, d->month,
d->day)), false);
painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
if ( activeCol == col && activeRow == row )
@@ -855,7 +855,7 @@ KDateInternalYearSelector::KDateInternalYearSelector
{
TQFont font;
// -----
- font=KGlobalSettings::generalFont();
+ font=TDEGlobalSettings::generalFont();
setFont(font);
setFrameStyle(TQFrame::NoFrame);
// we have to respect the limits of TQDate here, I fear:
@@ -879,7 +879,7 @@ KDateInternalYearSelector::yearEnteredSlot()
return;
}
//date.setYMD(year, 1, 1);
- KGlobal::locale()->calendar()->setYMD(date, year, 1, 1);
+ TDEGlobal::locale()->calendar()->setYMD(date, year, 1, 1);
if(!date.isValid())
{
KNotifyClient::beep();
@@ -982,7 +982,7 @@ void
KPopupFrame::popup(const TQPoint &pos)
{
// Make sure the whole popup is visible.
- TQRect d = KGlobalSettings::desktopGeometry(pos);
+ TQRect d = TDEGlobalSettings::desktopGeometry(pos);
int x = pos.x();
int y = pos.y();