summaryrefslogtreecommitdiffstats
path: root/kpresenter/autoformEdit/AFChoose.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/autoformEdit/AFChoose.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/autoformEdit/AFChoose.cpp')
-rw-r--r--kpresenter/autoformEdit/AFChoose.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kpresenter/autoformEdit/AFChoose.cpp b/kpresenter/autoformEdit/AFChoose.cpp
index d5f00758..64268e28 100644
--- a/kpresenter/autoformEdit/AFChoose.cpp
+++ b/kpresenter/autoformEdit/AFChoose.cpp
@@ -20,11 +20,11 @@
#include "AFChoose.h"
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtextstream.h>
-#include <qdir.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -34,8 +34,8 @@
#include <KPrFactory.h>
-AFChoose::AFChoose(QWidget *parent, const QString &caption, const char *name)
- : QTabDialog(parent,name,true)
+AFChoose::AFChoose(TQWidget *tqparent, const TQString &caption, const char *name)
+ : TQTabDialog(tqparent,name,true)
{
setCaption(caption);
setCancelButton(i18n("&Cancel"));
@@ -43,8 +43,8 @@ AFChoose::AFChoose(QWidget *parent, const QString &caption, const char *name)
groupList.setAutoDelete(true);
getGroups();
setupTabs();
- connect(this,SIGNAL(applyButtonPressed()),this,SLOT(chosen()));
- connect(this,SIGNAL(cancelButtonPressed()),this,SLOT(cancelClicked()));
+ connect(this,TQT_SIGNAL(applyButtonPressed()),this,TQT_SLOT(chosen()));
+ connect(this,TQT_SIGNAL(cancelButtonPressed()),this,TQT_SLOT(cancelClicked()));
}
AFChoose::~AFChoose()
@@ -54,19 +54,19 @@ AFChoose::~AFChoose()
void AFChoose::getGroups()
{
// global autoforms (as we don't have an editor we don't have local ones)
- QString afDir = locate( "autoforms", ".autoforms", KPrFactory::global() );
+ TQString afDir = locate( "autoforms", ".autoforms", KPrFactory::global() );
- QFile f( afDir );
+ TQFile f( afDir );
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
- QString s;
+ TQTextStream t( &f );
+ TQString s;
while ( !t.eof() ) {
s = t.readLine();
if ( !s.isEmpty() ) {
grpPtr = new Group;
- QString directory=QFileInfo( afDir ).dirPath() + "/" + s.simplifyWhiteSpace();
+ TQString directory=TQFileInfo( afDir ).dirPath() + "/" + s.simplifyWhiteSpace();
grpPtr->dir.setFile(directory);
- QDir d(directory);
+ TQDir d(directory);
if(d.exists(".directory")) {
KSimpleConfig config(d.absPath()+"/.directory", true);
config.setDesktopGroup();
@@ -85,25 +85,25 @@ void AFChoose::setupTabs()
{
for (grpPtr=groupList.first();grpPtr != 0;grpPtr=groupList.next())
{
- grpPtr->tab = new QVBox(this);
- QWhatsThis::add(grpPtr->tab, i18n( "Choose a predefined shape by clicking on it then clicking the OK button (or just double-click on the shape). You can then insert the shape onto your slide by drawing the area with the mouse pointer." ) );
+ grpPtr->tab = new TQVBox(this);
+ TQWhatsThis::add(grpPtr->tab, i18n( "Choose a predefined tqshape by clicking on it then clicking the OK button (or just double-click on the tqshape). You can then insert the tqshape onto your slide by drawing the area with the mouse pointer." ) );
grpPtr->loadWid = new KIconCanvas(grpPtr->tab);
// Changes for the new KIconCanvas (Werner)
- QDir d( grpPtr->dir.absFilePath() );
+ TQDir d( grpPtr->dir.absFilePath() );
d.setNameFilter( "*.desktop" );
if( d.exists() ) {
- QStringList files=d.entryList( QDir::Files | QDir::Readable, QDir::Name );
+ TQStringList files=d.entryList( TQDir::Files | TQDir::Readable, TQDir::Name );
for(unsigned int i=0; i<files.count(); ++i) {
- QString path=grpPtr->dir.absFilePath() + QChar('/');
+ TQString path=grpPtr->dir.absFilePath() + TQChar('/');
files[i]=path + files[i];
KSimpleConfig config(files[i]);
config.setDesktopGroup();
if (config.readEntry("Type")=="Link") {
- QString text=config.readEntry("Name");
- QString icon=config.readEntry("Icon");
+ TQString text=config.readEntry("Name");
+ TQString icon=config.readEntry("Icon");
if(icon[0]!='/') // allow absolute paths for icons
icon=path + icon;
- QString filename=config.readPathEntry("URL");
+ TQString filename=config.readPathEntry("URL");
if(filename[0]!='/') {
if(filename.left(6)=="file:/") // I doubt this will happen
filename=filename.right(filename.length()-6);
@@ -112,7 +112,7 @@ void AFChoose::setupTabs()
grpPtr->entries.insert(text, filename);
// now load the icon and create the item
// This code is shamelessly borrowed from KIconCanvas::slotLoadFiles
- QImage img;
+ TQImage img;
img.load(icon);
if (img.isNull()) {
kdWarning() << "Couldn't find icon " << icon << endl;
@@ -127,9 +127,9 @@ void AFChoose::setupTabs()
img = img.smoothScale(width, 60);
}
}
- QPixmap pic;
+ TQPixmap pic;
pic.convertFromImage(img);
- QIconViewItem *item = new QIconViewItem(grpPtr->loadWid, text, pic);
+ TQIconViewItem *item = new TQIconViewItem(grpPtr->loadWid, text, pic);
item->setKey(text);
item->setDragEnabled(false);
item->setDropEnabled(false);
@@ -137,18 +137,18 @@ void AFChoose::setupTabs()
continue; // Invalid .desktop file
}
}
- grpPtr->loadWid->setBackgroundColor(colorGroup().base());
- grpPtr->loadWid->setResizeMode(QIconView::Adjust);
+ grpPtr->loadWid->setBackgroundColor(tqcolorGroup().base());
+ grpPtr->loadWid->setResizeMode(TQIconView::Adjust);
grpPtr->loadWid->sort();
- connect(grpPtr->loadWid,SIGNAL(nameChanged(QString)),
- this,SLOT(nameChanged(QString)));
- connect(this, SIGNAL(currentChanged(QWidget *)), this,
- SLOT(tabChanged(QWidget*)));
- connect(grpPtr->loadWid,SIGNAL( doubleClicked ( QIconViewItem *)),this,
- SLOT(slotDoubleClick()));
- grpPtr->label = new QLabel(grpPtr->tab);
+ connect(grpPtr->loadWid,TQT_SIGNAL(nameChanged(TQString)),
+ this,TQT_SLOT(nameChanged(TQString)));
+ connect(this, TQT_SIGNAL(currentChanged(TQWidget *)), this,
+ TQT_SLOT(tabChanged(TQWidget*)));
+ connect(grpPtr->loadWid,TQT_SIGNAL( doubleClicked ( TQIconViewItem *)),this,
+ TQT_SLOT(slotDoubleClick()));
+ grpPtr->label = new TQLabel(grpPtr->tab);
grpPtr->label->setText(" ");
- grpPtr->label->setMaximumHeight(grpPtr->label->sizeHint().height());
+ grpPtr->label->setMaximumHeight(grpPtr->label->tqsizeHint().height());
addTab(grpPtr->tab,grpPtr->name);
}
}
@@ -160,13 +160,13 @@ void AFChoose::slotDoubleClick()
accept();
}
-void AFChoose::nameChanged(QString name)
+void AFChoose::nameChanged(TQString name)
{
for (grpPtr=groupList.first();grpPtr != 0;grpPtr=groupList.next())
grpPtr->label->setText(name);
}
-void AFChoose::tabChanged(QWidget *w) {
+void AFChoose::tabChanged(TQWidget *w) {
for(grpPtr=groupList.first();grpPtr != 0;grpPtr=groupList.next()) {
if(grpPtr->tab==w)
@@ -193,10 +193,10 @@ void AFChoose::cancelClicked()
emit afchooseCanceled();
}
-void AFChoose::closeEvent ( QCloseEvent *e )
+void AFChoose::closeEvent ( TQCloseEvent *e )
{
emit afchooseCanceled();
- QTabDialog::closeEvent ( e );
+ TQTabDialog::closeEvent ( e );
}
#include "AFChoose.moc"