Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent a1fb52e00e
commit 934db26c3f

@ -461,7 +461,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder)
void Archive::importArchivedBackgroundImages(const TQString &extractionFolder) void Archive::importArchivedBackgroundImages(const TQString &extractionFolder)
{ {
FormatImporter copier; // Only used to copy files synchronously 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); TQDir dir(extractionFolder + "backgrounds/", /*nameFilder=*/"*.png", /*sortSpec=*/TQDir::Name | TQDir::IgnoreCase, /*filterSpec=*/TQDir::Files | TQDir::NoSymLinks);
TQStringList files = dir.entryList(); TQStringList files = dir.entryList();

@ -68,7 +68,7 @@ OpaqueBackgroundEntry::~OpaqueBackgroundEntry()
BackgroundManager::BackgroundManager() BackgroundManager::BackgroundManager()
{ {
/// std::cout << "BackgroundManager: Found the following background images in "; /// 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 each folder:
for (TQStringList::Iterator it = directories.begin(); it != directories.end(); ++it) { for (TQStringList::Iterator it = directories.begin(); it != directories.end(); ++it) {
// For each file in those directories: // For each file in those directories:
@ -266,7 +266,7 @@ TQPixmap* BackgroundManager::preview(const TQString &image)
return entry->preview; return entry->preview;
// Then, try to load the preview from file: // 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); TQPixmap *previewPixmap = new TQPixmap(previewPath);
// Success: // Success:
if (!previewPixmap->isNull()) { if (!previewPixmap->isNull()) {
@ -319,7 +319,7 @@ TQPixmap* BackgroundManager::preview(const TQString &image)
painter.end(); painter.end();
// Saving it to file for later: // 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"); result->save(folder + entry->name, "PNG");
// Ouf! That's done: // Ouf! That's done:
@ -343,7 +343,7 @@ TQString BackgroundManager::previewPathForImageName(const TQString &image)
if (entry == 0) if (entry == 0)
return ""; return "";
else { 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; TQDir dir;
if (!dir.exists(previewPath)) if (!dir.exists(previewPath))
return ""; return "";

@ -166,7 +166,7 @@ void BackupDialog::backup()
TQDir dir; TQDir dir;
// Compute a default file name & path (eg. "Baskets_2007-01-31.tar.gz"): // Compute a default file name & path (eg. "Baskets_2007-01-31.tar.gz"):
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Backups"); config->setGroup("Backups");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1") TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1")
@ -224,7 +224,7 @@ void BackupDialog::backup()
void BackupDialog::restore() void BackupDialog::restore()
{ {
// Get last backup folder: // Get last backup folder:
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Backups"); config->setGroup("Backups");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";

@ -2767,7 +2767,7 @@ void Basket::drawInserter(TQPainter &painter, int xPainter, int yPainter)
TQColor dark = TDEApplication::palette().active().dark(); TQColor dark = TDEApplication::palette().active().dark();
TQColor light = dark.light().light(); TQColor light = dark.light().light();
if (m_inserterGroup && Settings::groupOnInsertionLine()) if (m_inserterGroup && Settings::groupOnInsertionLine())
light = Tools::mixColor(light, KGlobalSettings::highlightColor()); light = Tools::mixColor(light, TDEGlobalSettings::highlightColor());
painter.setPen(dark); painter.setPen(dark);
// The horizontal line: // The horizontal line:
//painter.drawRect( rect.x(), rect.y() + lineY, rect.width(), 2); //painter.drawRect( rect.x(), rect.y() + lineY, rect.width(), 2);
@ -3017,7 +3017,7 @@ void Basket::animateLoad()
TQColor Basket::selectionRectInsideColor() 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) 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 ) ); label->setAlignment( int( TQLabel::AlignTop ) );
layout->addMultiCellWidget( label, 0, 0, 1, 2 ); layout->addMultiCellWidget( label, 0, 0, 1, 2 );
TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" ); 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 ); layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 );
TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); 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()); selectionRectInside.moveBy(rect.x(), rect.y());
blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, /*&*/m_selectedBackgroundPixmap); blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, /*&*/m_selectedBackgroundPixmap);
} }
painter2.setPen(KGlobalSettings::highlightColor().dark()); painter2.setPen(TDEGlobalSettings::highlightColor().dark());
painter2.drawRect(selectionRect); 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.topLeft());
painter2.drawPoint(selectionRect.topRight()); painter2.drawPoint(selectionRect.topRight());
painter2.drawPoint(selectionRect.bottomLeft()); painter2.drawPoint(selectionRect.bottomLeft());
@ -3649,7 +3649,7 @@ TQColor Basket::backgroundColor()
if (m_backgroundColorSetting.isValid()) if (m_backgroundColorSetting.isValid())
return m_backgroundColorSetting; return m_backgroundColorSetting;
else else
return KGlobalSettings::baseColor(); return TDEGlobalSettings::baseColor();
} }
TQColor Basket::textColor() TQColor Basket::textColor()
@ -3657,7 +3657,7 @@ TQColor Basket::textColor()
if (m_textColorSetting.isValid()) if (m_textColorSetting.isValid())
return m_textColorSetting; return m_textColorSetting;
else else
return KGlobalSettings::textColor(); return TDEGlobalSettings::textColor();
} }
void Basket::unbufferizeAll() void Basket::unbufferizeAll()

@ -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) TQPixmap gradient(3 * width, 3 * height); // We double the size to be able to smooth scale down it (== antialiased curves)
TQPainter gradientPainter(&gradient); TQPainter gradientPainter(&gradient);
#if 1 // Enable the new look of the gradient: #if 1 // Enable the new look of the gradient:
TQColor topColor = KGlobalSettings::highlightColor().light(130); //120 TQColor topColor = TDEGlobalSettings::highlightColor().light(130); //120
TQColor topMidColor = KGlobalSettings::highlightColor().light(105); //105 TQColor topMidColor = TDEGlobalSettings::highlightColor().light(105); //105
TQColor bottomMidColor = KGlobalSettings::highlightColor().dark(130); //120 TQColor bottomMidColor = TDEGlobalSettings::highlightColor().dark(130); //120
TQColor bottomColor = KGlobalSettings::highlightColor(); TQColor bottomColor = TDEGlobalSettings::highlightColor();
drawGradient(&gradientPainter, topColor, topMidColor, drawGradient(&gradientPainter, topColor, topMidColor,
0, 0, gradient.width(), gradient.height() / 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); 0, 0, gradient.width(), gradient.height() / 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false);
drawGradient(&gradientPainter, bottomMidColor, bottomColor, drawGradient(&gradientPainter, bottomMidColor, bottomColor,
0, gradient.height() / 2, gradient.width(), gradient.height() - gradient.height() / 2, /*sunken=*/false, /*horz=*/true, /*flat=*/false); 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 #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); 0, 0, gradient.width(), gradient.height(), /*sunken=*/false, /*horz=*/true, /*flat=*/false);
#endif #endif
gradientPainter.end(); gradientPainter.end();
@ -347,7 +347,7 @@ TQPixmap BasketListViewItem::foundCountPixmap(bool isLoading, int countFound, bo
return TQPixmap(); return TQPixmap();
} }
return circledTextPixmap(text, height, boldFont, KGlobalSettings::highlightedTextColor()); return circledTextPixmap(text, height, boldFont, TDEGlobalSettings::highlightedTextColor());
} }
bool BasketListViewItem::haveChildsLoading() 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(); 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 *shownAbove = shownItemAbove();
BasketListViewItem *shownBelow = shownItemBelow(); BasketListViewItem *shownBelow = shownItemBelow();
@ -480,7 +480,7 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col
TQPainter thePainter(&theBuffer); TQPainter thePainter(&theBuffer);
// Fill with the basket background color: // 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); thePainter.fillRect(0, 0, width, height(), background);
int textWidth = effectiveWidth - MARGIN - BASKET_ICON_SIZE - MARGIN - MARGIN; 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 bgColor = listView()->paletteBackgroundColor();
TQColor selColor = KGlobalSettings::highlightColor(); TQColor selColor = TDEGlobalSettings::highlightColor();
TQColor midColor = Tools::mixColor(bgColor, selColor); TQColor midColor = Tools::mixColor(bgColor, selColor);
// Draw the left selection roundings: // Draw the left selection roundings:
if (isCurrentBasket()) { if (isCurrentBasket()) {
@ -780,7 +780,7 @@ void BasketTreeListView::paintEmptyArea(TQPainter *painter, const TQRect &rect)
if (last && last->isCurrentBasket()) { if (last && last->isCurrentBasket()) {
int y = last->itemPos() + last->height(); int y = last->itemPos() + last->height();
TQColor bgColor = paletteBackgroundColor(); TQColor bgColor = paletteBackgroundColor();
TQColor selColor = KGlobalSettings::highlightColor(); TQColor selColor = TDEGlobalSettings::highlightColor();
TQColor midColor = Tools::mixColor(bgColor, selColor); TQColor midColor = Tools::mixColor(bgColor, selColor);
painter->setPen(selColor); painter->setPen(selColor);
painter->drawPoint(visibleWidth() - 1, y); painter->drawPoint(visibleWidth() - 1, y);

@ -71,8 +71,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
TQWidget *appearanceWidget = new TQWidget(appearance); TQWidget *appearanceWidget = new TQWidget(appearance);
TQGridLayout *grid = new TQGridLayout(appearanceWidget, /*nRows=*/3, /*nCols=*/2, /*margin=*/0, spacingHint()); TQGridLayout *grid = new TQGridLayout(appearanceWidget, /*nRows=*/3, /*nCols=*/2, /*margin=*/0, spacingHint());
m_backgroundImage = new TQComboBox(appearanceWidget); m_backgroundImage = new TQComboBox(appearanceWidget);
m_backgroundColor = new KColorCombo2(m_basket->backgroundColorSetting(), KGlobalSettings::baseColor(), appearanceWidget); m_backgroundColor = new KColorCombo2(m_basket->backgroundColorSetting(), TDEGlobalSettings::baseColor(), appearanceWidget);
m_textColor = new KColorCombo2(m_basket->textColorSetting(), KGlobalSettings::textColor(), appearanceWidget); m_textColor = new KColorCombo2(m_basket->textColorSetting(), TDEGlobalSettings::textColor(), appearanceWidget);
TQLabel *label1 = new TQLabel(m_backgroundImage, i18n("Background &image:"), appearanceWidget); TQLabel *label1 = new TQLabel(m_backgroundImage, i18n("Background &image:"), appearanceWidget);
TQLabel *label2 = new TQLabel(m_backgroundColor, i18n("&Background color:"), appearanceWidget); TQLabel *label2 = new TQLabel(m_backgroundColor, i18n("&Background color:"), appearanceWidget);
TQLabel *label3 = new TQLabel(m_textColor, i18n("&Text color:"), appearanceWidget); TQLabel *label3 = new TQLabel(m_textColor, i18n("&Text color:"), appearanceWidget);

@ -93,7 +93,7 @@ BNPView::BNPView(TQWidget *parent, const char *name, KXMLGUIClient *aGUIClient,
Global::bnpView = this; Global::bnpView = this;
// Needed when loading the baskets: // 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(); Global::backgroundManager = new BackgroundManager();
setupGlobalShortcuts(); 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: // Possible paths where to find the welcome basket archive, trying the translated one, and falling back to the English one:
TQStringList possiblePaths; 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: 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(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + KGlobal::locale()->language() + ".baskets")); possiblePaths.append(TDEGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TDEGlobal::locale()->language() + ".baskets"));
possiblePaths.append(KGlobal::dirs()->findResource("data", "basket/welcome/Welcome_" + TQStringList::split("_", KGlobal::locale()->language())[0] + ".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: // Take the first EXISTING basket archive found:
TQDir dir; TQDir dir;
@ -265,7 +265,7 @@ void BNPView::onFirstShow()
void BNPView::setupGlobalShortcuts() void BNPView::setupGlobalShortcuts()
{ {
/* Global shortcuts */ /* 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: // Ctrl+Shift+W only works when started standalone:
TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->parent()->inherits("MainWindow") ? Global::bnpView->parent() : 0); TQWidget *basketMainWindow = (TQWidget*) (Global::bnpView->parent()->inherits("MainWindow") ? Global::bnpView->parent() : 0);
@ -1793,7 +1793,7 @@ void BNPView::saveAsArchive()
TQDir dir; TQDir dir;
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Basket Archive"); config->setGroup("Basket Archive");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
TQString url = folder + TQString(basket->basketName()).replace("/", "_") + ".baskets"; TQString url = folder + TQString(basket->basketName()).replace("/", "_") + ".baskets";

@ -88,7 +88,7 @@ void ExporterDialog::show()
void ExporterDialog::load() void ExporterDialog::load()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("HTML Export"); config->setGroup("HTML Export");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
@ -103,7 +103,7 @@ void ExporterDialog::load()
void ExporterDialog::save() void ExporterDialog::save()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("HTML Export"); config->setGroup("HTML Export");
TQString folder = KURL(m_url->url()).directory(); TQString folder = KURL(m_url->url()).directory();

@ -188,7 +188,7 @@ TQDomElement FormatImporter::importBasket(const TQString &folderName)
TQDomElement properties = XMLWork::getElement(docElem, "properties"); TQDomElement properties = XMLWork::getElement(docElem, "properties");
TQDomElement background = XMLWork::getElement(properties, "background"); TQDomElement background = XMLWork::getElement(properties, "background");
TQColor backgroundColor = TQColor(background.attribute("color")); 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"); TQDomElement appearance = document->createElement("appearance");
appearance.setAttribute("backgroundColor", backgroundColor.name()); appearance.setAttribute("backgroundColor", backgroundColor.name());
properties.appendChild(appearance); properties.appendChild(appearance);

@ -40,7 +40,7 @@ DebugWindow *Global::debugWindow = 0L;
BackgroundManager *Global::backgroundManager = 0L; BackgroundManager *Global::backgroundManager = 0L;
SystemTray *Global::systemTray = 0L; SystemTray *Global::systemTray = 0L;
BNPView *Global::bnpView = 0L; BNPView *Global::bnpView = 0L;
KGlobalAccel *Global::globalAccel = 0L; TDEGlobalAccel *Global::globalAccel = 0L;
KConfig *Global::basketConfig = 0L; KConfig *Global::basketConfig = 0L;
AboutData Global::basketAbout; AboutData Global::basketAbout;
@ -64,7 +64,7 @@ TQString Global::savesFolder()
dir.mkdir(s_customSavesFolder); dir.mkdir(s_customSavesFolder);
folder = new TQString(Settings::dataFolder().endsWith("/") ? Settings::dataFolder() : Settings::dataFolder() + "/"); folder = new TQString(Settings::dataFolder().endsWith("/") ? Settings::dataFolder() : Settings::dataFolder() + "/");
} else { // The default path (should be that for most computers) } 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/"));
} }
} }

@ -29,7 +29,7 @@ class DebugWindow;
class BackgroundManager; class BackgroundManager;
class SystemTray; class SystemTray;
class BNPView; class BNPView;
class KGlobalAccel; class TDEGlobalAccel;
class KMainWindow; class KMainWindow;
class TDEAboutData; class TDEAboutData;
@ -49,7 +49,7 @@ class Global
static BackgroundManager *backgroundManager; static BackgroundManager *backgroundManager;
static SystemTray *systemTray; static SystemTray *systemTray;
static BNPView *bnpView; static BNPView *bnpView;
static KGlobalAccel *globalAccel; static TDEGlobalAccel *globalAccel;
static KConfig *basketConfig; static KConfig *basketConfig;
static AboutData basketAbout; static AboutData basketAbout;

@ -44,7 +44,7 @@ HTMLExporter::HTMLExporter(Basket *basket)
TQDir dir; TQDir dir;
// Compute a default file name & path: // Compute a default file name & path:
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Export to HTML"); config->setGroup("Export to HTML");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/"; TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
TQString url = folder + TQString(basket->basketName()).replace("/", "_") + ".html"; 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" " .tree span { -moz-border-radius: 6px; display: block; float: left;\n"
" line-height: 16px; height: 16px; vertical-align: middle; padding: 0 1px; }\n" " line-height: 16px; height: 16px; vertical-align: middle; padding: 0 1px; }\n"
" .tree img { vertical-align: top; padding-right: 1px; }\n" " .tree img { vertical-align: top; padding-right: 1px; }\n"
" .tree .current { background-color: " << KGlobalSettings::highlightColor().name() << "; " " .tree .current { background-color: " << TDEGlobalSettings::highlightColor().name() << "; "
"-moz-border-radius: 3px 0 0 3px; border-radius: 3px 0 0 3px; color: " << KGlobalSettings::highlightedTextColor().name() << "; }\n" "-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"; " .basketSurrounder { margin-left: 152px; _margin: 0; _float: right; }\n";
} }
stream << stream <<

@ -84,8 +84,8 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap!
// Initialize the pixmap: // Initialize the pixmap:
m_pixmap.resize(width, height); m_pixmap.resize(width, height);
TQPainter painter(&m_pixmap); TQPainter painter(&m_pixmap);
painter.fillRect(0, 0, width, height, KGlobalSettings::baseColor()); painter.fillRect(0, 0, width, height, TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, width, height); painter.drawRect(0, 0, width, height);
// Needed to draw: // Needed to draw:
@ -99,7 +99,7 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap!
y = 1 + MARGIN + (colorHeight + MARGIN) * j; y = 1 + MARGIN + (colorHeight + MARGIN) * j;
if (i == m_selectedColumn && j == m_selectedRow) { if (i == m_selectedColumn && j == m_selectedRow) {
selectionRect = TQRect(x - 2, y - 2, colorWidth + 4, colorHeight + 4); 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); 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; x = 1 + MARGIN;
if (m_selectedColumn < m_columnOther && rowCount == m_selectedRow) { if (m_selectedColumn < m_columnOther && rowCount == m_selectedRow) {
selectionRect = TQRect(x - 2, y - 2, defaultCellWidth, colorHeight + 4); selectionRect = TQRect(x - 2, y - 2, defaultCellWidth, colorHeight + 4);
painter.fillRect(selectionRect, KGlobalSettings::highlightColor()); painter.fillRect(selectionRect, TDEGlobalSettings::highlightColor());
textColor = KGlobalSettings::highlightedTextColor(); textColor = TDEGlobalSettings::highlightedTextColor();
} else } else
textColor = KGlobalSettings::textColor(); textColor = TDEGlobalSettings::textColor();
m_selector->drawColorRect(painter, x, y, m_selector->defaultColor(), /*isDefault=*/true, colorWidth, colorHeight); m_selector->drawColorRect(painter, x, y, m_selector->defaultColor(), /*isDefault=*/true, colorWidth, colorHeight);
painter.setFont(m_selector->font()); painter.setFont(m_selector->font());
painter.setPen(textColor); painter.setPen(textColor);
@ -128,10 +128,10 @@ void KColorPopup::relayout() // FIXME: relayout should NOT redraw the pixmap!
x = 1 + MARGIN + m_columnOther * (colorWidth + MARGIN); x = 1 + MARGIN + m_columnOther * (colorWidth + MARGIN);
if (m_selectedColumn >= m_columnOther && rowCount == m_selectedRow) { if (m_selectedColumn >= m_columnOther && rowCount == m_selectedRow) {
selectionRect = TQRect(x - 2, y - 2, otherCellWidth, colorHeight + 4); selectionRect = TQRect(x - 2, y - 2, otherCellWidth, colorHeight + 4);
painter.fillRect(selectionRect, KGlobalSettings::highlightColor()); painter.fillRect(selectionRect, TDEGlobalSettings::highlightColor());
textColor = KGlobalSettings::highlightedTextColor(); textColor = TDEGlobalSettings::highlightedTextColor();
} else } else
textColor = KGlobalSettings::textColor(); textColor = TDEGlobalSettings::textColor();
m_selector->drawColorRect(painter, x, y, m_otherColor, /*isDefault=*/false, colorWidth, colorHeight); m_selector->drawColorRect(painter, x, y, m_otherColor, /*isDefault=*/false, colorWidth, colorHeight);
painter.setFont(m_selector->font()); painter.setFont(m_selector->font());
painter.setPen(textColor); painter.setPen(textColor);
@ -561,7 +561,7 @@ void KColorCombo2::drawColorRect(TQPainter &painter, int x, int y, const TQColor
// Stroke: // Stroke:
int dontCare, value; int dontCare, value;
color.getHsv(/*hue:*/&dontCare, /*saturation:*/&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.setPen(/*color);//*/stroke);
painter.drawLine(x + 1, y, x + width - 2, y); painter.drawLine(x + 1, y, x + width - 2, y);
painter.drawLine(x, y + 1, x, y + height - 2); painter.drawLine(x, y + 1, x, y + height - 2);
@ -630,7 +630,7 @@ void KColorCombo2::popup()
setRainbowPreset(); setRainbowPreset();
// Compute where to show the popup: // Compute where to show the popup:
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
TQPoint popupPoint = mapToGlobal(TQPoint(0, 0)); TQPoint popupPoint = mapToGlobal(TQPoint(0, 0));
@ -715,7 +715,7 @@ void KColorCombo2::mousePressEvent(TQMouseEvent *event)
void KColorCombo2::mouseMoveEvent(TQMouseEvent *event) void KColorCombo2::mouseMoveEvent(TQMouseEvent *event)
{ {
if( (event->state() & Qt::LeftButton) && if( (event->state() & Qt::LeftButton) &&
(event->pos() - m_dragStartPos).manhattanLength() > KGlobalSettings::dndEventDelay() ) { (event->pos() - m_dragStartPos).manhattanLength() > TDEGlobalSettings::dndEventDelay() ) {
// Drag color object: // Drag color object:
KColorDrag *colorDrag = new KColorDrag(effectiveColor(), this); KColorDrag *colorDrag = new KColorDrag(effectiveColor(), this);
// Replace the drag pixmap with our own rounded one, at the same position and dimetions: // Replace the drag pixmap with our own rounded one, at the same position and dimetions:

@ -39,7 +39,7 @@ class KColorPopup;
* *
* @par Quick usage: * @par Quick usage:
* Just create a new KColorCombo2() with the initial color and eventually an allowed default color * 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 * 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 * 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(). * 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()...). * 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. * 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 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. * @see KColorDialog The dialog that is shown when the user click the "Other..." entry.
* @author Sébastien Laoût <slaout@linux62.org> * @author Sébastien Laoût <slaout@linux62.org>

@ -53,7 +53,7 @@ class KGpgSelKey : public KDialogBase
TQVBoxLayout* vbox; TQVBoxLayout* vbox;
TQWidget* page = new TQWidget(this); TQWidget* page = new TQWidget(this);
TQLabel* labeltxt; TQLabel* labeltxt;
KIconLoader* loader = KGlobal::iconLoader(); KIconLoader* loader = TDEGlobal::iconLoader();
TQPixmap keyPair = loader->loadIcon("kgpg_key2", KIcon::Small, 20); TQPixmap keyPair = loader->loadIcon("kgpg_key2", KIcon::Small, 20);
setMinimumSize(350,100); setMinimumSize(350,100);

@ -93,7 +93,7 @@ KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
: KIconView(parent, name) : KIconView(parent, name)
{ {
d = new KIconCanvasPrivate; d = new KIconCanvasPrivate;
mpLoader = KGlobal::iconLoader(); mpLoader = TDEGlobal::iconLoader();
mpTimer = new TQTimer(this); mpTimer = new TQTimer(this);
connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)), connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)),

@ -84,7 +84,7 @@ KIconDialog::KIconDialog(TQWidget *parent, const char*)
: KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new KIconDialogPrivate;
mpLoader = KGlobal::iconLoader(); mpLoader = TDEGlobal::iconLoader();
init(); init();
resize(minimumSize()); resize(minimumSize());
} }
@ -106,7 +106,7 @@ void KIconDialog::init()
setCustomLocation(TQString()); // Initialize mFileList setCustomLocation(TQString()); // Initialize mFileList
// Read configuration // Read configuration
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
KConfigGroupSaver saver(config, "KIconDialog"); KConfigGroupSaver saver(config, "KIconDialog");
d->recentMax = config->readNumEntry("RecentMax", 10); d->recentMax = config->readNumEntry("RecentMax", 10);
d->recentList = config->readPathListEntry("RecentIcons"); d->recentList = config->readPathListEntry("RecentIcons");
@ -143,7 +143,7 @@ void KIconDialog::init()
KIconDialog::~KIconDialog() KIconDialog::~KIconDialog()
{ {
// Write configuration // Write configuration
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
KConfigGroupSaver saver(config, "KIconDialog"); KConfigGroupSaver saver(config, "KIconDialog");
config->writeEntry("RecentMax", d->recentMax, true, true); config->writeEntry("RecentMax", d->recentMax, true, true);
config->writePathEntry("RecentIcons", d->recentList, ',', true, true); config->writePathEntry("RecentIcons", d->recentList, ',', true, true);
@ -277,7 +277,7 @@ void KIconDialog::setCustomLocation( const TQString& location )
if (location.isEmpty()) if (location.isEmpty())
{ {
mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
} else { } else {
mFileList = mpLoader->queryIconsByDir(location); mFileList = mpLoader->queryIconsByDir(location);
} }
@ -426,7 +426,7 @@ class KIconButton::KIconButtonPrivate
KIconButton::KIconButton(TQWidget *parent, const char *name) KIconButton::KIconButton(TQWidget *parent, const char *name)
: TQPushButton(parent, name) : TQPushButton(parent, name)
{ {
init( KGlobal::iconLoader() ); init( TDEGlobal::iconLoader() );
} }
KIconButton::KIconButton(KIconLoader *loader, KIconButton::KIconButton(KIconLoader *loader,

@ -583,9 +583,9 @@ bool LikeBack::isDevelopmentVersion(const TQString &version)
{ {
if (m_process) if (m_process)
return; return;
m_process = new KProcess(); m_process = new TDEProcess();
*m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); *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()) { if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl; kdDebug() << "Couldn't start kcmshell.." << endl;
delete m_process; delete m_process;
@ -749,11 +749,11 @@ TQString LikeBackDialog::introductionText()
TQStringList locales = m_likeBack->acceptedLocales(); TQStringList locales = m_likeBack->acceptedLocales();
for (TQStringList::Iterator it = locales.begin(); it != locales.end(); ++it) { for (TQStringList::Iterator it = locales.begin(); it != locales.end(); ++it) {
TQString locale = *it; TQString locale = *it;
if (KGlobal::locale()->language().startsWith(locale)) if (TDEGlobal::locale()->language().startsWith(locale))
languagesMessage = ""; languagesMessage = "";
} }
} else { } else {
if (!KGlobal::locale()->language().startsWith("en")) if (!TDEGlobal::locale()->language().startsWith("en"))
languagesMessage = i18n("Please write in English."); languagesMessage = i18n("Please write in English.");
} }
@ -761,7 +761,7 @@ TQString LikeBackDialog::introductionText()
// TODO: Replace the URL with a localized one: // TODO: Replace the URL with a localized one:
text += languagesMessage + " " + text += languagesMessage + " " +
i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.") 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: // 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") + '&' + "protocol=" + KURL::encode_string("1.0") + '&' +
"type=" + KURL::encode_string(type) + '&' + "type=" + KURL::encode_string(type) + '&' +
"version=" + KURL::encode_string(m_likeBack->aboutData()->version()) + '&' + "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) + '&' + "window=" + KURL::encode_string(m_windowPath) + '&' +
"context=" + KURL::encode_string(m_context) + '&' + "context=" + KURL::encode_string(m_context) + '&' +
"comment=" + KURL::encode_string(m_comment->text()) + '&' + "comment=" + KURL::encode_string(m_comment->text()) + '&' +

@ -114,9 +114,9 @@ TQColor LinkLook::effectiveHoverColor() const
TQColor LinkLook::defaultColor() const TQColor LinkLook::defaultColor() const
{ {
if (m_useLinkColor) if (m_useLinkColor)
return KGlobalSettings::linkColor(); return TDEGlobalSettings::linkColor();
else else
return KGlobalSettings::textColor(); return TDEGlobalSettings::textColor();
} }
TQColor LinkLook::defaultHoverColor() const 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: // Figure out the text color:
if (isSelected) if (isSelected)
painter->setPen(KGlobalSettings::highlightedTextColor()); painter->setPen(TDEGlobalSettings::highlightedTextColor());
else if (isIconButtonHovered) else if (isIconButtonHovered)
painter->setPen(m_look->effectiveHoverColor()); 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: 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:

@ -121,12 +121,12 @@ MainWindow::MainWindow(TQWidget *parent, const char *name)
setStandardToolBarMenuEnabled(true); setStandardToolBarMenuEnabled(true);
createGUI("basketui.rc"); createGUI("basketui.rc");
applyMainWindowSettings(KGlobal::config(), autoSaveGroup()); applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
delete m_settings; delete m_settings;
} }
@ -158,7 +158,7 @@ void MainWindow::setupActions()
else else
toolBar()->show(); toolBar()->show();
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
}*/ }*/
void MainWindow::toggleStatusBar() void MainWindow::toggleStatusBar()
@ -168,12 +168,12 @@ void MainWindow::toggleStatusBar()
else else
statusBar()->show(); statusBar()->show();
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
} }
void MainWindow::configureToolbars() void MainWindow::configureToolbars()
{ {
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection()); KEditToolbar dlg(actionCollection());
connect( &dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); 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()) if (!Global::bnpView->isPart())
Global::bnpView->connectTagsMenu(); // The Tags menu was created again! Global::bnpView->connectTagsMenu(); // The Tags menu was created again!
plugActionList( TQString::fromLatin1("go_baskets_list"), actBasketsList); plugActionList( TQString::fromLatin1("go_baskets_list"), actBasketsList);
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() ); applyMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
} }
void MainWindow::showSettingsDialog() void MainWindow::showSettingsDialog()
@ -259,7 +259,7 @@ void MainWindow::resizeEvent(TQResizeEvent *event)
Settings::saveConfig(); Settings::saveConfig();
// Added to make it work (previous lines do not work): // Added to make it work (previous lines do not work):
//saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); //saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
KMainWindow::resizeEvent(event); KMainWindow::resizeEvent(event);
} }
@ -270,7 +270,7 @@ void MainWindow::moveEvent(TQMoveEvent *event)
Settings::saveConfig(); Settings::saveConfig();
// Added to make it work (previous lines do not work): // Added to make it work (previous lines do not work):
//saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); //saveMainWindowSettings( TDEGlobal::config(), autoSaveGroup() );
KMainWindow::moveEvent(event); KMainWindow::moveEvent(event);
} }

@ -106,7 +106,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
connect( m_name, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(nameChanged(const TQString&)) ); connect( m_name, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(nameChanged(const TQString&)) );
enableButtonOK(false); enableButtonOK(false);
TQToolTip::add(m_name, i18n("Name")); 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->setColor(TQColor());
m_backgroundColor->setFixedSize(m_backgroundColor->sizeHint()); m_backgroundColor->setFixedSize(m_backgroundColor->sizeHint());
m_backgroundColor->setColor(m_defaultProperties.backgroundColor); m_backgroundColor->setColor(m_defaultProperties.backgroundColor);
@ -148,8 +148,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
TQPixmap icon(40, 53); TQPixmap icon(40, 53);
TQPainter painter(&icon); TQPainter painter(&icon);
painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("One column"), icon); 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); m_templates->setSelected(lastTemplate, true);
painter.begin(&icon); painter.begin(&icon);
painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height()); painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height());
painter.end(); painter.end();
@ -169,8 +169,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
m_templates->setSelected(lastTemplate, true); m_templates->setSelected(lastTemplate, true);
painter.begin(&icon); painter.begin(&icon);
painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.drawLine(icon.width() / 3, 0, icon.width() / 3, 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()); 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); m_templates->setSelected(lastTemplate, true);
painter.begin(&icon); painter.begin(&icon);
painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); 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() / 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); 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); m_templates->setSelected(lastTemplate, true);
/* painter.begin(&icon); /* painter.begin(&icon);
painter.fillRect(0, 0, icon.width(), icon.height(), KGlobalSettings::baseColor()); painter.fillRect(0, 0, icon.width(), icon.height(), TDEGlobalSettings::baseColor());
painter.setPen(KGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); 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.drawRect(icon.width() * 2 / 5, icon.height() * 3 / 7, icon.width() / 5, icon.height() / 7);
painter.end(); painter.end();

@ -90,12 +90,12 @@ Note::~Note()
TQString Note::addedStringDate() TQString Note::addedStringDate()
{ {
return KGlobal::locale()->formatDateTime(m_addedDate); return TDEGlobal::locale()->formatDateTime(m_addedDate);
} }
TQString Note::lastModificationStringDate() TQString Note::lastModificationStringDate()
{ {
return KGlobal::locale()->formatDateTime(m_lastModificationDate); return TDEGlobal::locale()->formatDateTime(m_lastModificationDate);
} }
TQString Note::toText(const TQString &cuttedFullPath) 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); cg.setColor(TQColorGroup::Base, background);
// Fill the inside of the expander in white, typically: // Fill the inside of the expander in white, typically:
TQBrush brush(KGlobalSettings::baseColor()); TQBrush brush(TDEGlobalSettings::baseColor());
painter->fillRect(x, y, 9, 9, brush); painter->fillRect(x, y, 9, 9, brush);
// Draw it: // Draw it:
@ -1776,7 +1776,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
// Draw gradient or resizer: // Draw gradient or resizer:
if (m_hovered && m_hoveredZone == Resizer) { if (m_hovered && m_hoveredZone == Resizer) {
TQColor baseColor(basket()->backgroundColor()); TQColor baseColor(basket()->backgroundColor());
TQColor highColor(KGlobalSettings::highlightColor()); TQColor highColor(TDEGlobalSettings::highlightColor());
drawResizer(&painter2, 0, 0, RESIZER_WIDTH, resizerHeight(), baseColor, highColor, /*rounded=*/!isColumn()); drawResizer(&painter2, 0, 0, RESIZER_WIDTH, resizerHeight(), baseColor, highColor, /*rounded=*/!isColumn());
if (!isColumn()) { if (!isColumn()) {
drawRoundings(&painter2, RESIZER_WIDTH - 3, 0, /*type=*/3); drawRoundings(&painter2, RESIZER_WIDTH - 3, 0, /*type=*/3);
@ -1808,9 +1808,9 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
selectionRectInside.moveBy(right, y()); selectionRectInside.moveBy(right, y());
basket()->blendBackground(painter2, selectionRectInside, right, y(), false); basket()->blendBackground(painter2, selectionRectInside, right, y(), false);
} }
painter2.setPen(KGlobalSettings::highlightColor().dark()); painter2.setPen(TDEGlobalSettings::highlightColor().dark());
painter2.drawRect(selectionRect); 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.topLeft());
painter2.drawPoint(selectionRect.topRight()); painter2.drawPoint(selectionRect.topRight());
painter2.drawPoint(selectionRect.bottomLeft()); painter2.drawPoint(selectionRect.bottomLeft());
@ -1852,7 +1852,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
/** Initialise colors: */ /** Initialise colors: */
TQColor baseColor(basket()->backgroundColor()); TQColor baseColor(basket()->backgroundColor());
TQColor highColor(KGlobalSettings::highlightColor()); TQColor highColor(TDEGlobalSettings::highlightColor());
TQColor midColor = Tools::mixColor(baseColor, highColor); TQColor midColor = Tools::mixColor(baseColor, highColor);
/** Initialise brushs and pens: */ /** Initialise brushs and pens: */
@ -1904,9 +1904,9 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
TQColor background = basket()->backgroundColor(); TQColor background = basket()->backgroundColor();
if (isSelected()) if (isSelected())
if (m_computedState.backgroundColor().isValid()) 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 else
background = KGlobalSettings::highlightColor(); background = TDEGlobalSettings::highlightColor();
else if (m_computedState.backgroundColor().isValid()) else if (m_computedState.backgroundColor().isValid())
background = m_computedState.backgroundColor(); background = m_computedState.backgroundColor();
TQColor bgColor; 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::Text, (m_computedState.textColor().isValid() ? m_computedState.textColor() : basket()->textColor()) );
cg.setColor(TQColorGroup::Background, bgColor); cg.setColor(TQColorGroup::Background, bgColor);
if (isSelected()) if (isSelected())
cg.setColor(TQColorGroup::Text, KGlobalSettings::highlightedTextColor()); cg.setColor(TQColorGroup::Text, TDEGlobalSettings::highlightedTextColor());
// Draw the Tags Arrow: // Draw the Tags Arrow:
if (hovered) { if (hovered) {
@ -2047,18 +2047,18 @@ void Note::drawBufferOnScreen(TQPainter *painter, const TQPixmap &contentPixmap)
//blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, &m_selectedBackgroundPixmap); //blendBackground(painter2, selectionRectInside, rect.x(), rect.y(), true, &m_selectedBackgroundPixmap);
} }
painter3.setPen(KGlobalSettings::highlightColor().dark()); painter3.setPen(TDEGlobalSettings::highlightColor().dark());
painter3.drawRect(selectionRect); painter3.drawRect(selectionRect);
if (isGroup()) if (isGroup())
painter3.setPen(Tools::mixColor(KGlobalSettings::highlightColor().dark(), basket()->backgroundColor())); painter3.setPen(Tools::mixColor(TDEGlobalSettings::highlightColor().dark(), basket()->backgroundColor()));
else { else {
// What are the background colors: // What are the background colors:
TQColor bgColor = basket()->backgroundColor(); TQColor bgColor = basket()->backgroundColor();
if (isSelected()) 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()) else if (m_computedState.backgroundColor().isValid())
bgColor = m_computedState.backgroundColor(); 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.topLeft());
painter3.drawPoint(selectionRect.topRight()); painter3.drawPoint(selectionRect.topRight());
@ -2374,7 +2374,7 @@ void Note::unbufferizeAll()
void Note::bufferizeSelectionPixmap() void Note::bufferizeSelectionPixmap()
{ {
if (m_bufferedSelectionPixmap.isNull()) { if (m_bufferedSelectionPixmap.isNull()) {
TQColor insideColor = KGlobalSettings::highlightColor(); TQColor insideColor = TDEGlobalSettings::highlightColor();
KPixmap kpixmap(m_bufferedPixmap); KPixmap kpixmap(m_bufferedPixmap);
m_bufferedSelectionPixmap = KPixmapEffect::fade(kpixmap, 0.25, insideColor); m_bufferedSelectionPixmap = KPixmapEffect::fade(kpixmap, 0.25, insideColor);
} }

@ -740,7 +740,7 @@ void ImageContent::paint(TQPainter *painter, int width, int /*height*/, const TQ
width -= 1; width -= 1;
// KPixmap pixmap = m_pixmap; // KPixmap pixmap = m_pixmap;
// if (note()->isSelected()) // if (note()->isSelected())
// pixmap = KPixmapEffect::selectedPixmap(m_pixmap, KGlobalSettings::highlightColor()); // pixmap = KPixmapEffect::selectedPixmap(m_pixmap, TDEGlobalSettings::highlightColor());
if (width >= m_pixmap.width()) // Full size if (width >= m_pixmap.width()) // Full size
painter->drawPixmap(0, 0, m_pixmap); painter->drawPixmap(0, 0, m_pixmap);

@ -801,7 +801,7 @@ void InlineEditors::initToolBars(KActionCollection *actionCollection)
TQFont defaultFont; TQFont defaultFont;
TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ? TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ?
Global::bnpView->currentBasket()->textColor() : Global::bnpView->currentBasket()->textColor() :
KGlobalSettings::textColor()); TDEGlobalSettings::textColor());
// Init the RichTextEditor Toolbar: // Init the RichTextEditor Toolbar:
richTextFont = new FocusedFontCombo(Global::mainWindow()); richTextFont = new FocusedFontCombo(Global::mainWindow());
@ -900,7 +900,7 @@ void InlineEditors::disableRichTextToolBar()
TQFont defaultFont; TQFont defaultFont;
TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ? TQColor textColor = (Global::bnpView && Global::bnpView->currentBasket() ?
Global::bnpView->currentBasket()->textColor() : Global::bnpView->currentBasket()->textColor() :
KGlobalSettings::textColor()); TDEGlobalSettings::textColor());
richTextFont->setCurrentFont(defaultFont.family()); richTextFont->setCurrentFont(defaultFont.family());
richTextFontSize->setFontSize(defaultFont.pointSize()); richTextFontSize->setFontSize(defaultFont.pointSize());
richTextColor->setColor(textColor); richTextColor->setColor(textColor);

@ -59,7 +59,7 @@ void SizeTip::positionTip( const TQRect &rect )
if ( rect.intersects( tipRect ) ) 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 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )

@ -536,7 +536,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name)
m_exportTextTags = new TQCheckBox(i18n("&Export tags in texts"), widget); m_exportTextTags = new TQCheckBox(i18n("&Export tags in texts"), widget);
connect( m_exportTextTags, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); 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); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", pixmapHelp);
hLabel = new HelpLabel( hLabel = new HelpLabel(
i18n("When does this apply?"), i18n("When does this apply?"),
@ -553,7 +553,7 @@ BasketsPage::BasketsPage(TQWidget * parent, const char * name)
m_groupOnInsertionLineWidget = new TQWidget(behaviorBox); m_groupOnInsertionLineWidget = new TQWidget(behaviorBox);
TQHBoxLayout *hLayV = new TQHBoxLayout(m_groupOnInsertionLineWidget, /*margin=*/0, KDialogBase::spacingHint()); 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); 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); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_insertion_line.png", pixmap);
HelpLabel *helpV = new HelpLabel( HelpLabel *helpV = new HelpLabel(
i18n("How to group a new note?"), i18n("How to group a new note?"),

@ -42,7 +42,7 @@ class TQGroupBox;
class TQButtonGroup; class TQButtonGroup;
class KColorCombo; class KColorCombo;
class KIntNumInput; class KIntNumInput;
class KGlobalAccel; class TDEGlobalAccel;
class TQLabel; class TQLabel;
class Container; class Container;
@ -270,7 +270,7 @@ class Settings // FIXME: Distaptch new config events ?
static inline bool showOnMouseIn() { return s_showOnMouseIn; } static inline bool showOnMouseIn() { return s_showOnMouseIn; }
static inline int timeToShowOnMouseIn() { return s_timeToShowOnMouseIn; } static inline int timeToShowOnMouseIn() { return s_timeToShowOnMouseIn; }
static inline int basketTreeWidth() { return s_basketTreeWidth; } 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 usePassivePopup() { return s_usePassivePopup; }
static inline bool welcomeBasketsAdded() { return s_welcomeBasketsAdded; } static inline bool welcomeBasketsAdded() { return s_welcomeBasketsAdded; }
static inline TQString dataFolder() { return s_dataFolder; } static inline TQString dataFolder() { return s_dataFolder; }

@ -139,7 +139,7 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
TQString message = i18n( TQString message = i18n(
"<p>Closing the main window will keep %1 running in the system tray. " "<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>" "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! // We are sure the systray icon is visible: ouf!
if (useSystray) { if (useSystray) {
// Compute size and position of the pixmap to be grabbed: // Compute size and position of the pixmap to be grabbed:

@ -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. * 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) 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()*/); painter->drawText(x + iconSize + iconMargin, y, w - iconSize - iconMargin, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_text/*painter->pen().color().name()*/);
if (!m_shortcut.isEmpty()) { if (!m_shortcut.isEmpty()) {
painter->setPen(pen); painter->setPen(pen);
if (active && enabled) if (active && enabled)
painter->setPen(KGlobalSettings::highlightedTextColor()); painter->setPen(TDEGlobalSettings::highlightedTextColor());
painter->setFont(font); painter->setFont(font);
painter->setClipping(false); painter->setClipping(false);
painter->drawText(x + 5 + w, y, 3000, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_shortcut); 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 iconSize = KIcon::SizeSmall;
int iconMargin = StateMenuItem::iconMargin(); 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()); 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. * 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) if (active && enabled)
painter->setPen(KGlobalSettings::highlightedTextColor()); painter->setPen(TDEGlobalSettings::highlightedTextColor());
painter->setFont( m_state->font(painter->font()) ); painter->setFont( m_state->font(painter->font()) );
painter->drawText(x + iconSize + iconMargin(), y, w - iconSize - iconMargin(), h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_name); painter->drawText(x + iconSize + iconMargin(), y, w - iconSize - iconMargin(), h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_name);
if (!m_shortcut.isEmpty()) { if (!m_shortcut.isEmpty()) {
painter->setPen(pen); painter->setPen(pen);
if (active && enabled) if (active && enabled)
painter->setPen(KGlobalSettings::highlightedTextColor()); painter->setPen(TDEGlobalSettings::highlightedTextColor());
painter->setFont(font); painter->setFont(font);
painter->setClipping(false); painter->setClipping(false);
painter->drawText(x + 5 + w, y, 3000, h, AlignLeft | AlignVCenter | DontClip | ShowPrefix, m_shortcut); 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() 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 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 ); TQSize textSize = TQFontMetrics(theFont).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_name );
return TQSize(iconSize + iconMargin() + textSize.width(), textSize.height()); 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 pixmapHover.fill(menuBackgroundColor); // In case the pixelMetric() haven't returned a bigger rectangle than what drawPrimitive() draws
painter.begin(&pixmapHover); painter.begin(&pixmapHover);
style |= TQStyle::Style_MouseOver; 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); kapp->style().tqdrawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style);
painter.end(); painter.end();
@ -923,7 +923,7 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
painter.begin(&pixmapHover); painter.begin(&pixmapHover);
//kapp->style().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); //kapp->style().tqdrawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style);
style |= TQStyle::Style_MouseOver; 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); kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style);
painter.end(); painter.end();
pixmapHover.setMask(pixmapHover.createHeuristicMask()); pixmapHover.setMask(pixmapHover.createHeuristicMask());

@ -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()); 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() : (withIcon && state->backgroundColor().isValid() ? state->backgroundColor()
: listView()->paletteBackgroundColor())); : listView()->paletteBackgroundColor()));
TQColor textColor = (isSelected() ? KGlobalSettings::highlightedTextColor() TQColor textColor = (isSelected() ? TDEGlobalSettings::highlightedTextColor()
: (withIcon && state->textColor().isValid() ? state->textColor() : (withIcon && state->textColor().isValid() ? state->textColor()
: listView()->paletteForegroundColor())); : listView()->paletteForegroundColor()));
@ -422,7 +422,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
emblemLayout->addWidget(m_removeEmblem); emblemLayout->addWidget(m_removeEmblem);
emblemLayout->addStretch(); 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); TQLabel *backgroundColorLabel = new TQLabel(m_backgroundColor, i18n("&Background:"), stateWidget);
TQHBoxLayout *backgroundColorLayout = new TQHBoxLayout(0, /*margin=*/0, spacingHint()); 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->addWidget(m_strike);
textLayout->addStretch(); 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); TQLabel *textColorLabel = new TQLabel(m_textColor, i18n("Co&lor:"), stateWidget);
m_font = new KFontCombo(stateWidget); m_font = new KFontCombo(stateWidget);
@ -479,7 +479,7 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
font.setFamily("monospace"); font.setFamily("monospace");
m_textEquivalent->setFont(font); 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); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export.png", textEquivalentPixmap);
HelpLabel *textEquivalentHelp = new HelpLabel( HelpLabel *textEquivalentHelp = new HelpLabel(
i18n("When does this apply?"), 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); 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); TQMimeSourceFactory::defaultFactory()->setPixmap("__resource_help_tag_export_on_every_lines.png", onEveryLinesPixmap);
HelpLabel *onEveryLinesHelp = new HelpLabel( HelpLabel *onEveryLinesHelp = new HelpLabel(
i18n("What does it mean?"), i18n("What does it mean?"),

Loading…
Cancel
Save