diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:18:28 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:18:28 -0600 |
commit | 934db26c3f8efe148a5680c22f965ee10f818a61 (patch) | |
tree | 4a47cbb3ef398d11fa9283b5afdcd0a8d84fad7c | |
parent | a1fb52e00e362130a46b34570e53f2c1f322f373 (diff) | |
download | basket-934db26c3f8efe148a5680c22f965ee10f818a61.tar.gz basket-934db26c3f8efe148a5680c22f965ee10f818a61.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
-rw-r--r-- | src/archive.cpp | 2 | ||||
-rw-r--r-- | src/backgroundmanager.cpp | 8 | ||||
-rw-r--r-- | src/backup.cpp | 4 | ||||
-rw-r--r-- | src/basket.cpp | 14 | ||||
-rw-r--r-- | src/basketlistview.cpp | 22 | ||||
-rw-r--r-- | src/basketproperties.cpp | 4 | ||||
-rw-r--r-- | src/bnpview.cpp | 14 | ||||
-rw-r--r-- | src/exporterdialog.cpp | 4 | ||||
-rw-r--r-- | src/formatimporter.cpp | 2 | ||||
-rw-r--r-- | src/global.cpp | 4 | ||||
-rw-r--r-- | src/global.h | 4 | ||||
-rw-r--r-- | src/htmlexporter.cpp | 6 | ||||
-rw-r--r-- | src/kcolorcombo2.cpp | 24 | ||||
-rw-r--r-- | src/kcolorcombo2.h | 4 | ||||
-rw-r--r-- | src/kgpgme.cpp | 2 | ||||
-rw-r--r-- | src/kiconcanvas.cpp | 2 | ||||
-rw-r--r-- | src/kicondialog.cpp | 10 | ||||
-rw-r--r-- | src/likeback.cpp | 12 | ||||
-rw-r--r-- | src/linklabel.cpp | 6 | ||||
-rw-r--r-- | src/mainwindow.cpp | 16 | ||||
-rw-r--r-- | src/newbasketdialog.cpp | 22 | ||||
-rw-r--r-- | src/note.cpp | 30 | ||||
-rw-r--r-- | src/notecontent.cpp | 2 | ||||
-rw-r--r-- | src/noteedit.cpp | 4 | ||||
-rw-r--r-- | src/regiongrabber.cpp | 2 | ||||
-rw-r--r-- | src/settings.cpp | 4 | ||||
-rw-r--r-- | src/settings.h | 4 | ||||
-rw-r--r-- | src/systemtray.cpp | 2 | ||||
-rw-r--r-- | src/tag.cpp | 16 | ||||
-rw-r--r-- | src/tagsedit.cpp | 12 |
30 files changed, 131 insertions, 131 deletions
diff --git a/src/archive.cpp b/src/archive.cpp index 1b9490a..d6d8df1 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -461,7 +461,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder) void Archive::importArchivedBackgroundImages(const TQString &extractionFolder) { FormatImporter copier; // Only used to copy files synchronously - TQString destFolder = KGlobal::dirs()->saveLocation("data", "basket/backgrounds/"); + TQString destFolder = TDEGlobal::dirs()->saveLocation("data", "basket/backgrounds/"); TQDir dir(extractionFolder + "backgrounds/", /*nameFilder=*/"*.png", /*sortSpec=*/TQDir::Name | TQDir::IgnoreCase, /*filterSpec=*/TQDir::Files | TQDir::NoSymLinks); TQStringList files = dir.entryList(); diff --git a/src/backgroundmanager.cpp b/src/backgroundmanager.cpp index 73e56b2..a3b56e4 100644 --- a/src/backgroundmanager.cpp +++ b/src/backgroundmanager.cpp @@ -68,7 +68,7 @@ OpaqueBackgroundEntry::~OpaqueBackgroundEntry() BackgroundManager::BackgroundManager() { /// std::cout << "BackgroundManager: Found the following background images in "; - TQStringList directories = KGlobal::dirs()->resourceDirs("data"); // eg. { "/home/seb/.trinity/share/apps/", "/usr/share/apps/" } + TQStringList directories = TDEGlobal::dirs()->resourceDirs("data"); // eg. { "/home/seb/.trinity/share/apps/", "/usr/share/apps/" } // For each folder: for (TQStringList::Iterator it = directories.begin(); it != directories.end(); ++it) { // For each file in those directories: @@ -266,7 +266,7 @@ TQPixmap* BackgroundManager::preview(const TQString &image) return entry->preview; // Then, try to load the preview from file: - TQString previewPath = KGlobal::dirs()->findResource("data", "basket/backgrounds/previews/" + entry->name); + TQString previewPath = TDEGlobal::dirs()->findResource("data", "basket/backgrounds/previews/" + entry->name); TQPixmap *previewPixmap = new TQPixmap(previewPath); // Success: if (!previewPixmap->isNull()) { @@ -319,7 +319,7 @@ TQPixmap* BackgroundManager::preview(const TQString &image) painter.end(); // Saving it to file for later: - TQString folder = KGlobal::dirs()->saveLocation("data", "basket/backgrounds/previews/"); + TQString folder = TDEGlobal::dirs()->saveLocation("data", "basket/backgrounds/previews/"); result->save(folder + entry->name, "PNG"); // Ouf! That's done: @@ -343,7 +343,7 @@ TQString BackgroundManager::previewPathForImageName(const TQString &image) if (entry == 0) return ""; else { - TQString previewPath = KGlobal::dirs()->findResource("data", "basket/backgrounds/previews/" + entry->name); + TQString previewPath = TDEGlobal::dirs()->findResource("data", "basket/backgrounds/previews/" + entry->name); TQDir dir; if (!dir.exists(previewPath)) return ""; diff --git a/src/backup.cpp b/src/backup.cpp index 807ac35..3572be5 100644 --- a/src/backup.cpp +++ b/src/backup.cpp @@ -166,7 +166,7 @@ void BackupDialog::backup() TQDir dir; // Compute a default file name & path (eg. "Baskets_2007-01-31.tar.gz"): - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("Backups"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1") @@ -224,7 +224,7 @@ void BackupDialog::backup() void BackupDialog::restore() { // Get last backup folder: - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("Backups"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; diff --git a/src/basket.cpp b/src/basket.cpp index a20a5c9..69b941e 100644 --- a/src/basket.cpp +++ b/src/basket.cpp @@ -2767,7 +2767,7 @@ void Basket::drawInserter(TQPainter &painter, int xPainter, int yPainter) TQColor dark = TDEApplication::palette().active().dark(); TQColor light = dark.light().light(); if (m_inserterGroup && Settings::groupOnInsertionLine()) - light = Tools::mixColor(light, KGlobalSettings::highlightColor()); + light = Tools::mixColor(light, TDEGlobalSettings::highlightColor()); painter.setPen(dark); // The horizontal line: //painter.drawRect( rect.x(), rect.y() + lineY, rect.width(), 2); @@ -3017,7 +3017,7 @@ void Basket::animateLoad() TQColor Basket::selectionRectInsideColor() { - return Tools::mixColor(Tools::mixColor(backgroundColor(), KGlobalSettings::highlightColor()), backgroundColor()); + return Tools::mixColor(Tools::mixColor(backgroundColor(), TDEGlobalSettings::highlightColor()), backgroundColor()); } TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const int a) @@ -3088,7 +3088,7 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt label->setAlignment( int( TQLabel::AlignTop ) ); layout->addMultiCellWidget( label, 0, 0, 1, 2 ); TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" ); - pixmap->setPixmap( KGlobal::iconLoader()->loadIcon("encrypted", KIcon::NoGroup, KIcon::SizeHuge) ); + pixmap->setPixmap( TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::NoGroup, KIcon::SizeHuge) ); layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 ); TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); @@ -3180,9 +3180,9 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt selectionRectInside.moveBy(rect.x(), rect.y()); blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, /*&*/m_selectedBackgroundPixmap); } - painter2.setPen(KGlobalSettings::highlightColor().dark()); + painter2.setPen(TDEGlobalSettings::highlightColor().dark()); painter2.drawRect(selectionRect); - painter2.setPen(Tools::mixColor(KGlobalSettings::highlightColor().dark(), backgroundColor())); + painter2.setPen(Tools::mixColor(TDEGlobalSettings::highlightColor().dark(), backgroundColor())); painter2.drawPoint(selectionRect.topLeft()); painter2.drawPoint(selectionRect.topRight()); painter2.drawPoint(selectionRect.bottomLeft()); @@ -3649,7 +3649,7 @@ TQColor Basket::backgroundColor() if (m_backgroundColorSetting.isValid()) return m_backgroundColorSetting; else - return KGlobalSettings::baseColor(); + return TDEGlobalSettings::baseColor(); } TQColor Basket::textColor() @@ -3657,7 +3657,7 @@ TQColor Basket::textColor() if (m_textColorSetting.isValid()) return m_textColorSetting; else - return KGlobalSettings::textColor(); + return TDEGlobalSettings::textColor(); } void Basket::unbufferizeAll() diff --git a/src/basketlistview.cpp b/src/basketlistview.cpp index a963f8f..a747a6d 100644 --- a/src/basketlistview.cpp +++ b/src/basketlistview.cpp @@ -274,17 +274,17 @@ TQPixmap BasketListViewItem::circledTextPixmap(const TQString &text, int height, TQPixmap gradient(3 * width, 3 * height); // We double the size to be able to smooth scale down it (== antialiased curves) TQPainter gradientPainter(&gradient); #if 1 // Enable the new look of the gradient: - TQColor topColor = KGlobalSettings::highlightColor().light(130); //120 - TQColor topMidColor = KGlobalSettings::highlightColor().light(105); //105 - TQColor bottomMidColor = KGlobalSettings::highlightColor().dark(130); //120 - TQColor bottomColor = KGlobalSettings::highlightColor(); + TQColor topColor = TDEGlobalSettings::highlightColor().light(130); //120 + TQColor topMidColor = TDEGlobalSettings::highlightColor().light(105); //105 + TQColor bottomMidColor = TDEGlobalSettings::highlightColor().dark(130); //120 + TQColor bottomColor = TDEGlobalSettings::highlightColor(); drawGradient(&gradientPainter, topColor, topMidColor, 0, 0, gradient.width(), gradient.height() / 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); drawGradient(&gradientPainter, bottomMidColor, bottomColor, 0, gradient.height() / 2, gradient.width(), gradient.height() - gradient.height() / 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); - gradientPainter.fillRect(0, 0, gradient.width(), 3, KGlobalSettings::highlightColor()); + gradientPainter.fillRect(0, 0, gradient.width(), 3, TDEGlobalSettings::highlightColor()); #else - drawGradient(&gradientPainter, KGlobalSettings::highlightColor(), KGlobalSettings::highlightColor().dark(), + drawGradient(&gradientPainter, TDEGlobalSettings::highlightColor(), TDEGlobalSettings::highlightColor().dark(), 0, 0, gradient.width(), gradient.height(), /*sunken=*/false, /*horz=*/true, /*flat=*/false); #endif gradientPainter.end(); @@ -347,7 +347,7 @@ TQPixmap BasketListViewItem::foundCountPixmap(bool isLoading, int countFound, bo return TQPixmap(); } - return circledTextPixmap(text, height, boldFont, KGlobalSettings::highlightedTextColor()); + return circledTextPixmap(text, height, boldFont, TDEGlobalSettings::highlightedTextColor()); } bool BasketListViewItem::haveChildsLoading() @@ -444,7 +444,7 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col bool drawRoundRect = m_basket->backgroundColorSetting().isValid() || m_basket->textColorSetting().isValid(); - TQColor textColor = (drawRoundRect ? m_basket->textColor() : (isCurrentBasket() ? KGlobalSettings::highlightedTextColor() : KGlobalSettings::textColor())); + TQColor textColor = (drawRoundRect ? m_basket->textColor() : (isCurrentBasket() ? TDEGlobalSettings::highlightedTextColor() : TDEGlobalSettings::textColor())); BasketListViewItem *shownAbove = shownItemAbove(); BasketListViewItem *shownBelow = shownItemBelow(); @@ -480,7 +480,7 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col TQPainter thePainter(&theBuffer); // Fill with the basket background color: - TQColor background = (isCurrentBasket() ? KGlobalSettings::highlightColor() : listView()->paletteBackgroundColor()); + TQColor background = (isCurrentBasket() ? TDEGlobalSettings::highlightColor() : listView()->paletteBackgroundColor()); thePainter.fillRect(0, 0, width, height(), background); int textWidth = effectiveWidth - MARGIN - BASKET_ICON_SIZE - MARGIN - MARGIN; @@ -515,7 +515,7 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col } TQColor bgColor = listView()->paletteBackgroundColor(); - TQColor selColor = KGlobalSettings::highlightColor(); + TQColor selColor = TDEGlobalSettings::highlightColor(); TQColor midColor = Tools::mixColor(bgColor, selColor); // Draw the left selection roundings: if (isCurrentBasket()) { @@ -780,7 +780,7 @@ void BasketTreeListView::paintEmptyArea(TQPainter *painter, const TQRect &rect) if (last && last->isCurrentBasket()) { int y = last->itemPos() + last->height(); TQColor bgColor = paletteBackgroundColor(); - TQColor selColor = KGlobalSettings::highlightColor(); + TQColor selColor = TDEGlobalSettings::highlightColor(); TQColor midColor = Tools::mixColor(bgColor, selColor); painter->setPen(selColor); painter->drawPoint(visibleWidth() - 1, y); diff --git a/src/basketproperties.cpp b/src/basketproperties.cpp index 2ab6f42..70d5d33 100644 --- a/src/basketproperties.cpp +++ b/src/basketproperties.cpp @@ -71,8 +71,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent) TQWidget *appearanceWidget = new TQWidget(appearance); TQGridLayout *grid = new TQGridLayout(appearanceWidget, /*nRows=*/3, /*nCols=*/2, /*margin=*/0, spacingHint()); m_backgroundImage = new TQComboBox(appearanceWidget); - m_backgroundColor = new KColorCombo2(m_basket->backgroundColorSetting(), KGlobalSettings::baseColor(), appearanceWidget); - m_textColor = new KColorCombo2(m_basket->textColorSetting(), KGlobalSettings::textColor(), appearanceWidget); + m_backgroundColor = new KColorCombo2(m_basket->backgroundColorSetting(), TDEGlobalSettings::baseColor(), appearanceWidget); + m_textColor = new KColorCombo2(m_basket->textColorSetting(), TDEGlobalSettings::textColor(), appearanceWidget); TQLabel *label1 = new TQLabel(m_backgroundImage, i18n("Background &image:"), appearanceWidget); TQLabel *label2 = new TQLabel(m_backgroundColor, i18n("&Background color:"), appearanceWidget); TQLabel *label3 = new TQLabel(m_textColor, i18n("&Text color:"), appearanceWidget); diff --git a/src/bnpview.cpp b/src/bnpview.cpp index 48da913..1814615 100644 --- a/src/bnpview.cpp +++ b/src/bnpview.cpp @@ -93,7 +93,7 @@ BNPView::BNPView(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient, Global::bnpView = this; // Needed when loading the baskets: - Global::globalAccel = new KGlobalAccel(TQT_TQOBJECT(this)); // FIXME: might be null (KPart case)! + Global::globalAccel = new TDEGlobalAccel(TQT_TQOBJECT(this)); // FIXME: might be null (KPart case)! Global::backgroundManager = new BackgroundManager(); setupGlobalShortcuts(); @@ -205,11 +205,11 @@ void BNPView::addWelcomeBaskets() { // Possible paths where to find the welcome basket archive, trying the translated one, and falling back to the English one: TQStringList possiblePaths; - if (TQString(KGlobal::locale()->encoding()) == TQString("UTF-8")) { // Welcome baskets are encoded in UTF-8. If the system is not, then use the English version: - possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + KGlobal::locale()->language() + ".baskets")); - possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TQStringList::split("_", KGlobal::locale()->language())[0] + ".baskets")); + if (TQString(TDEGlobal::locale()->encoding()) == TQString("UTF-8")) { // Welcome baskets are encoded in UTF-8. If the system is not, then use the English version: + possiblePaths.append(TDEGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TDEGlobal::locale()->language() + ".baskets")); + possiblePaths.append(TDEGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TQStringList::split("_", TDEGlobal::locale()->language())[0] + ".baskets")); } - possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_en_US.baskets")); + possiblePaths.append(TDEGlobal::dirs()->findResource("data", "basket/welcome/Welcome_en_US.baskets")); // Take the first EXISTING basket archive found: TQDir dir; @@ -265,7 +265,7 @@ void BNPView::onFirstShow() void BNPView::setupGlobalShortcuts() { /* Global shortcuts */ - KGlobalAccel *globalAccel = Global::globalAccel; // Better for the following lines + TDEGlobalAccel *globalAccel = Global::globalAccel; // Better for the following lines // Ctrl+Shift+W only works when started standalone: TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->parent()->inherits("MainWindow") ? Global::bnpView->parent() : 0); @@ -1793,7 +1793,7 @@ void BNPView::saveAsArchive() TQDir dir; - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("Basket Archive"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString url = folder + TQString(basket->basketName()).replace("/", "_") + ".baskets"; diff --git a/src/exporterdialog.cpp b/src/exporterdialog.cpp index fa753f7..5edc1bb 100644 --- a/src/exporterdialog.cpp +++ b/src/exporterdialog.cpp @@ -88,7 +88,7 @@ void ExporterDialog::show() void ExporterDialog::load() { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("HTML Export"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; @@ -103,7 +103,7 @@ void ExporterDialog::load() void ExporterDialog::save() { - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("HTML Export"); TQString folder = KURL(m_url->url()).directory(); diff --git a/src/formatimporter.cpp b/src/formatimporter.cpp index a0a24ad..00045f4 100644 --- a/src/formatimporter.cpp +++ b/src/formatimporter.cpp @@ -188,7 +188,7 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName) TQDomElement properties = XMLWork::getElement(docElem, "properties"); TQDomElement background = XMLWork::getElement(properties, "background"); TQColor backgroundColor = TQColor(background.attribute("color")); - if (backgroundColor.isValid() && (backgroundColor != KGlobalSettings::baseColor())) { // Use the default color if it was already that color: + if (backgroundColor.isValid() && (backgroundColor != TDEGlobalSettings::baseColor())) { // Use the default color if it was already that color: TQDomElement appearance = document->createElement("appearance"); appearance.setAttribute("backgroundColor", backgroundColor.name()); properties.appendChild(appearance); diff --git a/src/global.cpp b/src/global.cpp index f8b6f74..220147f 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -40,7 +40,7 @@ DebugWindow *Global::debugWindow = 0L; BackgroundManager *Global::backgroundManager = 0L; SystemTray *Global::systemTray = 0L; BNPView *Global::bnpView = 0L; -KGlobalAccel *Global::globalAccel = 0L; +TDEGlobalAccel *Global::globalAccel = 0L; KConfig *Global::basketConfig = 0L; AboutData Global::basketAbout; @@ -64,7 +64,7 @@ TQString Global::savesFolder() dir.mkdir(s_customSavesFolder); folder = new TQString(Settings::dataFolder().endsWith("/") ? Settings::dataFolder() : Settings::dataFolder() + "/"); } else { // The default path (should be that for most computers) - folder = new TQString(KGlobal::dirs()->saveLocation("data", "basket/")); + folder = new TQString(TDEGlobal::dirs()->saveLocation("data", "basket/")); } } diff --git a/src/global.h b/src/global.h index 7c4af68..35571ac 100644 --- a/src/global.h +++ b/src/global.h @@ -29,7 +29,7 @@ class DebugWindow; class BackgroundManager; class SystemTray; class BNPView; -class KGlobalAccel; +class TDEGlobalAccel; class KMainWindow; class TDEAboutData; @@ -49,7 +49,7 @@ class Global static BackgroundManager *backgroundManager; static SystemTray *systemTray; static BNPView *bnpView; - static KGlobalAccel *globalAccel; + static TDEGlobalAccel *globalAccel; static KConfig *basketConfig; static AboutData basketAbout; diff --git a/src/htmlexporter.cpp b/src/htmlexporter.cpp index ae34b00..f9ef3d3 100644 --- a/src/htmlexporter.cpp +++ b/src/htmlexporter.cpp @@ -44,7 +44,7 @@ HTMLExporter::HTMLExporter(Basket *basket) TQDir dir; // Compute a default file name & path: - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); config->setGroup("Export to HTML"); TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString url = folder + TQString(basket->basketName()).replace("/", "_") + ".html"; @@ -232,8 +232,8 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) " .tree span { -moz-border-radius: 6px; display: block; float: left;\n" " line-height: 16px; height: 16px; vertical-align: middle; padding: 0 1px; }\n" " .tree img { vertical-align: top; padding-right: 1px; }\n" - " .tree .current { background-color: " << KGlobalSettings::highlightColor().name() << "; " - "-moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; color: " << KGlobalSettings::highlightedTextColor().name() << "; }\n" + " .tree .current { background-color: " << TDEGlobalSettings::highlightColor().name() << "; " + "-moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; color: " << TDEGlobalSettings::highlightedTextColor().name() << "; }\n" " .basketSurrounder { margin-left: 152px; _margin: 0; _float: right; }\n"; } stream << diff --git a/src/kcolorcombo2.cpp b/src/kcolorcombo2.cpp index 04f1b43..1671186 100644 --- a/src/kcolorcombo2.cpp +++ b/src/kcolorcombo2.cpp @@ -84,8 +84,8 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! // Initialize the pixmap: m_pixmap.resize(width, height); TQPainter painter(&m_pixmap); - painter.fillRect(0, 0, width, height, KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, width, height, TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, width, height); // Needed to draw: @@ -99,7 +99,7 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! y = 1 + MARGIN + (colorHeight + MARGIN) * j; if (i == m_selectedColumn && j == m_selectedRow) { selectionRect = TQRect(x - 2, y - 2, colorWidth + 4, colorHeight + 4); - painter.fillRect(selectionRect, KGlobalSettings::highlightColor()); + painter.fillRect(selectionRect, TDEGlobalSettings::highlightColor()); } m_selector->drawColorRect(painter, x, y, m_selector->colorAt(i, j), /*isDefault=*/false, colorWidth, colorHeight); } @@ -116,10 +116,10 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! x = 1 + MARGIN; if (m_selectedColumn < m_columnOther && rowCount == m_selectedRow) { selectionRect = TQRect(x - 2, y - 2, defaultCellWidth, colorHeight + 4); - painter.fillRect(selectionRect, KGlobalSettings::highlightColor()); - textColor = KGlobalSettings::highlightedTextColor(); + painter.fillRect(selectionRect, TDEGlobalSettings::highlightColor()); + textColor = TDEGlobalSettings::highlightedTextColor(); } else - textColor = KGlobalSettings::textColor(); + textColor = TDEGlobalSettings::textColor(); m_selector->drawColorRect(painter, x, y, m_selector->defaultColor(), /*isDefault=*/true, colorWidth, colorHeight); painter.setFont(m_selector->font()); painter.setPen(textColor); @@ -128,10 +128,10 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap! x = 1 + MARGIN + m_columnOther * (colorWidth + MARGIN); if (m_selectedColumn >= m_columnOther && rowCount == m_selectedRow) { selectionRect = TQRect(x - 2, y - 2, otherCellWidth, colorHeight + 4); - painter.fillRect(selectionRect, KGlobalSettings::highlightColor()); - textColor = KGlobalSettings::highlightedTextColor(); + painter.fillRect(selectionRect, TDEGlobalSettings::highlightColor()); + textColor = TDEGlobalSettings::highlightedTextColor(); } else - textColor = KGlobalSettings::textColor(); + textColor = TDEGlobalSettings::textColor(); m_selector->drawColorRect(painter, x, y, m_otherColor, /*isDefault=*/false, colorWidth, colorHeight); painter.setFont(m_selector->font()); painter.setPen(textColor); @@ -561,7 +561,7 @@ void KColorCombo2::drawColorRect(TQPainter &painter, int x, int y, const TQColor // Stroke: int dontCare, value; color.getHsv(/*hue:*/&dontCare, /*saturation:*/&dontCare, &value); - TQColor stroke = (color.isValid() ? color.dark(125) : KGlobalSettings::textColor()); + TQColor stroke = (color.isValid() ? color.dark(125) : TDEGlobalSettings::textColor()); painter.setPen(/*color);//*/stroke); painter.drawLine(x + 1, y, x + width - 2, y); painter.drawLine(x, y + 1, x, y + height - 2); @@ -630,7 +630,7 @@ void KColorCombo2::popup() setRainbowPreset(); // Compute where to show the popup: - TQRect desk = KGlobalSettings::desktopGeometry(this); + TQRect desk = TDEGlobalSettings::desktopGeometry(this); TQPoint popupPoint = mapToGlobal(TQPoint(0, 0)); @@ -715,7 +715,7 @@ void KColorCombo2::mousePressEvent(TQMouseEvent *event) void KColorCombo2::mouseMoveEvent(TQMouseEvent *event) { if( (event->state() & Qt::LeftButton) && - (event->pos() - m_dragStartPos).manhattanLength() > KGlobalSettings::dndEventDelay() ) { + (event->pos() - m_dragStartPos).manhattanLength() > TDEGlobalSettings::dndEventDelay() ) { // Drag color object: KColorDrag *colorDrag = new KColorDrag(effectiveColor(), this); // Replace the drag pixmap with our own rounded one, at the same position and dimetions: diff --git a/src/kcolorcombo2.h b/src/kcolorcombo2.h index 862a2a1..92d8d04 100644 --- a/src/kcolorcombo2.h +++ b/src/kcolorcombo2.h @@ -39,7 +39,7 @@ class KColorPopup; * * @par Quick usage: * Just create a new KColorCombo2() with the initial color and eventually an allowed default color - * (eg. KGlobalSettings::baseColor() for a background color, KGlobalSettings::textColor()...).\n + * (eg. TDEGlobalSettings::baseColor() for a background color, TDEGlobalSettings::textColor()...).\n * You will be noticed of the color the user selects with the signal changed(), or you can use color() to get the color at any moment.\n * Note that they can return an invalid color (see TQColor::isValid()) if the user chosen the default color (if he can choose that).\n * It's then easy to save in settings, but if you want the real color (even for the default), you can get it with effectiveColor(). @@ -66,7 +66,7 @@ class KColorPopup; * set before, or on first call of any accessors: colorAt(), columnCount(), setColorAt()...). * Finally, colorRectPixmap() and drawColorRect() allow to draw the color rounded-rectangle in other places for a consistent look. * - * @see KGlobalSettings Use one of the static functions to get TDE standard colors for default values. + * @see TDEGlobalSettings Use one of the static functions to get TDE standard colors for default values. * @see KColorButton The same, but without the rainbow popup or the choice of a default color. * @see KColorDialog The dialog that is shown when the user click the "Other..." entry. * @author Sébastien Laoût <slaout@linux62.org> diff --git a/src/kgpgme.cpp b/src/kgpgme.cpp index 72a5742..e3f7dff 100644 --- a/src/kgpgme.cpp +++ b/src/kgpgme.cpp @@ -53,7 +53,7 @@ class KGpgSelKey : public KDialogBase TQVBoxLayout* vbox; TQWidget* page = new TQWidget(this); TQLabel* labeltxt; - KIconLoader* loader = KGlobal::iconLoader(); + KIconLoader* loader = TDEGlobal::iconLoader(); TQPixmap keyPair = loader->loadIcon("kgpg_key2", KIcon::Small, 20); setMinimumSize(350,100); diff --git a/src/kiconcanvas.cpp b/src/kiconcanvas.cpp index a96ed6d..b080fe2 100644 --- a/src/kiconcanvas.cpp +++ b/src/kiconcanvas.cpp @@ -93,7 +93,7 @@ KIconCanvas::KIconCanvas(TQWidget *parent, const char *name) : KIconView(parent, name) { d = new KIconCanvasPrivate; - mpLoader = KGlobal::iconLoader(); + mpLoader = TDEGlobal::iconLoader(); mpTimer = new TQTimer(this); connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)), diff --git a/src/kicondialog.cpp b/src/kicondialog.cpp index 295fdb4..a812e85 100644 --- a/src/kicondialog.cpp +++ b/src/kicondialog.cpp @@ -84,7 +84,7 @@ KIconDialog::KIconDialog(TQWidget *parent, const char*) : KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok) { d = new KIconDialogPrivate; - mpLoader = KGlobal::iconLoader(); + mpLoader = TDEGlobal::iconLoader(); init(); resize(minimumSize()); } @@ -106,7 +106,7 @@ void KIconDialog::init() setCustomLocation(TQString()); // Initialize mFileList // Read configuration - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver(config, "KIconDialog"); d->recentMax = config->readNumEntry("RecentMax", 10); d->recentList = config->readPathListEntry("RecentIcons"); @@ -143,7 +143,7 @@ void KIconDialog::init() KIconDialog::~KIconDialog() { // Write configuration - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver(config, "KIconDialog"); config->writeEntry("RecentMax", d->recentMax, true, true); config->writePathEntry("RecentIcons", d->recentList, ',', true, true); @@ -277,7 +277,7 @@ void KIconDialog::setCustomLocation( const TQString& location ) if (location.isEmpty()) { - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); + mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); } else { mFileList = mpLoader->queryIconsByDir(location); } @@ -426,7 +426,7 @@ class KIconButton::KIconButtonPrivate KIconButton::KIconButton(TQWidget *parent, const char *name) : TQPushButton(parent, name) { - init( KGlobal::iconLoader() ); + init( TDEGlobal::iconLoader() ); } KIconButton::KIconButton(KIconLoader *loader, diff --git a/src/likeback.cpp b/src/likeback.cpp index 33161fc..ee0c23c 100644 --- a/src/likeback.cpp +++ b/src/likeback.cpp @@ -583,9 +583,9 @@ bool LikeBack::isDevelopmentVersion(const TQString &version) { if (m_process) return; - m_process = new KProcess(); + m_process = new TDEProcess(); *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); - connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(fetchUserEmail()) ); + connect( m_process, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(fetchUserEmail()) ); if (!m_process->start()) { kdDebug() << "Couldn't start kcmshell.." << endl; delete m_process; @@ -749,11 +749,11 @@ TQString LikeBackDialog::introductionText() TQStringList locales = m_likeBack->acceptedLocales(); for (TQStringList::Iterator it = locales.begin(); it != locales.end(); ++it) { TQString locale = *it; - if (KGlobal::locale()->language().startsWith(locale)) + if (TDEGlobal::locale()->language().startsWith(locale)) languagesMessage = ""; } } else { - if (!KGlobal::locale()->language().startsWith("en")) + if (!TDEGlobal::locale()->language().startsWith("en")) languagesMessage = i18n("Please write in English."); } @@ -761,7 +761,7 @@ TQString LikeBackDialog::introductionText() // TODO: Replace the URL with a localized one: text += languagesMessage + " " + i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.") - .arg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language()) + .arg("http://www.google.com/language_tools?hl=" + TDEGlobal::locale()->language()) + " "; // If both "I Like" and "I Dislike" buttons are shown and one is clicked: @@ -811,7 +811,7 @@ void LikeBackDialog::send() "protocol=" + KURL::encode_string("1.0") + '&' + "type=" + KURL::encode_string(type) + '&' + "version=" + KURL::encode_string(m_likeBack->aboutData()->version()) + '&' + - "locale=" + KURL::encode_string(KGlobal::locale()->language()) + '&' + + "locale=" + KURL::encode_string(TDEGlobal::locale()->language()) + '&' + "window=" + KURL::encode_string(m_windowPath) + '&' + "context=" + KURL::encode_string(m_context) + '&' + "comment=" + KURL::encode_string(m_comment->text()) + '&' + diff --git a/src/linklabel.cpp b/src/linklabel.cpp index 01978d8..8e2de2a 100644 --- a/src/linklabel.cpp +++ b/src/linklabel.cpp @@ -114,9 +114,9 @@ TQColor LinkLook::effectiveHoverColor() const TQColor LinkLook::defaultColor() const { if (m_useLinkColor) - return KGlobalSettings::linkColor(); + return TDEGlobalSettings::linkColor(); else - return KGlobalSettings::textColor(); + return TDEGlobalSettings::textColor(); } TQColor LinkLook::defaultHoverColor() const @@ -455,7 +455,7 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, // Figure out the text color: if (isSelected) - painter->setPen(KGlobalSettings::highlightedTextColor()); + painter->setPen(TDEGlobalSettings::highlightedTextColor()); else if (isIconButtonHovered) painter->setPen(m_look->effectiveHoverColor()); else if (!isDefaultColor || (!m_look->color().isValid() && !m_look->useLinkColor())) // If the color is FORCED or if the link color default to the text color: diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2c9ea69..63af3b1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -121,12 +121,12 @@ MainWindow::MainWindow(TQWidget *parent, const char *name) setStandardToolBarMenuEnabled(true); createGUI("basketui.rc"); - applyMainWindowSettings(KGlobal::config(), autoSaveGroup()); + applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); } MainWindow::~MainWindow() { - saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); + saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); delete m_settings; } @@ -158,7 +158,7 @@ void MainWindow::setupActions() else toolBar()->show(); - saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); }*/ void MainWindow::toggleStatusBar() @@ -168,12 +168,12 @@ void MainWindow::toggleStatusBar() else statusBar()->show(); - saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); } void MainWindow::configureToolbars() { - saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); connect( &dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); @@ -194,7 +194,7 @@ void MainWindow::slotNewToolbarConfig() // This is called when OK or Apply is cl if (!Global::bnpView->isPart()) Global::bnpView->connectTagsMenu(); // The Tags menu was created again! plugActionList( TQString::fromLatin1("go_baskets_list"), actBasketsList); - applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + applyMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); } void MainWindow::showSettingsDialog() @@ -259,7 +259,7 @@ void MainWindow::resizeEvent(TQResizeEvent *event) Settings::saveConfig(); // Added to make it work (previous lines do not work): - //saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + //saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); KMainWindow::resizeEvent(event); } @@ -270,7 +270,7 @@ void MainWindow::moveEvent(TQMoveEvent *event) Settings::saveConfig(); // Added to make it work (previous lines do not work): - //saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); + //saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() ); KMainWindow::moveEvent(event); } diff --git a/src/newbasketdialog.cpp b/src/newbasketdialog.cpp index c782583..5651815 100644 --- a/src/newbasketdialog.cpp +++ b/src/newbasketdialog.cpp @@ -106,7 +106,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro connect( m_name, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(nameChanged(const TQString&)) ); enableButtonOK(false); TQToolTip::add(m_name, i18n("Name")); - m_backgroundColor = new KColorCombo2(TQColor(), KGlobalSettings::baseColor(), page); + m_backgroundColor = new KColorCombo2(TQColor(), TDEGlobalSettings::baseColor(), page); m_backgroundColor->setColor(TQColor()); m_backgroundColor->setFixedSize(m_backgroundColor->sizeHint()); m_backgroundColor->setColor(m_defaultProperties.backgroundColor); @@ -148,8 +148,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro TQPixmap icon(40, 53); TQPainter painter(&icon); - painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.end(); lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("One column"), icon); @@ -158,8 +158,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro m_templates->setSelected(lastTemplate, true); painter.begin(&icon); - painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height()); painter.end(); @@ -169,8 +169,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro m_templates->setSelected(lastTemplate, true); painter.begin(&icon); - painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawLine(icon.width() / 3, 0, icon.width() / 3, icon.height()); painter.drawLine(icon.width() * 2 / 3, 0, icon.width() * 2 / 3, icon.height()); @@ -181,8 +181,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro m_templates->setSelected(lastTemplate, true); painter.begin(&icon); - painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(icon.width() / 5, icon.width() / 5, icon.width() / 4, icon.height() / 8); painter.drawRect(icon.width() * 2 / 5, icon.width() * 2 / 5, icon.width() / 4, icon.height() / 8); @@ -193,8 +193,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro m_templates->setSelected(lastTemplate, true); /* painter.begin(&icon); - painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); - painter.setPen(KGlobalSettings::textColor()); + painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor()); + painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(icon.width() * 2 / 5, icon.height() * 3 / 7, icon.width() / 5, icon.height() / 7); painter.end(); diff --git a/src/note.cpp b/src/note.cpp index adf859d..abc72dd 100644 --- a/src/note.cpp +++ b/src/note.cpp @@ -90,12 +90,12 @@ Note::~Note() TQString Note::addedStringDate() { - return KGlobal::locale()->formatDateTime(m_addedDate); + return TDEGlobal::locale()->formatDateTime(m_addedDate); } TQString Note::lastModificationStringDate() { - return KGlobal::locale()->formatDateTime(m_lastModificationDate); + return TDEGlobal::locale()->formatDateTime(m_lastModificationDate); } TQString Note::toText(const TQString &cuttedFullPath) @@ -1288,7 +1288,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro cg.setColor(TQColorGroup::Base, background); // Fill the inside of the expander in white, typically: - TQBrush brush(KGlobalSettings::baseColor()); + TQBrush brush(TDEGlobalSettings::baseColor()); painter->fillRect(x, y, 9, 9, brush); // Draw it: @@ -1776,7 +1776,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) // Draw gradient or resizer: if (m_hovered && m_hoveredZone == Resizer) { TQColor baseColor(basket()->backgroundColor()); - TQColor highColor(KGlobalSettings::highlightColor()); + TQColor highColor(TDEGlobalSettings::highlightColor()); drawResizer(&painter2, 0, 0, RESIZER_WIDTH, resizerHeight(), baseColor, highColor, /*rounded=*/!isColumn()); if (!isColumn()) { drawRoundings(&painter2, RESIZER_WIDTH - 3, 0, /*type=*/3); @@ -1808,9 +1808,9 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) selectionRectInside.moveBy(right, y()); basket()->blendBackground(painter2, selectionRectInside, right, y(), false); } - painter2.setPen(KGlobalSettings::highlightColor().dark()); + painter2.setPen(TDEGlobalSettings::highlightColor().dark()); painter2.drawRect(selectionRect); - painter2.setPen(Tools::mixColor(KGlobalSettings::highlightColor().dark(), basket()->backgroundColor())); + painter2.setPen(Tools::mixColor(TDEGlobalSettings::highlightColor().dark(), basket()->backgroundColor())); painter2.drawPoint(selectionRect.topLeft()); painter2.drawPoint(selectionRect.topRight()); painter2.drawPoint(selectionRect.bottomLeft()); @@ -1852,7 +1852,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) /** Initialise colors: */ TQColor baseColor(basket()->backgroundColor()); - TQColor highColor(KGlobalSettings::highlightColor()); + TQColor highColor(TDEGlobalSettings::highlightColor()); TQColor midColor = Tools::mixColor(baseColor, highColor); /** Initialise brushs and pens: */ @@ -1904,9 +1904,9 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) TQColor background = basket()->backgroundColor(); if (isSelected()) if (m_computedState.backgroundColor().isValid()) - background = Tools::mixColor(Tools::mixColor(m_computedState.backgroundColor(), KGlobalSettings::highlightColor()), KGlobalSettings::highlightColor()); + background = Tools::mixColor(Tools::mixColor(m_computedState.backgroundColor(), TDEGlobalSettings::highlightColor()), TDEGlobalSettings::highlightColor()); else - background = KGlobalSettings::highlightColor(); + background = TDEGlobalSettings::highlightColor(); else if (m_computedState.backgroundColor().isValid()) background = m_computedState.backgroundColor(); TQColor bgColor; @@ -1983,7 +1983,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect) cg.setColor(TQColorGroup::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) ); cg.setColor(TQColorGroup::Background, bgColor); if (isSelected()) - cg.setColor(TQColorGroup::Text, KGlobalSettings::highlightedTextColor()); + cg.setColor(TQColorGroup::Text, TDEGlobalSettings::highlightedTextColor()); // Draw the Tags Arrow: if (hovered) { @@ -2047,18 +2047,18 @@ void Note::drawBufferOnScreen(TQPainter *painter, const TQPixmap &contentPixmap) //blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, &m_selectedBackgroundPixmap); } - painter3.setPen(KGlobalSettings::highlightColor().dark()); + painter3.setPen(TDEGlobalSettings::highlightColor().dark()); painter3.drawRect(selectionRect); if (isGroup()) - painter3.setPen(Tools::mixColor(KGlobalSettings::highlightColor().dark(), basket()->backgroundColor())); + painter3.setPen(Tools::mixColor(TDEGlobalSettings::highlightColor().dark(), basket()->backgroundColor())); else { // What are the background colors: TQColor bgColor = basket()->backgroundColor(); if (isSelected()) - bgColor = (m_computedState.backgroundColor().isValid() ? Tools::mixColor(Tools::mixColor(m_computedState.backgroundColor(), KGlobalSettings::highlightColor()), KGlobalSettings::highlightColor()) : KGlobalSettings::highlightColor()); + bgColor = (m_computedState.backgroundColor().isValid() ? Tools::mixColor(Tools::mixColor(m_computedState.backgroundColor(), TDEGlobalSettings::highlightColor()), TDEGlobalSettings::highlightColor()) : TDEGlobalSettings::highlightColor()); else if (m_computedState.backgroundColor().isValid()) bgColor = m_computedState.backgroundColor(); - painter3.setPen(Tools::mixColor(KGlobalSettings::highlightColor().dark(), bgColor)); + painter3.setPen(Tools::mixColor(TDEGlobalSettings::highlightColor().dark(), bgColor)); } painter3.drawPoint(selectionRect.topLeft()); painter3.drawPoint(selectionRect.topRight()); @@ -2374,7 +2374,7 @@ void Note::unbufferizeAll() void Note::bufferizeSelectionPixmap() { if (m_bufferedSelectionPixmap.isNull()) { - TQColor insideColor = KGlobalSettings::highlightColor(); + TQColor insideColor = TDEGlobalSettings::highlightColor(); KPixmap kpixmap(m_bufferedPixmap); m_bufferedSelectionPixmap = KPixmapEffect::fade(kpixmap, 0.25, insideColor); } diff --git a/src/notecontent.cpp b/src/notecontent.cpp index 1036516..cc5d683 100644 --- a/src/notecontent.cpp +++ b/src/notecontent.cpp @@ -740,7 +740,7 @@ void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQ width -= 1; // KPixmap pixmap = m_pixmap; // if (note()->isSelected()) -// pixmap = KPixmapEffect::selectedPixmap(m_pixmap, KGlobalSettings::highlightColor()); +// pixmap = KPixmapEffect::selectedPixmap(m_pixmap, TDEGlobalSettings::highlightColor()); if (width >= m_pixmap.width()) // Full size painter->drawPixmap(0, 0, m_pixmap); diff --git a/src/noteedit.cpp b/src/noteedit.cpp index 0edda4d..77d65c5 100644 --- a/src/noteedit.cpp +++ b/src/noteedit.cpp @@ -801,7 +801,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection) TQFont defaultFont; TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ? Global::bnpView->currentBasket()->textColor() : - KGlobalSettings::textColor()); + TDEGlobalSettings::textColor()); // Init the RichTextEditor Toolbar: richTextFont = new FocusedFontCombo(Global::mainWindow()); @@ -900,7 +900,7 @@ void InlineEditors::disableRichTextToolBar() TQFont defaultFont; TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ? Global::bnpView->currentBasket()->textColor() : - KGlobalSettings::textColor()); + TDEGlobalSettings::textColor()); richTextFont->setCurrentFont(defaultFont.family()); richTextFontSize->setFontSize(defaultFont.pointSize()); richTextColor->setColor(textColor); diff --git a/src/regiongrabber.cpp b/src/regiongrabber.cpp index ba8f5df..57e9e05 100644 --- a/src/regiongrabber.cpp +++ b/src/regiongrabber.cpp @@ -59,7 +59,7 @@ void SizeTip::positionTip( const TQRect &rect ) if ( rect.intersects( tipRect ) ) { - TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); + TQRect deskR = TDEGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) diff --git a/src/settings.cpp b/src/settings.cpp index 3722438..7019968 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -536,7 +536,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) m_exportTextTags = new TQCheckBox(i18n("&Export tags in texts"), widget); connect( m_exportTextTags, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); - TQPixmap pixmapHelp(KGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); + TQPixmap pixmapHelp(TDEGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", pixmapHelp); hLabel = new HelpLabel( i18n("When does this apply?"), @@ -553,7 +553,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name) m_groupOnInsertionLineWidget = new TQWidget(behaviorBox); TQHBoxLayout *hLayV = new TQHBoxLayout(m_groupOnInsertionLineWidget, /*margin=*/0, KDialogBase::spacingHint()); m_groupOnInsertionLine = new TQCheckBox(i18n("&Group a new note when clicking on the right of the insertion line"), m_groupOnInsertionLineWidget); - TQPixmap pixmap(KGlobal::dirs()->findResource("data", "basket/images/insertion_help.png")); + TQPixmap pixmap(TDEGlobal::dirs()->findResource("data", "basket/images/insertion_help.png")); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_insertion_line.png", pixmap); HelpLabel *helpV = new HelpLabel( i18n("How to group a new note?"), diff --git a/src/settings.h b/src/settings.h index b593b96..1f45bbf 100644 --- a/src/settings.h +++ b/src/settings.h @@ -42,7 +42,7 @@ class TQGroupBox; class TQButtonGroup; class KColorCombo; class KIntNumInput; -class KGlobalAccel; +class TDEGlobalAccel; class TQLabel; class Container; @@ -270,7 +270,7 @@ class Settings // FIXME: Distaptch new config events ? static inline bool showOnMouseIn() { return s_showOnMouseIn; } static inline int timeToShowOnMouseIn() { return s_timeToShowOnMouseIn; } static inline int basketTreeWidth() { return s_basketTreeWidth; } - static inline int dropTimeToShow() { return 7; } // TODO: 700 ; TODO: There is certainly a KGlobalConfig ??? + static inline int dropTimeToShow() { return 7; } // TODO: 700 ; TODO: There is certainly a TDEGlobalConfig ??? static inline bool usePassivePopup() { return s_usePassivePopup; } static inline bool welcomeBasketsAdded() { return s_welcomeBasketsAdded; } static inline TQString dataFolder() { return s_dataFolder; } diff --git a/src/systemtray.cpp b/src/systemtray.cpp index ed2425f..ee54d1d 100644 --- a/src/systemtray.cpp +++ b/src/systemtray.cpp @@ -139,7 +139,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) TQString message = i18n( "<p>Closing the main window will keep %1 running in the system tray. " "Use <b>Quit</b> from the <b>Basket</b> menu to quit the application.</p>" - ).arg(KGlobal::instance()->aboutData()->programName()); + ).arg(TDEGlobal::instance()->aboutData()->programName()); // We are sure the systray icon is visible: ouf! if (useSystray) { // Compute size and position of the pixmap to be grabbed: diff --git a/src/tag.cpp b/src/tag.cpp index 1dce82b..b7e9ea7 100644 --- a/src/tag.cpp +++ b/src/tag.cpp @@ -755,13 +755,13 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac * and keep the background to white, drawing a white text over it is... very bad. But I can't see what can be done. */ if (active && enabled) - painter->setPen(KGlobalSettings::highlightedTextColor()); + painter->setPen(TDEGlobalSettings::highlightedTextColor()); painter->drawText(x + iconSize + iconMargin, y, w - iconSize - iconMargin, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_text/*painter->pen().color().name()*/); if (!m_shortcut.isEmpty()) { painter->setPen(pen); if (active && enabled) - painter->setPen(KGlobalSettings::highlightedTextColor()); + painter->setPen(TDEGlobalSettings::highlightedTextColor()); painter->setFont(font); painter->setClipping(false); painter->drawText(x + 5 + w, y, 3000, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_shortcut); @@ -772,7 +772,7 @@ TQSize IndentedMenuItem::sizeHint() { int iconSize = KIcon::SizeSmall; int iconMargin = StateMenuItem::iconMargin(); - TQSize textSize = TQFontMetrics(KGlobalSettings::menuFont()).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_text ); + TQSize textSize = TQFontMetrics(TDEGlobalSettings::menuFont()).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_text ); return TQSize(iconSize + iconMargin + textSize.width(), textSize.height()); } @@ -827,14 +827,14 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ * and keep the background to white, drawing a white text over it is... very bad. But I can't see what can be done. */ if (active && enabled) - painter->setPen(KGlobalSettings::highlightedTextColor()); + painter->setPen(TDEGlobalSettings::highlightedTextColor()); painter->setFont( m_state->font(painter->font()) ); painter->drawText(x + iconSize + iconMargin(), y, w - iconSize - iconMargin(), h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_name); if (!m_shortcut.isEmpty()) { painter->setPen(pen); if (active && enabled) - painter->setPen(KGlobalSettings::highlightedTextColor()); + painter->setPen(TDEGlobalSettings::highlightedTextColor()); painter->setFont(font); painter->setClipping(false); painter->drawText(x + 5 + w, y, 3000, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_shortcut); @@ -844,7 +844,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ TQSize StateMenuItem::sizeHint() { int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons - TQFont theFont = m_state->font(KGlobalSettings::menuFont()); + TQFont theFont = m_state->font(TDEGlobalSettings::menuFont()); TQSize textSize = TQFontMetrics(theFont).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_name ); return TQSize(iconSize + iconMargin() + textSize.width(), textSize.height()); } @@ -871,7 +871,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws painter.begin(&pixmapHover); style |= TQStyle::Style_MouseOver; - cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); + cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); kapp->style().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); painter.end(); @@ -923,7 +923,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) painter.begin(&pixmapHover); //kapp->style().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); style |= TQStyle::Style_MouseOver; - cg.setColor(TQColorGroup::Background, KGlobalSettings::highlightColor()); + cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); painter.end(); pixmapHover.setMask(pixmapHover.createHeuristicMask()); diff --git a/src/tagsedit.cpp b/src/tagsedit.cpp index fb935c1..f1ad3bd 100644 --- a/src/tagsedit.cpp +++ b/src/tagsedit.cpp @@ -233,10 +233,10 @@ void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorG TQPixmap emblem = (withIcon ? kapp->iconLoader()->loadIcon(state->emblem(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/true) : TQPixmap()); - TQColor backgroundColor = (isSelected() ? KGlobalSettings::highlightColor() + TQColor backgroundColor = (isSelected() ? TDEGlobalSettings::highlightColor() : (withIcon && state->backgroundColor().isValid() ? state->backgroundColor() : listView()->paletteBackgroundColor())); - TQColor textColor = (isSelected() ? KGlobalSettings::highlightedTextColor() + TQColor textColor = (isSelected() ? TDEGlobalSettings::highlightedTextColor() : (withIcon && state->textColor().isValid() ? state->textColor() : listView()->paletteForegroundColor())); @@ -422,7 +422,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew emblemLayout->addWidget(m_removeEmblem); emblemLayout->addStretch(); - m_backgroundColor = new KColorCombo2(TQColor(), KGlobalSettings::baseColor(), stateWidget); + m_backgroundColor = new KColorCombo2(TQColor(), TDEGlobalSettings::baseColor(), stateWidget); TQLabel *backgroundColorLabel = new TQLabel(m_backgroundColor, i18n("&Background:"), stateWidget); TQHBoxLayout *backgroundColorLayout = new TQHBoxLayout(0, /*margin=*/0, spacingHint()); @@ -463,7 +463,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew textLayout->addWidget(m_strike); textLayout->addStretch(); - m_textColor = new KColorCombo2(TQColor(), KGlobalSettings::textColor(), stateWidget); + m_textColor = new KColorCombo2(TQColor(), TDEGlobalSettings::textColor(), stateWidget); TQLabel *textColorLabel = new TQLabel(m_textColor, i18n("Co&lor:"), stateWidget); m_font = new KFontCombo(stateWidget); @@ -479,7 +479,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew font.setFamily("monospace"); m_textEquivalent->setFont(font); - TQPixmap textEquivalentPixmap(KGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); + TQPixmap textEquivalentPixmap(TDEGlobal::dirs()->findResource("data", "basket/images/tag_export_help.png")); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", textEquivalentPixmap); HelpLabel *textEquivalentHelp = new HelpLabel( i18n("When does this apply?"), @@ -495,7 +495,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew m_onEveryLines = new TQCheckBox(i18n("On ever&y line"), stateWidget); - TQPixmap onEveryLinesPixmap(KGlobal::dirs()->findResource("data", "basket/images/tag_export_on_every_lines_help.png")); + TQPixmap onEveryLinesPixmap(TDEGlobal::dirs()->findResource("data", "basket/images/tag_export_on_every_lines_help.png")); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export_on_every_lines.png", onEveryLinesPixmap); HelpLabel *onEveryLinesHelp = new HelpLabel( i18n("What does it mean?"), |