summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-25 20:37:57 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 01:06:13 +0100
commit42573cc6b43972357d166b0eabf665b1de64f0ac (patch)
tree9c84befb71dcad1076657618f616d82ab440b1ec /config
parent931f305a785fdaf3b310aeed1c2033d3e42ec82a (diff)
downloadtde-style-baghira-42573cc6b43972357d166b0eabf665b1de64f0ac.tar.gz
tde-style-baghira-42573cc6b43972357d166b0eabf665b1de64f0ac.zip
Update to new style API
Rename KStyle to TDEStyle Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'config')
-rw-r--r--config/Makefile.am16
-rw-r--r--config/tdestyle_baghira_config.cpp (renamed from config/kstyle_baghira_config.cpp)184
-rw-r--r--config/tdestyle_baghira_config.h (renamed from config/kstyle_baghira_config.h)10
3 files changed, 105 insertions, 105 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index fb84c20..1c1e6af 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1,21 +1,21 @@
INCLUDES = $(all_includes)
-noinst_HEADERS = about.h configdialog.h help.h kstyle_baghira_config.h colordialog.h colorpicker.h
+noinst_HEADERS = about.h configdialog.h help.h tdestyle_baghira_config.h colordialog.h colorpicker.h
METASOURCES = AUTO
# Install this plugin in the KDE modules directory
-kde_module_LTLIBRARIES = kstyle_baghira_config.la
+kde_module_LTLIBRARIES = tdestyle_baghira_config.la
-kstyle_baghira_config_la_SOURCES = kstyle_baghira_config.cpp colordialog.cpp colorpicker.cpp configdialog.ui help.ui about.ui
-# kstyle_baghira_config_la_METASOURCES = AUTO
-kstyle_baghira_config_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO)
-kstyle_baghira_config_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined $(KDE_PLUGIN)
+tdestyle_baghira_config_la_SOURCES = tdestyle_baghira_config.cpp colordialog.cpp colorpicker.cpp configdialog.ui help.ui about.ui
+# tdestyle_baghira_config_la_METASOURCES = AUTO
+tdestyle_baghira_config_la_LIBADD = $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO)
+tdestyle_baghira_config_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined $(KDE_PLUGIN)
messages: rc.cpp
- $(XGETTEXT) *.cpp -o $(podir)/kstyle_baghira_config.pot
+ $(XGETTEXT) *.cpp -o $(podir)/tdestyle_baghira_config.pot
pixmaps.h: $(srcdir)/generatePixmaps.sh
$(SHELL) $(srcdir)/generatePixmaps.sh $(top_srcdir)
CLEANFILES = pixmaps.h
-kstyle_baghira_config.lo: pixmaps.h
+tdestyle_baghira_config.lo: pixmaps.h
diff --git a/config/kstyle_baghira_config.cpp b/config/tdestyle_baghira_config.cpp
index ad43805..f94c50b 100644
--- a/config/kstyle_baghira_config.cpp
+++ b/config/tdestyle_baghira_config.cpp
@@ -57,7 +57,7 @@
#include <X11/Xutil.h>
#include <fixx11h.h>
-#include "kstyle_baghira_config.h"
+#include "tdestyle_baghira_config.h"
#include "pixmaps.h"
#include "colordialog.h"
#include "colorpicker.h"
@@ -84,7 +84,7 @@
iGrey = 255 - grey;\
destR = (iGrey * (srcR - delta) + grey * R) / 255; \
destG = (iGrey * (srcG - delta) + grey * G) / 255; \
- destB = (iGrey * (srcB - delta) + grey * B) / 255;
+ destB = (iGrey * (srcB - delta) + grey * B) / 255;
#define SATURATION_COLOR2(S,R,G,B) \
int max = (int)(255+0.65*(100-S)); \
@@ -94,38 +94,38 @@
destR = (S*destR + (100-S)*R)/100; \
destG = (S*destG + (100-S)*G)/100; \
destB = (S*destB + (100-S)*B)/100;
-
+
#define COLOR_SPACE(R,G,B) \
if ( R < 0 ) R = 0; else if ( R > 255 ) R = 255; \
if ( G < 0 ) G = 0; else if ( G > 255 ) G = 255; \
if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255;
-void kstyle_baghira_config::openHtml1()
+void tdestyle_baghira_config::openHtml1()
{
TQStringList args;
args << "exec" << "http://baghira.sf.net/";
kapp->tdeinitExec("kfmclient", args);
}
-void kstyle_baghira_config::openHtml2()
+void tdestyle_baghira_config::openHtml2()
{
TQStringList args;
args << "exec" << "http://www.sf.net/projects/baghira/files/";
kapp->tdeinitExec("kfmclient", args);
}
-void kstyle_baghira_config::startBab()
+void tdestyle_baghira_config::startBab()
{
kapp->tdeinitExec("bab");
}
-void kstyle_baghira_config::startKRuler()
+void tdestyle_baghira_config::startKRuler()
{
kapp->tdeinitExec("kruler");
}
-TQImage* kstyle_baghira_config::tintButton(TQImage &src, TQColor c)
+TQImage* tdestyle_baghira_config::tintButton(TQImage &src, TQColor c)
{
TQImage *dest = new TQImage( src.width(), src.height(), 32, 0 );
dest->setAlphaBuffer( true );
@@ -154,7 +154,7 @@ TQImage* kstyle_baghira_config::tintButton(TQImage &src, TQColor c)
return ( dest );
}
-TQImage* kstyle_baghira_config::tintBrush( TQImage &img, TQColor c)
+TQImage* tdestyle_baghira_config::tintBrush( TQImage &img, TQColor c)
{
TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 );
unsigned int *data = ( unsigned int * ) img.bits();
@@ -164,12 +164,12 @@ TQImage* kstyle_baghira_config::tintBrush( TQImage &img, TQColor c)
int delta;
int red, green, blue, grey, iGrey;
int destR, destG, destB, alpha;
-
+
int srcR = c.red();
int srcG = c.green();
int srcB = c.blue();
-
-
+
+
// float srcPercent, destPercent;
for ( current = 0 ; current < total ; ++current ) {
alpha = tqAlpha( data[ current ] );
@@ -184,7 +184,7 @@ TQImage* kstyle_baghira_config::tintBrush( TQImage &img, TQColor c)
return ( dest );
}
-void kstyle_baghira_config::sliderButtonRedChanged(int value)
+void tdestyle_baghira_config::sliderButtonRedChanged(int value)
{
sliderButtonRedValue = value;
dialog_->valueButtonRed->setNum(value);
@@ -193,7 +193,7 @@ void kstyle_baghira_config::sliderButtonRedChanged(int value)
configChanged();
}
-void kstyle_baghira_config::sliderButtonGreenChanged(int value)
+void tdestyle_baghira_config::sliderButtonGreenChanged(int value)
{
sliderButtonGreenValue = value;
dialog_->valueButtonGreen->setNum(value);
@@ -202,7 +202,7 @@ void kstyle_baghira_config::sliderButtonGreenChanged(int value)
configChanged();
}
-void kstyle_baghira_config::sliderButtonBlueChanged(int value)
+void tdestyle_baghira_config::sliderButtonBlueChanged(int value)
{
sliderButtonBlueValue = value;
dialog_->valueButtonBlue->setNum(value);
@@ -211,7 +211,7 @@ void kstyle_baghira_config::sliderButtonBlueChanged(int value)
configChanged();
}
-void kstyle_baghira_config::sliderBrushRedChanged(int value)
+void tdestyle_baghira_config::sliderBrushRedChanged(int value)
{
sliderBrushRedValue = value;
dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue)));
@@ -219,7 +219,7 @@ void kstyle_baghira_config::sliderBrushRedChanged(int value)
configChanged();
}
-void kstyle_baghira_config::sliderBrushGreenChanged(int value)
+void tdestyle_baghira_config::sliderBrushGreenChanged(int value)
{
sliderBrushGreenValue = value;
dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue)));
@@ -227,7 +227,7 @@ void kstyle_baghira_config::sliderBrushGreenChanged(int value)
configChanged();
}
-void kstyle_baghira_config::sliderBrushBlueChanged(int value)
+void tdestyle_baghira_config::sliderBrushBlueChanged(int value)
{
sliderBrushBlueValue = value;
dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue)));
@@ -235,7 +235,7 @@ void kstyle_baghira_config::sliderBrushBlueChanged(int value)
configChanged();
}
-// void kstyle_baghira_config::sliderBrushSaturationChanged(int value)
+// void tdestyle_baghira_config::sliderBrushSaturationChanged(int value)
// {
// sliderBrushSaturationValue = value;
// dialog_->pixmapBrushPreview->setPixmap(*tintBrush(baseImage2, TQColor(sliderBrushRedValue, sliderBrushGreenValue, sliderBrushBlueValue), sliderBrushSaturationValue));
@@ -255,14 +255,14 @@ int presetColor[NUMBEROFCOLORS][3] = {{84,144,218},{130,170,190},{103,118,134},{
// --------------------------------
-typedef KGenericFactory<kstyle_baghira_config, TQWidget> kstyle_baghira_configFactory;
-K_EXPORT_COMPONENT_FACTORY( kcm_kstyle_baghira_config, kstyle_baghira_configFactory("kcmkstyle_baghira_config"))
+typedef KGenericFactory<tdestyle_baghira_config, TQWidget> tdestyle_baghira_configFactory;
+K_EXPORT_COMPONENT_FACTORY( tdecm_tdestyle_baghira_config, tdestyle_baghira_configFactory("tdecmtdestyle_baghira_config"))
//extern TQImage uic_findImage(const TQString& name);
//extern void qInitImages_baghira();
//extern void qCleanupImages_baghira();
-void kstyle_baghira_config::updateCR()
+void tdestyle_baghira_config::updateCR()
{
if (!about_->isShown())
{
@@ -276,7 +276,7 @@ void kstyle_baghira_config::updateCR()
about_->crLabel->setText(crNotes[crCurrent]);
}
-void kstyle_baghira_config::showAbout()
+void tdestyle_baghira_config::showAbout()
{
crCurrent = 0;
about_->crLabel->setText(crNotes[0]);
@@ -284,7 +284,7 @@ void kstyle_baghira_config::showAbout()
about_->exec();
}
-kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name, const TQStringList&) : TQWidget(parent, name )//, myAboutData(0)
+tdestyle_baghira_config::tdestyle_baghira_config(TQWidget *parent, const char *name, const TQStringList&) : TQWidget(parent, name )//, myAboutData(0)
{
loadDone = false;
if (parent) parent->setCaption("Configure Your Cat");
@@ -293,7 +293,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name,
for (int i = 0; i < NUMBEROFCOLORS; i++)
dialog_->colorPresets->insertItem ( presetColorName[i], i );
-
+
TQWidget *rulesWidget = new TQWidget(dialog_->tabWidget);
TQHBoxLayout *rwlh = new TQHBoxLayout(rulesWidget);
applist = new TDEListView(rulesWidget);
@@ -344,9 +344,9 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name,
connect(appsetter, SIGNAL(removeApp(TQString)), this, SLOT(removeApp(TQString)));
// preview stuff
baseImage = uic_findImage("button-base");
-
+
layout->addWidget(dialog_);
-
+
dialog_->show();
help_ = new Help(dialog_);
about_ = new About(dialog_);
@@ -362,7 +362,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name,
about_->systemLabel->setText(tmpString.section(' ',1,1));
about_->cpuLabel->setText(tmpString.section(' ',0,0));
about_->setFixedSize (380, 430);
-
+
// connections
// buttons
connect(dialog_->buttonHelp, SIGNAL(clicked()), help_, SLOT(exec()));
@@ -374,7 +374,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name,
connect(dialog_->buttonLoad, SIGNAL(clicked()), this, SLOT(buttonLoadAction()));
connect(dialog_->buttonSaveAs, SIGNAL(clicked()), this, SLOT(buttonSaveAsAction()));
connect(dialog_->colorPresets, SIGNAL(activated(int)), this, SLOT(setPresetColor(int)));
-
+
// changes
connect(dialog_->defaultStyle, SIGNAL(activated(int)), this, SLOT(configChanged()));
connect(dialog_->buttonStyle, SIGNAL(activated(int)), this, SLOT(handleButtonStyles(int)));
@@ -412,7 +412,7 @@ kstyle_baghira_config::kstyle_baghira_config(TQWidget *parent, const char *name,
connect(dialog_->useCustomColors, SIGNAL(stateChanged(int)), this, SLOT(configChanged()));
connect(dialog_->drawMenuStripe, SIGNAL(stateChanged(int)), this, SLOT(configChanged()));
connect(dialog_->glossyMenus, SIGNAL(stateChanged(int)), this, SLOT(configChanged()));
-
+
connect(dialog_->customInactiveColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SLOT(changeTooluttonHighlightColor(const TQColor &)));
connect(dialog_->treeLineColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
@@ -432,7 +432,7 @@ connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SL
connect(dialog_->inactiveTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->activeTabColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
connect(dialog_->menuStripeColor, SIGNAL(changed(const TQColor &)), this, SLOT(configChanged()));
-
+
connect(dialog_->sliderButtonRed, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonRedChanged(int)));
connect(dialog_->sliderButtonGreen, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonGreenChanged(int)));
connect(dialog_->sliderButtonBlue, SIGNAL(valueChanged (int)), this, SLOT(sliderButtonBlueChanged(int)));
@@ -440,7 +440,7 @@ connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SL
connect(dialog_->sliderBrushRed, SIGNAL(valueChanged (int)), this, SLOT(sliderBrushRedChanged(int)));
connect(dialog_->sliderBrushGreen, SIGNAL(valueChanged (int)), this, SLOT(sliderBrushGreenChanged(int)));
connect(dialog_->sliderBrushBlue, SIGNAL(valueChanged (int)), this, SLOT(sliderBrushBlueChanged(int)));
-
+
// GUI
connect (dialog_->defaultStyle, SIGNAL(activated(int)), this, SLOT(setDesign(int)));
connect (dialog_->inactiveColorType, SIGNAL(activated(int)), this, SLOT(enableInButtonColor(int)));
@@ -452,34 +452,34 @@ connect(dialog_->toolbuttonHighColor, SIGNAL(changed(const TQColor &)), this, SL
connect (dialog_->drawMenuStripe, SIGNAL(toggled(bool)), dialog_->menuStripeColor, SLOT(setEnabled(bool)));
// connect (dialog_->tintBrush, SIGNAL(toggled(bool)), dialog_->brushBox, SLOT(setEnabled(bool)));
connect (dialog_->useCustomColors, SIGNAL(toggled(bool)), dialog_->colorFrame, SLOT(setEnabled(bool)));
-
+
// load settings
load();
loadDone = true;
-
+
dialog_->pixmapButtonPreview->setPixmap(*tintButton(baseImage, TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue)));
};
-kstyle_baghira_config::~kstyle_baghira_config()
+tdestyle_baghira_config::~tdestyle_baghira_config()
{
if (timer) delete timer;
}
-void kstyle_baghira_config::setPresetColor(int i)
+void tdestyle_baghira_config::setPresetColor(int i)
{
dialog_->sliderButtonRed->setValue(presetColor[i][0]);
dialog_->sliderButtonGreen->setValue(presetColor[i][1]);
dialog_->sliderButtonBlue->setValue(presetColor[i][2]);
}
-void kstyle_baghira_config::load()
+void tdestyle_baghira_config::load()
{
TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc";
load (tmpString);
}
-void kstyle_baghira_config::load(TQString &fileName)
+void tdestyle_baghira_config::load(TQString &fileName)
{
TDEConfig *config = new TDEConfig(fileName);
// TQSettings config;
@@ -508,7 +508,7 @@ void kstyle_baghira_config::load(TQString &fileName)
dialog_->valueButtonRed->setNum(sliderButtonRedValue);
dialog_->valueButtonGreen->setNum(sliderButtonGreenValue);
dialog_->valueButtonBlue->setNum(sliderButtonBlueValue);
-
+
// special Widgets
//ListViews
dialog_->useRectLVH->setChecked( config->readBoolEntry( "Special_UseFlatLVH", false));
@@ -535,7 +535,7 @@ void kstyle_baghira_config::load(TQString &fileName)
//Tabs
dialog_->aquaTabs->setCurrentItem(config->readNumEntry("Design_TabStyleAqua", 0 ));
dialog_->brushedTabs->setCurrentItem(config->readNumEntry("Design_TabStyleBrushed", 1 ));
-
+
// menus
dialog_->menuBackground->setCurrentItem( config->readNumEntry( "Menu_Background", 0));
dialog_->menuOpacity->setValue( config->readNumEntry( "Menu_Opacity", 70));
@@ -575,7 +575,7 @@ void kstyle_baghira_config::load(TQString &fileName)
dialog_->menuMaxWidth->setValue(config->readNumEntry("Width", TQDesktopWidget().availableGeometry().width()));
config->setGroup("Sidebar");
delete config;
-
+
config = new TDEConfig("kdeglobals");
config->setGroup( "Toolbar style" );
dialog_->toolbuttonHighColor->setColor(config->readColorEntry("HighlightColor", new TQColor(103,141,178)) );
@@ -583,7 +583,7 @@ void kstyle_baghira_config::load(TQString &fileName)
}
-void kstyle_baghira_config::defaults()
+void tdestyle_baghira_config::defaults()
{
dialog_->defaultStyle->setCurrentItem(0);
dialog_->buttonStyle->setCurrentItem(1);
@@ -605,7 +605,7 @@ void kstyle_baghira_config::defaults()
dialog_->valueButtonRed->setNum(sliderButtonRedValue);
dialog_->valueButtonGreen->setNum(sliderButtonGreenValue);
dialog_->valueButtonBlue->setNum(sliderButtonBlueValue);
-
+
// special Widgets
// dialog_->animateSlider;
dialog_->shadowSlider->setChecked( false);
@@ -625,7 +625,7 @@ void kstyle_baghira_config::defaults()
dialog_->progressType->setCurrentItem( 0);
dialog_->aquaTabs->setCurrentItem( 0 );
dialog_->brushedTabs->setCurrentItem(1);
-
+
// menus
// dialog_->transGroup;
dialog_->menuBackground->setCurrentItem(0);
@@ -640,7 +640,7 @@ void kstyle_baghira_config::defaults()
dialog_->drawMenuStripe->setChecked(false);
dialog_->glossyMenus->setChecked(true);
dialog_->menuStripeColor->setColor( TQt::white.rgb());
-
+
// custom colors
dialog_->useCustomColors->setChecked( false);
dialog_->radioOffColor->setColor( colorGroup().background().rgb());
@@ -657,14 +657,14 @@ void kstyle_baghira_config::defaults()
emit changed(true);
}
-void kstyle_baghira_config::save()
+void tdestyle_baghira_config::save()
{
TQString tmpString = TQDir::homeDirPath() + "/.qt/baghirarc";
save(tmpString);
// emit changed(true);
}
-void kstyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color)
+void tdestyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color)
{
TDEConfig *config = new TDEConfig("kdeglobals");
config->setGroup( "Toolbar style" );
@@ -672,7 +672,7 @@ void kstyle_baghira_config::changeTooluttonHighlightColor(const TQColor & color)
delete config;
}
-void kstyle_baghira_config::handleButtonStyles(int i)
+void tdestyle_baghira_config::handleButtonStyles(int i)
{
if (i != 2 && sender() == dialog_->buttonStyle && dialog_->toolbuttonStyle->currentItem() != 2)
dialog_->toolbuttonStyle->setCurrentItem(i);
@@ -681,7 +681,7 @@ void kstyle_baghira_config::handleButtonStyles(int i)
configChanged();
}
-void kstyle_baghira_config::save(TQString &fileName)
+void tdestyle_baghira_config::save(TQString &fileName)
{
// TQSettings *config = new TQSettings;
TDEConfig *config = new TDEConfig(fileName);
@@ -705,7 +705,7 @@ void kstyle_baghira_config::save(TQString &fileName)
config->writeEntry("Design_CenterTabs", dialog_->centerTabs->isOn());
//button color stuff
config->writeEntry("Design_ButtonColor", (int)(TQColor(sliderButtonRedValue, sliderButtonGreenValue, sliderButtonBlueValue).rgb()));
-
+
// special Widgets
//listviews
// dialog_->animateSlider;
@@ -733,7 +733,7 @@ void kstyle_baghira_config::save(TQString &fileName)
if (dialog_->replaceMenubar->isOn())
{
file.open(IO_WriteOnly);
- const char *msg =
+ const char *msg =
"[Desktop Entry]\n\
Hidden=true\n\
Type=Plugin\n\
@@ -774,7 +774,7 @@ X-TDE-UniqueApplet=true\n";
config->writeEntry("Menu_DrawMenuStripe", dialog_->drawMenuStripe->isOn());
config->writeEntry("Menu_Glossy", dialog_->glossyMenus->isOn());
config->writeEntry("Menu_StripeColor", (int)dialog_->menuStripeColor->color().rgb());
-
+
// custom colors
config->writeEntry("Colors_UseCustomColors", dialog_->useCustomColors->isOn());
config->writeEntry("Colors_RadioOff", (int)dialog_->radioOffColor->color().rgb());
@@ -797,7 +797,7 @@ X-TDE-UniqueApplet=true\n";
}
-void kstyle_baghira_config::configChanged()
+void tdestyle_baghira_config::configChanged()
{
if (loadDone)
{
@@ -807,26 +807,26 @@ void kstyle_baghira_config::configChanged()
}
-TQString kstyle_baghira_config::quickHelp() const
+TQString tdestyle_baghira_config::quickHelp() const
{
return i18n("Configure Your Cat");
}
-void kstyle_baghira_config::setDesign(int d)
+void tdestyle_baghira_config::setDesign(int d)
{
bool b = (d == 0);
dialog_->stippleBackground->setEnabled(b);
dialog_->stippleContrast->setEnabled(b);
dialog_->shadowGroups->setEnabled(b);
- dialog_->shadowIntensity->setEnabled(b);
+ dialog_->shadowIntensity->setEnabled(b);
}
-void kstyle_baghira_config::enableInButtonColor(int d)
+void tdestyle_baghira_config::enableInButtonColor(int d)
{
dialog_->customInactiveColor->setEnabled(d == 3);
}
-void kstyle_baghira_config::enableMenuColorStuff(int d)
+void tdestyle_baghira_config::enableMenuColorStuff(int d)
{
bool b = (d == 2);
dialog_->menuTextColor->setEnabled(b);
@@ -834,45 +834,45 @@ void kstyle_baghira_config::enableMenuColorStuff(int d)
dialog_->menuColor2->setEnabled(b && dialog_->menuBackground->currentItem() > 1);
}
-void kstyle_baghira_config::buttonLoadAction()
+void tdestyle_baghira_config::buttonLoadAction()
{
TQString tmpString = KFileDialog::getOpenFileName(TQDir::homeDirPath(), "*", this, "Select a Baghira config file");
if (!tmpString.isEmpty())
load(tmpString);
}
-void kstyle_baghira_config::buttonSaveAsAction()
+void tdestyle_baghira_config::buttonSaveAsAction()
{
TQString tmpString = KFileDialog::getSaveFileName(TQDir::homeDirPath(), "*", this, "Save current Baghira configuration as");
save(tmpString);
}
-void kstyle_baghira_config::editApp()
+void tdestyle_baghira_config::editApp()
{
emit editApp(applist->currentItem()->text(0), applist->currentItem()->text(1));
}
-void kstyle_baghira_config::removeApp()
+void tdestyle_baghira_config::removeApp()
{
TQString string = TQDir::homeDirPath() + "/.baghira/" + applist->currentItem()->text(0);
TQFile::remove(string);
applist->takeItem(applist->currentItem());
}
-void kstyle_baghira_config::removeApp(TQString name)
+void tdestyle_baghira_config::removeApp(TQString name)
{
TQString string = TQDir::homeDirPath() + "/.baghira/" + name;
TQFile::remove(string);
applist->takeItem(applist->findItem(name, 0, TQt::ExactMatch));
}
-void kstyle_baghira_config::addApp(TQString string, TQString linkString)
+void tdestyle_baghira_config::addApp(TQString string, TQString linkString)
{
applist->insertItem(new TDEListViewItem(applist, string, linkString));
applist->sort();
}
-void kstyle_baghira_config::selectWindow()
+void tdestyle_baghira_config::selectWindow()
// taken from kcmkwin
{
// use a dialog, so that all user input is blocked
@@ -888,7 +888,7 @@ void kstyle_baghira_config::selectWindow()
Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
// Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_COMMAND", False );
-bool kstyle_baghira_config::eventFilter( TQObject* o, TQEvent* e )
+bool tdestyle_baghira_config::eventFilter( TQObject* o, TQEvent* e )
// adapted from kcmkwin... again ;)
{
if( o != grabber )
@@ -912,7 +912,7 @@ bool kstyle_baghira_config::eventFilter( TQObject* o, TQEvent* e )
return true;
}
-WId kstyle_baghira_config::findWindow()
+WId tdestyle_baghira_config::findWindow()
// taken from kcmkwin... as well =)
{
Window root;
@@ -946,7 +946,7 @@ WId kstyle_baghira_config::findWindow()
}
-void kstyle_baghira_config::menuToggled(bool active)
+void tdestyle_baghira_config::menuToggled(bool active)
{
if (!active || !loadDone)
return;
@@ -965,30 +965,30 @@ void kstyle_baghira_config::menuToggled(bool active)
//////////////////////////////////////////////////////////////////////////////
// Plugin Stuff //
//////////////////////////////////////////////////////////////////////////////
-
+
extern "C"
-{
- TQWidget* allocate_kstyle_config(TQWidget* parent){
- return(new kstyle_baghira_config(parent, "BaghiraConfig"));
+{
+ TQWidget* allocate_tdestyle_config(TQWidget* parent){
+ return(new tdestyle_baghira_config(parent, "BaghiraConfig"));
}
}
AppSetter::AppSetter(TQWidget *parent, const char *name) : TQWidget(parent, name, TQt::WType_Dialog | TQt::WShowModal )
{
isEdit = FALSE;
-
+
TQLabel *label1 = new TQLabel(i18n("<qt><b>Application Name</b></qt>"), this);
command = new TQLineEdit(this);
-
+
TQLabel *linkTo = new TQLabel(i18n("<qt><b>Just like</b></qt>"),this);
link = new TQComboBox(this);
-
+
box = new TQGroupBox(2,TQt::Horizontal,i18n("Custom Settings"),this);
box->setCheckable( true );
-
+
new TQLabel(i18n("<qt><b>Style</b></qt>"), box);
new TQLabel("<qt><b>Deco</b></qt>", box);
-
+
style = new TQComboBox(box);
style->insertItem(i18n("Don't set"));
style->insertItem("Jaguar");
@@ -996,7 +996,7 @@ AppSetter::AppSetter(TQWidget *parent, const char *name) : TQWidget(parent, name
style->insertItem("Brushed Metal");
style->insertItem("Tiger");
style->insertItem("Milk");
-
+
deco = new TQComboBox(box);
deco->insertItem(i18n("Don't set"));
deco->insertItem("Jaguar");
@@ -1004,49 +1004,49 @@ AppSetter::AppSetter(TQWidget *parent, const char *name) : TQWidget(parent, name
deco->insertItem("Brushed Metal");
deco->insertItem("Tiger");
deco->insertItem("Milk");
-
+
new TQLabel(i18n("<qt><b>Buttons</b></qt>"), box);
new TQLabel(i18n("<qt><b>Toolbuttons</b></qt>"), box);
-
+
buttons = new TQComboBox(box);
buttons->insertItem("Jaguar");
buttons->insertItem("Panther");
buttons->insertItem("iTunes");
buttons->insertItem("Tiger");
buttons->insertItem("Milk");
-
-
+
+
toolButtons = new TQComboBox(box);
toolButtons->insertItem("Jaguar");
toolButtons->insertItem("Panther");
toolButtons->insertItem("iTunes");
toolButtons->insertItem("Tiger");
toolButtons->insertItem("Milk");
-
+
new TQLabel(i18n("<qt><b>Tab vs. Chooser</b></qt>"), box);
new TQLabel(i18n("<qt>Inactive Button</qt>"), box);
-
+
tabs = new TQComboBox(box);
tabs->insertItem(i18n("Don't set"));
tabs->insertItem("Tabs");
tabs->insertItem("Adaptive");
tabs->insertItem("Choosers");
-
-
+
+
inbutton = new TQComboBox(box);
inbutton->insertItem("Fixed");
inbutton->insertItem("Background");
inbutton->insertItem("Active Button");
-
+
scanlines = new TQCheckBox("Show scanlines", box);
-
+
TQWidget *dumb = new TQWidget(box);
customColors = new TQCheckBox(dumb);
buttonColors = new TQPushButton("Custom Colors", dumb);
TQHBoxLayout *clh = new TQHBoxLayout(dumb);
clh->addWidget(customColors);
clh->addWidget(buttonColors);
-
+
TQVBoxLayout *lv = new TQVBoxLayout(this,11,6);
lv->addWidget(label1);
lv->addWidget(command);
@@ -1059,9 +1059,9 @@ AppSetter::AppSetter(TQWidget *parent, const char *name) : TQWidget(parent, name
lh->addWidget(cancel);
TQPushButton *ok = new TQPushButton("Ok",this);
lh->addWidget(ok);
-
+
colorDialog = new ColorDialog(this);
-
+
connect(box, SIGNAL(toggled( bool )), link, SLOT(setDisabled(bool)));
connect(box, SIGNAL(toggled( bool )), linkTo, SLOT(setDisabled(bool)));
connect(style, SIGNAL(activated( int )), this, SLOT(handler(int)));
@@ -1240,4 +1240,4 @@ void AppSetter::reset()
box->setChecked ( false );
}
-#include "kstyle_baghira_config.moc"
+#include "tdestyle_baghira_config.moc"
diff --git a/config/kstyle_baghira_config.h b/config/tdestyle_baghira_config.h
index 8b5afe1..0fb6b93 100644
--- a/config/kstyle_baghira_config.h
+++ b/config/tdestyle_baghira_config.h
@@ -18,8 +18,8 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _KSTYLE_BAGHIRA_CONFIG_H_
-#define _KSTYLE_BAGHIRA_CONFIG_H_
+#ifndef _TDESTYLE_BAGHIRA_CONFIG_H_
+#define _TDESTYLE_BAGHIRA_CONFIG_H_
//#include <tdecmodule.h>
#include <tqcolor.h>
@@ -37,13 +37,13 @@ class TQCheckBox;
class TQComboBox;
class TQGroupBox;
-class kstyle_baghira_config: public TQWidget
+class tdestyle_baghira_config: public TQWidget
{
Q_OBJECT
public:
- kstyle_baghira_config( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
- ~kstyle_baghira_config();
+ tdestyle_baghira_config( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() );
+ ~tdestyle_baghira_config();
virtual void load();
void load(TQString &fileName);