summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/calendar
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:30:37 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:30:37 -0600
commit00c3041bcca175069e36271b72188965ad1ffcf5 (patch)
treeac654751aa6d89f7da1faf4af1db1121164250b5 /kipi-plugins/calendar
parentcee209f8b3fe41533e21171f62ca32c552c2d2b3 (diff)
downloadkipi-plugins-00c3041bcca175069e36271b72188965ad1ffcf5.tar.gz
kipi-plugins-00c3041bcca175069e36271b72188965ad1ffcf5.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'kipi-plugins/calendar')
-rw-r--r--kipi-plugins/calendar/calformatter.cpp14
-rw-r--r--kipi-plugins/calendar/calpainter.cpp28
-rw-r--r--kipi-plugins/calendar/calselect.cpp22
-rw-r--r--kipi-plugins/calendar/calsettings.cpp2
-rw-r--r--kipi-plugins/calendar/calwidget.cpp4
-rw-r--r--kipi-plugins/calendar/calwizard.cpp18
-rw-r--r--kipi-plugins/calendar/monthwidget.cpp4
7 files changed, 46 insertions, 46 deletions
diff --git a/kipi-plugins/calendar/calformatter.cpp b/kipi-plugins/calendar/calformatter.cpp
index f0f8f4c..8acc8d8 100644
--- a/kipi-plugins/calendar/calformatter.cpp
+++ b/kipi-plugins/calendar/calformatter.cpp
@@ -99,8 +99,8 @@ void CalFormatter::init(int year, const TQString & ohFile, const TQString & fhFi
calendar = new KCal::CalendarLocal("UTC");
if (calendar->load(ohFile)) {
TQDate dtFirst, dtLast;
- KGlobal::locale()->calendar()->setYMD(dtFirst, year_, 1, 1);
- KGlobal::locale()->calendar()->setYMD(dtLast, year_ + 1, 1, 1);
+ TDEGlobal::locale()->calendar()->setYMD(dtFirst, year_, 1, 1);
+ TDEGlobal::locale()->calendar()->setYMD(dtLast, year_ + 1, 1, 1);
dtLast = dtLast.addDays(-1);
KCal::Event::List list = calendar->rawEvents(dtFirst, dtLast);
@@ -155,8 +155,8 @@ void CalFormatter::init(int year, const TQString & ohFile, const TQString & fhFi
bool CalFormatter::isPrayDay(int month, int day)
{
TQDate dt;
- KGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
- return (dt.dayOfWeek() == KGlobal::locale()->calendar()->weekDayOfPray());
+ TDEGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
+ return (dt.dayOfWeek() == TDEGlobal::locale()->calendar()->weekDayOfPray());
}
/*!
@@ -165,7 +165,7 @@ bool CalFormatter::isPrayDay(int month, int day)
bool KIPICalendarPlugin::CalFormatter::isSpecial(int month, int day)
{
TQDate dt;
- KGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
+ TDEGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
return (isPrayDay(month,day) || d->oh.contains(dt) || d->fh.contains(dt));
}
@@ -177,7 +177,7 @@ bool KIPICalendarPlugin::CalFormatter::isSpecial(int month, int day)
TQColor KIPICalendarPlugin::CalFormatter::getDayColor(int month, int day)
{
TQDate dt;
- KGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
+ TDEGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
if (isPrayDay(month, day))
return TQt::red;
@@ -199,7 +199,7 @@ TQColor KIPICalendarPlugin::CalFormatter::getDayColor(int month, int day)
TQString KIPICalendarPlugin::CalFormatter::getDayDescr(int month, int day)
{
TQDate dt;
- KGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
+ TDEGlobal::locale()->calendar()->setYMD(dt, year_, month, day);
TQString ret;
diff --git a/kipi-plugins/calendar/calpainter.cpp b/kipi-plugins/calendar/calpainter.cpp
index d527eaf..7e791a8 100644
--- a/kipi-plugins/calendar/calpainter.cpp
+++ b/kipi-plugins/calendar/calpainter.cpp
@@ -88,19 +88,19 @@ void CalPainter::paint(bool useDeviceMetrics)
// --------------------------------------------------
int days[42];
- int startDayOffset = KGlobal::locale()->weekStartDay();
+ int startDayOffset = TDEGlobal::locale()->weekStartDay();
for (int i=0; i<42; i++)
days[i] = -1;
TQDate d;
- KGlobal::locale()->calendar()->setYMD(d, year_, month_, 1);
+ TDEGlobal::locale()->calendar()->setYMD(d, year_, month_, 1);
int s = d.dayOfWeek();
if (s+7-startDayOffset >= 7)
s=s-7;
- for (int i=s; i<(s+KGlobal::locale()->calendar()->daysInMonth(d)); i++) {
+ for (int i=s; i<(s+TDEGlobal::locale()->calendar()->daysInMonth(d)); i++) {
days[i + (7-startDayOffset)] = i-s+1;
}
@@ -217,10 +217,10 @@ void CalPainter::paint(bool useDeviceMetrics)
TQString::number(year_));
#if KDE_IS_VERSION(3,2,0)
painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter,
- KGlobal::locale()->calendar()->monthName(month_, year_));
+ TDEGlobal::locale()->calendar()->monthName(month_, year_));
#else
painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter,
- KGlobal::locale()->monthName(month_));
+ TDEGlobal::locale()->monthName(month_));
#endif
painter->restore();
@@ -251,10 +251,10 @@ void CalPainter::paint(bool useDeviceMetrics)
rsmall.setHeight(r.height() - 2);
#if KDE_IS_VERSION(3,2,0)
painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom,
- KGlobal::locale()->calendar()->weekDayName(dayname, true));
+ TDEGlobal::locale()->calendar()->weekDayName(dayname, true));
#else
painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom,
- KGlobal::locale()->weekDayName(dayname, true));
+ TDEGlobal::locale()->weekDayName(dayname, true));
#endif
}
@@ -315,19 +315,19 @@ CalBlockPainter::CalBlockPainter(TQObject *parent, int year, int month,
// --------------------------------------------------
int days[42];
- int startDayOffset = KGlobal::locale()->weekStartDay();
+ int startDayOffset = TDEGlobal::locale()->weekStartDay();
for (int i=0; i<42; i++)
days[i] = -1;
TQDate d;
- KGlobal::locale()->calendar()->setYMD(d, year, month, 1);
+ TDEGlobal::locale()->calendar()->setYMD(d, year, month, 1);
int s = d.dayOfWeek();
if (s+7-startDayOffset >= 7)
s=s-7;
- for (int i=s; i<(s+KGlobal::locale()->calendar()->daysInMonth(d)); i++) {
+ for (int i=s; i<(s+TDEGlobal::locale()->calendar()->daysInMonth(d)); i++) {
days[i+(7-startDayOffset)] = i-s+1;
}
@@ -443,10 +443,10 @@ CalBlockPainter::CalBlockPainter(TQObject *parent, int year, int month,
TQString::number(year));
#if KDE_IS_VERSION(3,2,0)
painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter,
- KGlobal::locale()->calendar()->monthName(month, year));
+ TDEGlobal::locale()->calendar()->monthName(month, year));
#else
painter->drawText(rCalHeader, TQt::AlignRight|TQt::AlignVCenter,
- KGlobal::locale()->monthName(month));
+ TDEGlobal::locale()->monthName(month));
#endif
painter->restore();
@@ -477,10 +477,10 @@ CalBlockPainter::CalBlockPainter(TQObject *parent, int year, int month,
rsmall.setHeight(r.height() - 2);
#if KDE_IS_VERSION(3,2,0)
painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom,
- KGlobal::locale()->calendar()->weekDayName(dayname, true));
+ TDEGlobal::locale()->calendar()->weekDayName(dayname, true));
#else
painter->drawText(rsmall, TQt::AlignRight|TQt::AlignBottom,
- KGlobal::locale()->weekDayName(dayname, true));
+ TDEGlobal::locale()->weekDayName(dayname, true));
#endif
}
diff --git a/kipi-plugins/calendar/calselect.cpp b/kipi-plugins/calendar/calselect.cpp
index 08e9dee..2277853 100644
--- a/kipi-plugins/calendar/calselect.cpp
+++ b/kipi-plugins/calendar/calselect.cpp
@@ -71,10 +71,10 @@ void CalSelect::setupView( KIPI::Interface* interface )
yearBox->layout()->addItem(new TQSpacerItem(5,5,
TQSizePolicy::Expanding,
TQSizePolicy::Minimum));
- yearSpin_ = new TQSpinBox(KGlobal::locale()->calendar()->minValidYear(),
- KGlobal::locale()->calendar()->maxValidYear(),
+ yearSpin_ = new TQSpinBox(TDEGlobal::locale()->calendar()->minValidYear(),
+ TDEGlobal::locale()->calendar()->maxValidYear(),
1,yearBox);
- yearSpin_->setValue(KGlobal::locale()->calendar()->year(TQDate::currentDate()));
+ yearSpin_->setValue(TDEGlobal::locale()->calendar()->year(TQDate::currentDate()));
slotYearChanged(yearSpin_->value());
connect(yearSpin_, TQT_SIGNAL(valueChanged(int)),
@@ -98,8 +98,8 @@ void CalSelect::setupView( KIPI::Interface* interface )
urlList = images.images();
TQDate d;
- KGlobal::locale()->calendar()->setYMD(d, yearSpin_->value(), 1, 1);
- unsigned int months = KGlobal::locale()->calendar()->monthsInYear(d);
+ TDEGlobal::locale()->calendar()->setYMD(d, yearSpin_->value(), 1, 1);
+ unsigned int months = TDEGlobal::locale()->calendar()->monthsInYear(d);
// span the monthWidgets over 2 rows. inRow should usually be 6 or 7 (for 12 or 13 months)
int inRow = (months / 2) + ((months % 2) != 0);
MonthWidget *w;
@@ -135,20 +135,20 @@ void CalSelect::slotYearChanged(int year)
{
int i, months;
TQDate d, oldD;
- KGlobal::locale()->calendar()->setYMD(d, year, 1, 1);
- KGlobal::locale()->calendar()->setYMD(oldD, CalSettings::instance()->getYear(), 1, 1);
- months = KGlobal::locale()->calendar()->monthsInYear(d);
+ TDEGlobal::locale()->calendar()->setYMD(d, year, 1, 1);
+ TDEGlobal::locale()->calendar()->setYMD(oldD, CalSettings::instance()->getYear(), 1, 1);
+ months = TDEGlobal::locale()->calendar()->monthsInYear(d);
- if ((KGlobal::locale()->calendar()->monthsInYear(oldD) != months) && !mwVector_->isEmpty())
+ if ((TDEGlobal::locale()->calendar()->monthsInYear(oldD) != months) && !mwVector_->isEmpty())
{
// hide the last months that are not present on the current year
- for (i=months; (i<KGlobal::locale()->calendar()->monthsInYear(oldD)) && (i<(int)mwVector_->count()); i++)
+ for (i=months; (i<TDEGlobal::locale()->calendar()->monthsInYear(oldD)) && (i<(int)mwVector_->count()); i++)
mwVector_->at(i)->hide();
// span the monthWidgets over 2 rows. inRow should usually be 6 or 7 (for 12 or 13 months)
int inRow = (months / 2) + ((months % 2) != 0);
// remove all the monthWidgets, then readd the needed ones
- for (i=0; i<KGlobal::locale()->calendar()->monthsInYear(oldD); i++) {
+ for (i=0; i<TDEGlobal::locale()->calendar()->monthsInYear(oldD); i++) {
monthBoxLayout_->remove(mwVector_->at(i));
}
for (i=0; (i<months) && (i<(int)mwVector_->count()); i++) {
diff --git a/kipi-plugins/calendar/calsettings.cpp b/kipi-plugins/calendar/calsettings.cpp
index 2c5f112..ce9c657 100644
--- a/kipi-plugins/calendar/calsettings.cpp
+++ b/kipi-plugins/calendar/calsettings.cpp
@@ -37,7 +37,7 @@ CalSettings* CalSettings::instance_ = 0;
CalSettings::CalSettings()
{
instance_ = this;
- year_ = KGlobal::locale()->calendar()->minValidYear() + 1;
+ year_ = TDEGlobal::locale()->calendar()->minValidYear() + 1;
}
CalSettings::~CalSettings()
diff --git a/kipi-plugins/calendar/calwidget.cpp b/kipi-plugins/calendar/calwidget.cpp
index 9f40e39..f32e8e7 100644
--- a/kipi-plugins/calendar/calwidget.cpp
+++ b/kipi-plugins/calendar/calwidget.cpp
@@ -78,8 +78,8 @@ void CalWidget::recreate()
if (!calPainter_)
calPainter_ = new CalPainter(TQT_TQPAINTDEVICE(pix_));
- calPainter_->setYearMonth(KGlobal::locale()->calendar()->year(TQDate::currentDate()),
- KGlobal::locale()->calendar()->month(TQDate::currentDate()));
+ calPainter_->setYearMonth(TDEGlobal::locale()->calendar()->year(TQDate::currentDate()),
+ TDEGlobal::locale()->calendar()->month(TQDate::currentDate()));
calPainter_->paint();
update();
}
diff --git a/kipi-plugins/calendar/calwizard.cpp b/kipi-plugins/calendar/calwizard.cpp
index 51d69d5..647552e 100644
--- a/kipi-plugins/calendar/calwizard.cpp
+++ b/kipi-plugins/calendar/calwizard.cpp
@@ -196,12 +196,12 @@ void CalWizard::slotPageSelected(const TQString&)
TQString month;
TQStringList printList;
TQDate d;
- KGlobal::locale()->calendar()->setYMD(d, cSettings_->getYear(), 1, 1);
- for (int i=1; i<=KGlobal::locale()->calendar()->monthsInYear(d); i++) {
+ TDEGlobal::locale()->calendar()->setYMD(d, cSettings_->getYear(), 1, 1);
+ for (int i=1; i<=TDEGlobal::locale()->calendar()->monthsInYear(d); i++) {
#if KDE_IS_VERSION(3,2,0)
- month = KGlobal::locale()->calendar()->monthName(i, cSettings_->getYear(), false);
+ month = TDEGlobal::locale()->calendar()->monthName(i, cSettings_->getYear(), false);
#else
- month = KGlobal::locale()->monthName(i);
+ month = TDEGlobal::locale()->monthName(i);
#endif
image = cSettings_->getImage(i);
if (!image.isEmpty()) {
@@ -215,9 +215,9 @@ void CalWizard::slotPageSelected(const TQString&)
TQString year = TQString::number(cSettings_->getYear());
TQString extra;
- if ((KGlobal::locale()->calendar()->month(TQDate::currentDate()) >= 6 &&
- KGlobal::locale()->calendar()->year(TQDate::currentDate()) == cSettings_->getYear()) ||
- KGlobal::locale()->calendar()->year(TQDate::currentDate()) > cSettings_->getYear())
+ if ((TDEGlobal::locale()->calendar()->month(TQDate::currentDate()) >= 6 &&
+ TDEGlobal::locale()->calendar()->year(TQDate::currentDate()) == cSettings_->getYear()) ||
+ TDEGlobal::locale()->calendar()->year(TQDate::currentDate()) > cSettings_->getYear())
extra = "<br><br><b>"+i18n("Please note that you are making a "
"calendar for<br>the current year or a year in the "
"past.")+"</b>";
@@ -320,11 +320,11 @@ void CalWizard::slotPrintOnePage()
#if KDE_IS_VERSION(3,2,0)
wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2")
- .arg(KGlobal::locale()->calendar()->monthName(month, cSettings_->getYear(), false))
+ .arg(TDEGlobal::locale()->calendar()->monthName(month, cSettings_->getYear(), false))
.arg(yearName));
#else
wFinishLabel_->setText(i18n("Printing Calendar Page for %1 of %2")
- .arg(KGlobal::locale()->monthName(month)).
+ .arg(TDEGlobal::locale()->monthName(month)).
.arg(yearName));
#endif
diff --git a/kipi-plugins/calendar/monthwidget.cpp b/kipi-plugins/calendar/monthwidget.cpp
index ccf173f..447c747 100644
--- a/kipi-plugins/calendar/monthwidget.cpp
+++ b/kipi-plugins/calendar/monthwidget.cpp
@@ -86,9 +86,9 @@ void MonthWidget::drawContents(TQPainter *p)
{
#if KDE_IS_VERSION(3,2,0)
- TQString name = KGlobal::locale()->calendar()->monthName(month_, CalSettings::instance()->getYear(), true);
+ TQString name = TDEGlobal::locale()->calendar()->monthName(month_, CalSettings::instance()->getYear(), true);
#else
- TQString name = KGlobal::locale()->monthName(month_, true);
+ TQString name = TDEGlobal::locale()->monthName(month_, true);
#endif
TQRect cr;