summaryrefslogtreecommitdiffstats
path: root/kcontrol/konsole
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/konsole
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/konsole')
-rw-r--r--kcontrol/konsole/kcmkonsole.cpp56
-rw-r--r--kcontrol/konsole/kcmkonsole.h2
-rw-r--r--kcontrol/konsole/schemaeditor.cpp166
-rw-r--r--kcontrol/konsole/schemaeditor.h26
-rw-r--r--kcontrol/konsole/sessioneditor.cpp100
-rw-r--r--kcontrol/konsole/sessioneditor.h18
6 files changed, 184 insertions, 184 deletions
diff --git a/kcontrol/konsole/kcmkonsole.cpp b/kcontrol/konsole/kcmkonsole.cpp
index 19b547366..64ecc45d9 100644
--- a/kcontrol/konsole/kcmkonsole.cpp
+++ b/kcontrol/konsole/kcmkonsole.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
#include <dcopclient.h>
@@ -33,10 +33,10 @@
#include "sessioneditor.h"
#include "kcmkonsole.h"
-typedef KGenericFactory<KCMKonsole, QWidget> ModuleFactory;
+typedef KGenericFactory<KCMKonsole, TQWidget> ModuleFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_konsole, ModuleFactory("kcmkonsole") )
-KCMKonsole::KCMKonsole(QWidget * parent, const char *name, const QStringList&)
+KCMKonsole::KCMKonsole(TQWidget * parent, const char *name, const TQStringList&)
:KCModule(ModuleFactory::instance(), parent, name)
{
@@ -45,7 +45,7 @@ KCMKonsole::KCMKonsole(QWidget * parent, const char *name, const QStringList&)
"configured using the RMB) and you can edit the schemas and sessions "
"available to Konsole."));
- QVBoxLayout *topLayout = new QVBoxLayout(this);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this);
dialog = new KCMKonsoleDialog(this);
dialog->line_spacingSB->setRange(0, 8, 1, false);
dialog->line_spacingSB->setSpecialValueText(i18n("normal line spacing", "Normal"));
@@ -60,24 +60,24 @@ KCMKonsole::KCMKonsole(QWidget * parent, const char *name, const QStringList&)
ab->addAuthor("Andrea Rizzi",0, "rizzi@kde.org");
setAboutData( ab );
- connect(dialog->terminalSizeHintCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->warnCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->ctrldragCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->cutToBeginningOfLineCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->allowResizeCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->bidiCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->xonXoffCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->blinkingCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->frameCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->line_spacingSB,SIGNAL(valueChanged(int)), SLOT( changed() ));
- connect(dialog->matchTabWinTitleCB,SIGNAL(toggled(bool)), SLOT( changed() ));
- connect(dialog->silence_secondsSB,SIGNAL(valueChanged(int)), SLOT( changed() ));
- connect(dialog->word_connectorLE,SIGNAL(textChanged(const QString &)), SLOT( changed() ));
- connect(dialog->SchemaEditor1, SIGNAL(changed()), SLOT( changed() ));
- connect(dialog->SessionEditor1, SIGNAL(changed()), SLOT( changed() ));
- connect(dialog->SchemaEditor1, SIGNAL(schemaListChanged(const QStringList &,const QStringList &)),
- dialog->SessionEditor1, SLOT(schemaListChanged(const QStringList &,const QStringList &)));
- connect(dialog->SessionEditor1, SIGNAL(getList()), dialog->SchemaEditor1, SLOT(getList()));
+ connect(dialog->terminalSizeHintCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->warnCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->ctrldragCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->cutToBeginningOfLineCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->allowResizeCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->bidiCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->xonXoffCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->blinkingCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->frameCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->line_spacingSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
+ connect(dialog->matchTabWinTitleCB,TQT_SIGNAL(toggled(bool)), TQT_SLOT( changed() ));
+ connect(dialog->silence_secondsSB,TQT_SIGNAL(valueChanged(int)), TQT_SLOT( changed() ));
+ connect(dialog->word_connectorLE,TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT( changed() ));
+ connect(dialog->SchemaEditor1, TQT_SIGNAL(changed()), TQT_SLOT( changed() ));
+ connect(dialog->SessionEditor1, TQT_SIGNAL(changed()), TQT_SLOT( changed() ));
+ connect(dialog->SchemaEditor1, TQT_SIGNAL(schemaListChanged(const TQStringList &,const TQStringList &)),
+ dialog->SessionEditor1, TQT_SLOT(schemaListChanged(const TQStringList &,const TQStringList &)));
+ connect(dialog->SessionEditor1, TQT_SIGNAL(getList()), dialog->SchemaEditor1, TQT_SLOT(getList()));
}
void KCMKonsole::load()
@@ -152,9 +152,9 @@ void KCMKonsole::save()
emit changed(false);
DCOPClient *dcc = kapp->dcopClient();
- dcc->send("konsole-*", "konsole", "reparseConfiguration()", QByteArray());
- dcc->send("kdesktop", "default", "configure()", QByteArray());
- dcc->send("klauncher", "klauncher", "reparseConfiguration()", QByteArray());
+ dcc->send("konsole-*", "konsole", "reparseConfiguration()", TQByteArray());
+ dcc->send("kdesktop", "default", "configure()", TQByteArray());
+ dcc->send("klauncher", "klauncher", "reparseConfiguration()", TQByteArray());
if (xonXoffOrig != xonXoffNew)
{
diff --git a/kcontrol/konsole/kcmkonsole.h b/kcontrol/konsole/kcmkonsole.h
index ae6ee069b..bf93d1cfb 100644
--- a/kcontrol/konsole/kcmkonsole.h
+++ b/kcontrol/konsole/kcmkonsole.h
@@ -31,7 +31,7 @@ class KCMKonsole
Q_OBJECT
public:
- KCMKonsole (QWidget *parent = 0, const char *name = 0, const QStringList& = 0);
+ KCMKonsole (TQWidget *parent = 0, const char *name = 0, const TQStringList& = 0);
void load();
void load(bool useDefaults);
diff --git a/kcontrol/konsole/schemaeditor.cpp b/kcontrol/konsole/schemaeditor.cpp
index f7591bee8..17eaadc3c 100644
--- a/kcontrol/konsole/schemaeditor.cpp
+++ b/kcontrol/konsole/schemaeditor.cpp
@@ -23,43 +23,43 @@
#include <dcopclient.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qwmatrix.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqwmatrix.h>
+#include <tqcombobox.h>
#include <kdebug.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kstandarddirs.h>
//#include <errno.h>
-#include <qslider.h>
+#include <tqslider.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kinputdialog.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kmessagebox.h>
#include <ksharedpixmap.h>
#include <kimageeffect.h>
-#include <qimage.h>
+#include <tqimage.h>
// SchemaListBoxText is a list box text item with schema filename
class SchemaListBoxText : public QListBoxText
{
public:
- SchemaListBoxText(const QString &title, const QString &filename): QListBoxText(title)
+ SchemaListBoxText(const TQString &title, const TQString &filename): TQListBoxText(title)
{
m_filename = filename;
};
- const QString filename() { return m_filename; };
+ const TQString filename() { return m_filename; };
private:
- QString m_filename;
+ TQString m_filename;
};
-SchemaEditor::SchemaEditor(QWidget * parent, const char *name)
+SchemaEditor::SchemaEditor(TQWidget * parent, const char *name)
:SchemaDialog(parent, name)
{
schMod= false;
@@ -75,14 +75,14 @@ SchemaEditor::SchemaEditor(QWidget * parent, const char *name)
defaultSchema = "";
spix = new KSharedPixmap;
- connect(spix, SIGNAL(done(bool)), SLOT(previewLoaded(bool)));
+ connect(spix, TQT_SIGNAL(done(bool)), TQT_SLOT(previewLoaded(bool)));
DCOPClient *client = kapp->dcopClient();
if (!client->isAttached())
client->attach();
- QByteArray data;
+ TQByteArray data;
- QDataStream args(data, IO_WriteOnly);
+ TQDataStream args(data, IO_WriteOnly);
args << 1;
client->send("kdesktop", "KBackgroundIface", "setExport(int)", data);
@@ -94,36 +94,36 @@ SchemaEditor::SchemaEditor(QWidget * parent, const char *name)
KGlobal::locale()->insertCatalogue("konsole"); // For schema translations
- connect(imageBrowse, SIGNAL(clicked()), this, SLOT(imageSelect()));
- connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCurrent()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeCurrent()));
- connect(colorCombo, SIGNAL(activated(int)), this, SLOT(slotColorChanged(int)));
- connect(typeCombo, SIGNAL(activated(int)), this, SLOT(slotTypeChanged(int)));
- connect(schemaList, SIGNAL(highlighted(int)), this, SLOT(readSchema(int)));
- connect(shadeColor, SIGNAL(changed(const QColor&)), this, SLOT(updatePreview()));
- connect(shadeSlide, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
- connect(transparencyCheck, SIGNAL(toggled(bool)), this, SLOT(updatePreview()));
- connect(backgndLine, SIGNAL(returnPressed()), this, SLOT(updatePreview()));
-
- connect(titleLine, SIGNAL(textChanged(const QString&)), this, SLOT(schemaModified()));
- connect(shadeColor, SIGNAL(changed(const QColor&)), this, SLOT(schemaModified()));
- connect(shadeSlide, SIGNAL(valueChanged(int)), this, SLOT(schemaModified()));
- connect(transparencyCheck, SIGNAL(toggled(bool)), this, SLOT(schemaModified()));
- connect(modeCombo, SIGNAL(activated(int)), this, SLOT(schemaModified()));
- connect(backgndLine, SIGNAL(returnPressed()), this, SLOT(schemaModified()));
- connect(transparentCheck, SIGNAL(toggled(bool)), this, SLOT(schemaModified()));
- connect(boldCheck, SIGNAL(toggled(bool)), this, SLOT(schemaModified()));
- connect(colorButton, SIGNAL(changed(const QColor&)), this, SLOT(schemaModified()));
- connect(backgndLine, SIGNAL(textChanged(const QString&)), this, SLOT(schemaModified()));
-
- connect(defaultSchemaCB, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
+ connect(imageBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(imageSelect()));
+ connect(saveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(saveCurrent()));
+ connect(removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeCurrent()));
+ connect(colorCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotColorChanged(int)));
+ connect(typeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTypeChanged(int)));
+ connect(schemaList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSchema(int)));
+ connect(shadeColor, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updatePreview()));
+ connect(shadeSlide, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updatePreview()));
+ connect(transparencyCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updatePreview()));
+ connect(backgndLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(updatePreview()));
+
+ connect(titleLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(schemaModified()));
+ connect(shadeColor, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(schemaModified()));
+ connect(shadeSlide, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(schemaModified()));
+ connect(transparencyCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(schemaModified()));
+ connect(modeCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(schemaModified()));
+ connect(backgndLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(schemaModified()));
+ connect(transparentCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(schemaModified()));
+ connect(boldCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(schemaModified()));
+ connect(colorButton, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(schemaModified()));
+ connect(backgndLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(schemaModified()));
+
+ connect(defaultSchemaCB, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed()));
removeButton->setEnabled( schemaList->currentItem() );
}
-QString SchemaEditor::schema()
+TQString SchemaEditor::schema()
{
- QString filename = defaultSchema;
+ TQString filename = defaultSchema;
int i = schemaList->currentItem();
if (defaultSchemaCB->isChecked() && i>=0)
@@ -133,7 +133,7 @@ QString SchemaEditor::schema()
}
-void SchemaEditor::setSchema(QString sch)
+void SchemaEditor::setSchema(TQString sch)
{
defaultSchema = sch;
sch = locate("data", "konsole/"+sch);
@@ -163,21 +163,21 @@ void SchemaEditor::updatePreview()
if (transparencyCheck->isChecked()) {
if (loaded) {
float rx = (100.0 - shadeSlide->value()) / 100;
- QImage ima(pix.convertToImage());
+ TQImage ima(pix.convertToImage());
ima = KImageEffect::fade(ima, rx, shadeColor->color());
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage(ima);
previewPixmap->setPixmap(pm);
previewPixmap->setScaledContents(true);
}
else //try to reload
{
- if(!spix->loadFromShared(QString("DESKTOP1")))
+ if(!spix->loadFromShared(TQString("DESKTOP1")))
kdDebug(0) << "cannot load" << endl;
}
} else {
- QPixmap pm;
+ TQPixmap pm;
pm.load(backgndLine->text());
if ( pm.isNull() ) {
previewPixmap->clear();
@@ -192,11 +192,11 @@ void SchemaEditor::updatePreview()
void SchemaEditor::previewLoaded(bool l)
{
if (l) {
- QWMatrix mat;
+ TQWMatrix mat;
pix =
spix->xForm(mat.
- scale(180.0 / spix->QPixmap::width(),
- 100.0 / spix->QPixmap::height()));
+ scale(180.0 / spix->TQPixmap::width(),
+ 100.0 / spix->TQPixmap::height()));
kdDebug(0) << "Loaded" << endl;
loaded = true;
if (transparencyCheck->isChecked()) {
@@ -226,19 +226,19 @@ void SchemaEditor::show()
}
-void SchemaEditor::loadAllSchema(QString currentFile)
+void SchemaEditor::loadAllSchema(TQString currentFile)
{
- QStringList list = KGlobal::dirs()->findAllResources("data", "konsole/*.schema");
- QStringList::ConstIterator it;
- disconnect(schemaList, SIGNAL(highlighted(int)), this, SLOT(readSchema(int)));
+ TQStringList list = KGlobal::dirs()->findAllResources("data", "konsole/*.schema");
+ TQStringList::ConstIterator it;
+ disconnect(schemaList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSchema(int)));
schemaList->clear();
- QListBoxItem* currentItem = 0;
+ TQListBoxItem* currentItem = 0;
for (it = list.begin(); it != list.end(); ++it) {
- QString name = (*it);
+ TQString name = (*it);
- QString title = readSchemaTitle(name);
+ TQString title = readSchemaTitle(name);
// Only insert new items so that local items override global
if (schemaList->findItem(title, ExactMatch) == 0) {
@@ -253,17 +253,17 @@ void SchemaEditor::loadAllSchema(QString currentFile)
schemaList->sort();
schemaList->setCurrentItem(0); // select the first added item correctly too
schemaList->setCurrentItem(currentItem);
- connect(schemaList, SIGNAL(highlighted(int)), this, SLOT(readSchema(int)));
+ connect(schemaList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSchema(int)));
schemaListChanged();
}
void SchemaEditor::imageSelect()
{
- QString start;
+ TQString start;
start = backgndLine->text();
if (start.isEmpty())
{
- QStringList list=KGlobal::dirs()->resourceDirs("wallpaper");
+ TQStringList list=KGlobal::dirs()->resourceDirs("wallpaper");
if(list.count()>0)
start= list.last();
}
@@ -310,7 +310,7 @@ void SchemaEditor::removeCurrent()
int i = schemaList->currentItem();
if(i==-1)
return;
- QString base = ((SchemaListBoxText *) schemaList->item(i))->filename();
+ TQString base = ((SchemaListBoxText *) schemaList->item(i))->filename();
// Query if system schemas should be removed
if (locateLocal("data", "konsole/" + base.section('/', -1)) != base) {
@@ -322,12 +322,12 @@ void SchemaEditor::removeCurrent()
return;
}
- QString base_filename = base.section('/',-1);
+ TQString base_filename = base.section('/',-1);
if(base_filename==schema())
setSchema("");
- if (!QFile::remove(base))
+ if (!TQFile::remove(base))
KMessageBox::error(this,
i18n("Cannot remove the schema.\nMaybe it is a system schema.\n"),
i18n("Error Removing Schema"));
@@ -345,7 +345,7 @@ void SchemaEditor::saveCurrent()
colorCombo->setCurrentItem(0);
slotColorChanged(0);
- QString fullpath;
+ TQString fullpath;
if (schemaList->currentText() == titleLine->text()) {
int i = schemaList->currentItem();
fullpath = ((SchemaListBoxText *) schemaList->item(i))->filename().section('/',-1);
@@ -363,25 +363,25 @@ void SchemaEditor::saveCurrent()
if (fullpath[0] != '/')
fullpath = KGlobal::dirs()->saveLocation("data", "konsole/") + fullpath;
- QFile f(fullpath);
+ TQFile f(fullpath);
if (f.open(IO_WriteOnly)) {
- QTextStream t(&f);
- t.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream t(&f);
+ t.setEncoding( TQTextStream::UnicodeUTF8 );
t << "# schema for konsole autogenerated with the schema editor" << endl;
t << endl;
t << "title " << titleLine->text() << endl; // Use title line as schema title
t << endl;
if (transparencyCheck->isChecked()) {
- QColor c = shadeColor->color();
- QString tra;
+ TQColor c = shadeColor->color();
+ TQString tra;
tra.sprintf("transparency %1.2f %3d %3d %3d",
1.0 * (100 - shadeSlide->value()) / 100, c.red(), c.green(), c.blue());
t << tra << endl;
}
if (!backgndLine->text().isEmpty()) {
- QString smode;
+ TQString smode;
int mode;
mode = modeCombo->currentItem();
if (mode == 0)
@@ -391,7 +391,7 @@ void SchemaEditor::saveCurrent()
if (mode == 2)
smode = "full";
- QString image;
+ TQString image;
image.sprintf("image %s %s",
(const char *) smode.latin1(),
(const char *) backgndLine->text().utf8());
@@ -408,7 +408,7 @@ void SchemaEditor::saveCurrent()
t << "# V V--color--V V V" << endl;
for (int i = 0; i < 20; i++) {
- QString scol;
+ TQString scol;
if (type[i] == 0)
scol.sprintf("color %2d %3d %3d %3d %2d %1d # %s", i,
color[i].red(), color[i].green(), color[i].blue(),
@@ -451,7 +451,7 @@ void SchemaEditor::schemaModified()
}
}
-QString SchemaEditor::readSchemaTitle(const QString & file)
+TQString SchemaEditor::readSchemaTitle(const TQString & file)
{
/*
Code taken from konsole/konsole/schema.cpp
@@ -459,7 +459,7 @@ QString SchemaEditor::readSchemaTitle(const QString & file)
*/
- QString fPath = locate("data", "konsole/" + file);
+ TQString fPath = locate("data", "konsole/" + file);
if (fPath.isNull())
fPath = locate("data", file);
@@ -467,7 +467,7 @@ QString SchemaEditor::readSchemaTitle(const QString & file)
if (fPath.isNull())
return 0;
- FILE *sysin = fopen(QFile::encodeName(fPath), "r");
+ FILE *sysin = fopen(TQFile::encodeName(fPath), "r");
if (!sysin)
return 0;
@@ -485,7 +485,7 @@ QString SchemaEditor::readSchemaTitle(const QString & file)
void SchemaEditor::schemaListChanged()
{
- QStringList titles, filenames;
+ TQStringList titles, filenames;
SchemaListBoxText *item;
for (int index = 0; index < (int) schemaList->count(); index++) {
@@ -528,17 +528,17 @@ void SchemaEditor::readSchema(int num)
}
if(schMod) {
- disconnect(schemaList, SIGNAL(highlighted(int)), this, SLOT(readSchema(int)));
+ disconnect(schemaList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSchema(int)));
schemaList->setCurrentItem(oldSchema);
querySave();
schemaList->setCurrentItem(num);
- connect(schemaList, SIGNAL(highlighted(int)), this, SLOT(readSchema(int)));
+ connect(schemaList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSchema(int)));
schMod=false;
}
}
- QString fPath = locate("data", "konsole/" +
+ TQString fPath = locate("data", "konsole/" +
((SchemaListBoxText *) schemaList->item(num))->filename());
if (fPath.isNull())
@@ -552,10 +552,10 @@ void SchemaEditor::readSchema(int num)
return;
}
- removeButton->setEnabled( QFileInfo (fPath).isWritable () );
+ removeButton->setEnabled( TQFileInfo (fPath).isWritable () );
defaultSchemaCB->setChecked(fPath.section('/',-1) == defaultSchema.section('/',-1));
- FILE *sysin = fopen(QFile::encodeName(fPath), "r");
+ FILE *sysin = fopen(TQFile::encodeName(fPath), "r");
if (!sysin) {
KMessageBox::error(this, i18n("Cannot load the schema."),
i18n("Error Loading Schema"));
@@ -593,7 +593,7 @@ void SchemaEditor::readSchema(int num)
else
continue;
- QString qline(line);
+ TQString qline(line);
backgndLine->setText(locate("wallpaper", qline.mid( qline.find(" ",7)+1 ) ));
modeCombo->setCurrentItem(attr - 2);
@@ -610,7 +610,7 @@ void SchemaEditor::readSchema(int num)
transparencyCheck->setChecked(true);
shadeSlide->setValue((int)(100 - rx * 100));
- shadeColor->setColor(QColor(rr, rg, rb));
+ shadeColor->setColor(TQColor(rr, rg, rb));
}
if (!strncmp(line,"rcolor",6)) {
@@ -628,7 +628,7 @@ void SchemaEditor::readSchema(int num)
continue;
if (!(0 <= bo && bo <= 1 ))
continue;
- color[fi] = QColor();
+ color[fi] = TQColor();
color[fi].setHsv(ch,cs,cv);
transparent[fi] = tr;
bold[fi] = bo;
@@ -650,7 +650,7 @@ void SchemaEditor::readSchema(int num)
continue;
if (!(0 <= bo && bo <= 1))
continue;
- color[fi] = QColor(cr, cg, cb);
+ color[fi] = TQColor(cr, cg, cb);
transparent[fi] = tr;
bold[fi] = bo;
type[fi] = 0;
diff --git a/kcontrol/konsole/schemaeditor.h b/kcontrol/konsole/schemaeditor.h
index 550f51762..9b17f169d 100644
--- a/kcontrol/konsole/schemaeditor.h
+++ b/kcontrol/konsole/schemaeditor.h
@@ -23,7 +23,7 @@
#endif
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class QPixmap;
class KSharedPixmap;
@@ -35,18 +35,18 @@ class SchemaEditor : public SchemaDialog
Q_OBJECT
public:
/** constructor */
- SchemaEditor(QWidget* parent=0, const char *name=0);
+ SchemaEditor(TQWidget* parent=0, const char *name=0);
/** destructor */
~SchemaEditor();
- QString schema();
- void setSchema(QString);
+ TQString schema();
+ void setSchema(TQString);
bool isModified() const { return schMod; }
void querySave();
signals:
void changed();
- void schemaListChanged(const QStringList &titles, const QStringList &filenames);
+ void schemaListChanged(const TQStringList &titles, const TQStringList &filenames);
public slots:
void slotColorChanged(int);
@@ -60,23 +60,23 @@ class SchemaEditor : public SchemaDialog
private slots:
void show();
void schemaModified();
- void loadAllSchema(QString currentFile="");
+ void loadAllSchema(TQString currentFile="");
void updatePreview();
private:
bool schMod;
- QMemArray<QColor> color;
- QMemArray<int> type; // 0= custom, 1= sysfg, 2=sysbg, 3=rcolor
- QMemArray<bool> transparent;
- QMemArray<bool> bold;
- QPixmap pix;
+ TQMemArray<TQColor> color;
+ TQMemArray<int> type; // 0= custom, 1= sysfg, 2=sysbg, 3=rcolor
+ TQMemArray<bool> transparent;
+ TQMemArray<bool> bold;
+ TQPixmap pix;
KSharedPixmap *spix;
- QString defaultSchema;
+ TQString defaultSchema;
bool loaded;
bool schemaLoaded;
bool change;
int oldSchema;
int oldSlot;
- QString readSchemaTitle(const QString& filename);
+ TQString readSchemaTitle(const TQString& filename);
void schemaListChanged();
};
diff --git a/kcontrol/konsole/sessioneditor.cpp b/kcontrol/konsole/sessioneditor.cpp
index 8542adfcb..5cb1c9746 100644
--- a/kcontrol/konsole/sessioneditor.cpp
+++ b/kcontrol/konsole/sessioneditor.cpp
@@ -18,8 +18,8 @@
#include "sessioneditor.h"
#include "sessioneditor.moc"
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -38,18 +38,18 @@
class SessionListBoxText : public QListBoxText
{
public:
- SessionListBoxText(const QString &title, const QString &filename): QListBoxText(title)
+ SessionListBoxText(const TQString &title, const TQString &filename): TQListBoxText(title)
{
m_filename = filename;
};
- const QString filename() { return m_filename; };
+ const TQString filename() { return m_filename; };
private:
- QString m_filename;
+ TQString m_filename;
};
-SessionEditor::SessionEditor(QWidget * parent, const char *name)
+SessionEditor::SessionEditor(TQWidget * parent, const char *name)
:SessionDialog(parent, name)
{
sesMod=false;
@@ -60,20 +60,20 @@ SessionEditor::SessionEditor(QWidget * parent, const char *name)
KGlobal::iconLoader()->addAppDir( "konsole" );
directoryLine->setMode(KFile::Directory);
- connect(sessionList, SIGNAL(highlighted(int)), this, SLOT(readSession(int)));
- connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCurrent()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeCurrent()));
+ connect(sessionList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSession(int)));
+ connect(saveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(saveCurrent()));
+ connect(removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeCurrent()));
- connect(nameLine, SIGNAL(textChanged(const QString&)), this, SLOT(sessionModified()));
- connect(directoryLine, SIGNAL(textChanged(const QString&)), this, SLOT(sessionModified()));
- connect(executeLine, SIGNAL(textChanged(const QString&)), this, SLOT(sessionModified()));
- connect(termLine, SIGNAL(textChanged(const QString&)), this, SLOT(sessionModified()));
+ connect(nameLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(sessionModified()));
+ connect(directoryLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(sessionModified()));
+ connect(executeLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(sessionModified()));
+ connect(termLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(sessionModified()));
- connect(previewIcon, SIGNAL(iconChanged(QString)), this, SLOT(sessionModified()));
+ connect(previewIcon, TQT_SIGNAL(iconChanged(TQString)), this, TQT_SLOT(sessionModified()));
- connect(fontCombo, SIGNAL(activated(int)), this, SLOT(sessionModified()));
- connect(keytabCombo, SIGNAL(activated(int)), this, SLOT(sessionModified()));
- connect(schemaCombo, SIGNAL(activated(int)), this, SLOT(sessionModified()));
+ connect(fontCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(sessionModified()));
+ connect(keytabCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(sessionModified()));
+ connect(schemaCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(sessionModified()));
}
SessionEditor::~SessionEditor()
@@ -97,22 +97,22 @@ void SessionEditor::show()
void SessionEditor::loadAllKeytab()
{
- QStringList lst = KGlobal::dirs()->findAllResources("data", "konsole/*.keytab");
+ TQStringList lst = KGlobal::dirs()->findAllResources("data", "konsole/*.keytab");
keytabCombo->clear();
keytabFilename.clear();
keytabCombo->insertItem(i18n("XTerm (XFree 4.x.x)"),0);
- keytabFilename.append(new QString(""));
+ keytabFilename.append(new TQString(""));
int i=1;
- for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for(TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
- QString name = (*it);
- QString title = readKeymapTitle(name);
+ TQString name = (*it);
+ TQString title = readKeymapTitle(name);
name = name.section('/',-1);
name = name.section('.',0);
- keytabFilename.append(new QString(name));
+ keytabFilename.append(new TQString(name));
if (title.isNull() || title.isEmpty())
title=i18n("untitled");
@@ -123,18 +123,18 @@ void SessionEditor::loadAllKeytab()
}
}
-QString SessionEditor::readKeymapTitle(const QString & file)
+TQString SessionEditor::readKeymapTitle(const TQString & file)
{
- QString fPath = locate("data", "konsole/" + file);
+ TQString fPath = locate("data", "konsole/" + file);
if (fPath.isNull())
fPath = locate("data", file);
- removeButton->setEnabled( QFileInfo (fPath).isWritable () );
+ removeButton->setEnabled( TQFileInfo (fPath).isWritable () );
if (fPath.isNull())
return 0;
- FILE *sysin = fopen(QFile::encodeName(fPath), "r");
+ FILE *sysin = fopen(TQFile::encodeName(fPath), "r");
if (!sysin)
return 0;
@@ -146,7 +146,7 @@ QString SessionEditor::readKeymapTitle(const QString & file)
fclose(sysin);
if(line[len-1] == '"')
line[len-1] = '\000';
- QString temp;
+ TQString temp;
if(line[9] == '"')
temp=i18n(line+10);
else
@@ -157,19 +157,19 @@ QString SessionEditor::readKeymapTitle(const QString & file)
return 0;
}
-void SessionEditor::loadAllSession(QString currentFile)
+void SessionEditor::loadAllSession(TQString currentFile)
{
- QStringList list = KGlobal::dirs()->findAllResources("data", "konsole/*.desktop", false, true);
+ TQStringList list = KGlobal::dirs()->findAllResources("data", "konsole/*.desktop", false, true);
sessionList->clear();
- QListBoxItem* currentItem = 0;
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQListBoxItem* currentItem = 0;
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QString name = (*it);
+ TQString name = (*it);
KSimpleConfig* co = new KSimpleConfig(name,true);
co->setDesktopGroup();
- QString sesname = co->readEntry("Name",i18n("Unnamed"));
+ TQString sesname = co->readEntry("Name",i18n("Unnamed"));
delete co;
sessionList->insertItem(new SessionListBoxText(sesname, name));
@@ -186,21 +186,21 @@ void SessionEditor::loadAllSession(QString currentFile)
void SessionEditor::readSession(int num)
{
int i,counter;
- QString str;
+ TQString str;
KSimpleConfig* co;
if(sesMod) {
- disconnect(sessionList, SIGNAL(highlighted(int)), this, SLOT(readSession(int)));
+ disconnect(sessionList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSession(int)));
sessionList->setCurrentItem(oldSession);
querySave();
sessionList->setCurrentItem(num);
- connect(sessionList, SIGNAL(highlighted(int)), this, SLOT(readSession(int)));
+ connect(sessionList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(readSession(int)));
sesMod=false;
}
if( sessionList->item(num) )
{
- removeButton->setEnabled( QFileInfo ( ((SessionListBoxText *)sessionList->item(num))->filename() ).isWritable () );
+ removeButton->setEnabled( TQFileInfo ( ((SessionListBoxText *)sessionList->item(num))->filename() ).isWritable () );
co = new KSimpleConfig( ((SessionListBoxText *)sessionList->item(num))->filename(),true);
co->setDesktopGroup();
@@ -225,7 +225,7 @@ void SessionEditor::readSession(int num)
str = co->readEntry("KeyTab","");
i=0;
counter=0;
- for (QString *it = keytabFilename.first(); it != 0; it = keytabFilename.next()) {
+ for (TQString *it = keytabFilename.first(); it != 0; it = keytabFilename.next()) {
if (str == (*it))
i = counter;
counter++;
@@ -235,7 +235,7 @@ void SessionEditor::readSession(int num)
str = co->readEntry("Schema","");
i=0;
counter=0;
- for (QString *it = schemaFilename.first(); it != 0; it = schemaFilename.next()) {
+ for (TQString *it = schemaFilename.first(); it != 0; it = schemaFilename.next()) {
if (str == (*it))
i = counter;
counter++;
@@ -261,19 +261,19 @@ void SessionEditor::querySave()
}
}
-void SessionEditor::schemaListChanged(const QStringList &titles, const QStringList &filenames)
+void SessionEditor::schemaListChanged(const TQStringList &titles, const TQStringList &filenames)
{
- const QString text = schemaCombo->currentText();
+ const TQString text = schemaCombo->currentText();
schemaCombo->clear();
schemaFilename.clear();
schemaCombo->insertItem(i18n("Konsole Default"),0);
- schemaFilename.append(new QString(""));
+ schemaFilename.append(new TQString(""));
schemaCombo->insertStringList(titles, 1);
- for (QStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it)
- schemaFilename.append(new QString(*it));
+ for (TQStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it)
+ schemaFilename.append(new TQString(*it));
// Restore current item
int item = 0;
@@ -289,14 +289,14 @@ void SessionEditor::saveCurrent()
{
// Verify Execute entry is valid; otherwise Konsole will ignore it.
// This code is take from konsole.cpp; if you change one, change both.
- QString exec = executeLine->text();
+ TQString exec = executeLine->text();
if ( !exec.isEmpty() ) // If Execute field is empty, default shell is used.
{
if ( exec.startsWith( "su -c \'" ) )
exec = exec.mid( 7, exec.length() - 8 );
exec = KRun::binaryName( exec, false );
exec = KShell::tildeExpand( exec );
- QString pexec = KGlobal::dirs()->findExe( exec );
+ TQString pexec = KGlobal::dirs()->findExe( exec );
if ( pexec.isEmpty() )
{
@@ -311,7 +311,7 @@ void SessionEditor::saveCurrent()
}
- QString fullpath;
+ TQString fullpath;
if (sessionList->currentText() == nameLine->text()) {
fullpath = ( ((SessionListBoxText *)sessionList->item( sessionList->currentItem() ))->filename() ).section('/',-1);
}
@@ -351,7 +351,7 @@ void SessionEditor::saveCurrent()
void SessionEditor::removeCurrent()
{
- QString base = ((SessionListBoxText *)sessionList->item( sessionList->currentItem() ))->filename();
+ TQString base = ((SessionListBoxText *)sessionList->item( sessionList->currentItem() ))->filename();
// Query if system sessions should be removed
if (locateLocal("data", "konsole/" + base.section('/', -1)) != base) {
@@ -363,7 +363,7 @@ void SessionEditor::removeCurrent()
return;
}
- if (!QFile::remove(base)) {
+ if (!TQFile::remove(base)) {
KMessageBox::error(this,
i18n("Cannot remove the session.\nMaybe it is a system session.\n"),
i18n("Error Removing Session"));
diff --git a/kcontrol/konsole/sessioneditor.h b/kcontrol/konsole/sessioneditor.h
index 15d1aee2b..638b6b0e6 100644
--- a/kcontrol/konsole/sessioneditor.h
+++ b/kcontrol/konsole/sessioneditor.h
@@ -22,10 +22,10 @@
#include <config.h>
#endif
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "sessiondialog.h"
@@ -33,7 +33,7 @@ class SessionEditor : public SessionDialog
{
Q_OBJECT
public:
- SessionEditor(QWidget* parent=0, const char *name=0);
+ SessionEditor(TQWidget* parent=0, const char *name=0);
~SessionEditor();
bool isModified() const { return sesMod; }
@@ -44,7 +44,7 @@ class SessionEditor : public SessionDialog
void getList();
public slots:
- void schemaListChanged(const QStringList &titles, const QStringList &filenames);
+ void schemaListChanged(const TQStringList &titles, const TQStringList &filenames);
private slots:
void readSession(int);
@@ -55,14 +55,14 @@ class SessionEditor : public SessionDialog
private:
void show();
void loadAllKeytab();
- void loadAllSession(QString currentFile="");
- QString readKeymapTitle(const QString& filename);
+ void loadAllSession(TQString currentFile="");
+ TQString readKeymapTitle(const TQString& filename);
bool sesMod;
int oldSession;
bool loaded;
- QPtrList<QString> keytabFilename;
- QPtrList<QString> schemaFilename;
+ TQPtrList<TQString> keytabFilename;
+ TQPtrList<TQString> schemaFilename;
};
#endif