summaryrefslogtreecommitdiffstats
path: root/kuiviewer
diff options
context:
space:
mode:
Diffstat (limited to 'kuiviewer')
-rw-r--r--kuiviewer/kuiviewer.cpp18
-rw-r--r--kuiviewer/kuiviewer.h2
-rw-r--r--kuiviewer/kuiviewer_part.cpp74
-rw-r--r--kuiviewer/kuiviewer_part.h10
-rw-r--r--kuiviewer/main.cpp4
-rw-r--r--kuiviewer/quicreator.cpp14
-rw-r--r--kuiviewer/quicreator.h2
7 files changed, 62 insertions, 62 deletions
diff --git a/kuiviewer/kuiviewer.cpp b/kuiviewer/kuiviewer.cpp
index 91c54b9f..fab228b7 100644
--- a/kuiviewer/kuiviewer.cpp
+++ b/kuiviewer/kuiviewer.cpp
@@ -26,9 +26,9 @@
#include <kdebug.h>
-#include <qobjectlist.h>
-#include <qdockwindow.h>
-#include <qpixmap.h>
+#include <tqobjectlist.h>
+#include <tqdockwindow.h>
+#include <tqpixmap.h>
#include <kurl.h>
@@ -97,8 +97,8 @@ void KUIViewer::load(const KURL& url)
void KUIViewer::setupActions()
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
}
void KUIViewer::saveProperties(KConfig* /*config*/)
@@ -122,7 +122,7 @@ void KUIViewer::fileOpen()
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
KURL file_name =
- KFileDialog::getOpenURL( QString::null, i18n("*.ui *.UI|User Interface Files"), this );
+ KFileDialog::getOpenURL( TQString::null, i18n("*.ui *.UI|User Interface Files"), this );
if (file_name.isEmpty() == false)
{
@@ -145,7 +145,7 @@ void KUIViewer::fileOpen()
}
}
-void KUIViewer::takeScreenshot(const QCString &filename, int w, int h){
+void KUIViewer::takeScreenshot(const TQCString &filename, int w, int h){
if(!m_part)
return;
showMinimized();
@@ -157,9 +157,9 @@ void KUIViewer::takeScreenshot(const QCString &filename, int w, int h){
// resize app to be as large as desired size
adjustSize();
// Disable the saving of the size
- setAutoSaveSettings(QString::fromLatin1("MainWindow"), false);
+ setAutoSaveSettings(TQString::fromLatin1("MainWindow"), false);
}
- QPixmap pixmap = QPixmap::grabWidget( m_part->widget() );
+ TQPixmap pixmap = TQPixmap::grabWidget( m_part->widget() );
pixmap.save( filename, "PNG" );
}
diff --git a/kuiviewer/kuiviewer.h b/kuiviewer/kuiviewer.h
index 76c9ba49..9ae71b37 100644
--- a/kuiviewer/kuiviewer.h
+++ b/kuiviewer/kuiviewer.h
@@ -71,7 +71,7 @@ public:
* @param h height of image
* @param w width of image
*/
- void takeScreenshot(const QCString &filename, int h=-1, int w=-1);
+ void takeScreenshot(const TQCString &filename, int h=-1, int w=-1);
protected:
/**
diff --git a/kuiviewer/kuiviewer_part.cpp b/kuiviewer/kuiviewer_part.cpp
index b799c042..e4a87a45 100644
--- a/kuiviewer/kuiviewer_part.cpp
+++ b/kuiviewer/kuiviewer_part.cpp
@@ -34,26 +34,26 @@
#include <kparts/genericfactory.h>
#include <kstdaction.h>
#include <kstyle.h>
-#include <qmetaobject.h>
-
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qfile.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qstylefactory.h>
-#include <qvariant.h>
-#include <qvbox.h>
-#include <qvariant.h>
-#include <qwidgetfactory.h>
+#include <tqmetaobject.h>
+
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqstylefactory.h>
+#include <tqvariant.h>
+#include <tqvbox.h>
+#include <tqvariant.h>
+#include <tqwidgetfactory.h>
typedef KParts::GenericFactory<KUIViewerPart> KUIViewerPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkuiviewerpart, KUIViewerPartFactory )
-KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+KUIViewerPart::KUIViewerPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: KParts::ReadOnlyPart(parent, name)
{
// we need an instance
@@ -62,7 +62,7 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
KGlobal::locale()->insertCatalogue("kuiviewer");
// this should be your custom internal widget
- m_widget = new QVBox( parentWidget, widgetName );
+ m_widget = new TQVBox( parentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
@@ -73,20 +73,20 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
m_style = new KListAction( i18n("Style"),
CTRL + Key_S,
this,
- SLOT(slotStyle(int)),
+ TQT_SLOT(slotStyle(int)),
actionCollection(),
"change_style");
m_style->setEditable(false);
kapp->config()->setGroup("General");
- const QString currentStyle = kapp->config()->readEntry("currentWidgetStyle", KStyle::defaultStyle());
+ const TQString currentStyle = kapp->config()->readEntry("currentWidgetStyle", KStyle::defaultStyle());
- const QStringList styles = QStyleFactory::keys();
+ const TQStringList styles = TQStyleFactory::keys();
m_style->setItems(styles);
m_style->setCurrentItem(0);
- QStringList::ConstIterator it = styles.begin();
- QStringList::ConstIterator end = styles.end();
+ TQStringList::ConstIterator it = styles.begin();
+ TQStringList::ConstIterator end = styles.end();
int idx = 0;
for (; it != end; ++it, ++idx) {
if ((*it).lower() == currentStyle.lower()) {
@@ -97,14 +97,14 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
m_style->setToolTip(i18n("Set the current style to view."));
m_style->setMenuAccelsEnabled(true);
- m_copy = KStdAction::copy(this, SLOT(slotGrab()), actionCollection());
+ m_copy = KStdAction::copy(this, TQT_SLOT(slotGrab()), actionCollection());
updateActions();
// Commented out to fix warning (rich)
// slot should probably be called saveAs() for consistency with
// KParts::ReadWritePart BTW.
-// KStdAction::saveAs(this, SLOT(slotSave()), actionCollection());
+// KStdAction::saveAs(this, TQT_SLOT(slotSave()), actionCollection());
}
KUIViewerPart::~KUIViewerPart()
@@ -126,13 +126,13 @@ KAboutData *KUIViewerPart::createAboutData()
bool KUIViewerPart::openFile()
{
- // m_file is always local so we can use QFile on it
- QFile file( m_file );
+ // m_file is always local so we can use TQFile on it
+ TQFile file( m_file );
if ( !file.open(IO_ReadOnly) )
return false;
delete m_view;
- m_view = QWidgetFactory::create( &file, 0, m_widget );
+ m_view = TQWidgetFactory::create( &file, 0, m_widget );
file.close();
updateActions();
@@ -152,7 +152,7 @@ bool KUIViewerPart::openURL( const KURL& url)
emit setWindowCaption( url.prettyURL() );
m_url = url;
- m_file = QString::null;
+ m_file = TQString::null;
if (KIO::NetAccess::download(url, m_file))
return openFile();
else
@@ -178,20 +178,20 @@ void KUIViewerPart::slotStyle(int)
return;
}
- QString styleName = m_style->currentText();
- QStyle* style = QStyleFactory::create(styleName);
+ TQString styleName = m_style->currentText();
+ TQStyle* style = TQStyleFactory::create(styleName);
kdDebug() << "Change style..." << endl;
m_widget->hide();
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
m_widget->setStyle( style);
- QObjectList *l = m_widget->queryList( "QWidget" );
- for ( QObject *o = l->first(); o; o = l->next() )
- ( static_cast<QWidget *>(o) )->setStyle( style );
+ TQObjectList *l = m_widget->queryList( "TQWidget" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
+ ( static_cast<TQWidget *>(o) )->setStyle( style );
delete l;
m_widget->show();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kapp->config()->setGroup("General");
kapp->config()->writeEntry("currentWidgetStyle", m_style->currentText());
@@ -205,7 +205,7 @@ void KUIViewerPart::slotGrab()
return;
}
- QClipboard *clipboard = QApplication::clipboard();
- clipboard->setPixmap(QPixmap::grabWidget(m_widget));
+ QClipboard *clipboard = TQApplication::clipboard();
+ clipboard->setPixmap(TQPixmap::grabWidget(m_widget));
}
diff --git a/kuiviewer/kuiviewer_part.h b/kuiviewer/kuiviewer_part.h
index 92901985..38f7600d 100644
--- a/kuiviewer/kuiviewer_part.h
+++ b/kuiviewer/kuiviewer_part.h
@@ -22,7 +22,7 @@
#ifndef KUIVIEWERPART_H
#define KUIVIEWERPART_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kparts/part.h>
class QWidget;
@@ -47,8 +47,8 @@ public:
/**
* Default constructor
*/
- KUIViewerPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ KUIViewerPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor
@@ -70,8 +70,8 @@ protected:
virtual bool openFile();
private:
- QVBox *m_widget;
- QGuardedPtr<QWidget> m_view;
+ TQVBox *m_widget;
+ TQGuardedPtr<TQWidget> m_view;
KListAction *m_style;
KAction *m_copy;
};
diff --git a/kuiviewer/main.cpp b/kuiviewer/main.cpp
index 94391c75..b0349058 100644
--- a/kuiviewer/main.cpp
+++ b/kuiviewer/main.cpp
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
if (args->isSet("takescreenshot")){
widget->takeScreenshot(args->getOption("takescreenshot"),
- QString(args->getOption("screenshotwidth")).toInt(),
- QString(args->getOption("screenshotheight")).toInt());
+ TQString(args->getOption("screenshotwidth")).toInt(),
+ TQString(args->getOption("screenshotheight")).toInt());
return 0;
}
widget->show();
diff --git a/kuiviewer/quicreator.cpp b/kuiviewer/quicreator.cpp
index 19da4b29..0dc6da3e 100644
--- a/kuiviewer/quicreator.cpp
+++ b/kuiviewer/quicreator.cpp
@@ -24,9 +24,9 @@
#include <config.h>
#endif
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qwidgetfactory.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqwidgetfactory.h>
#include "quicreator.h"
@@ -40,14 +40,14 @@ extern "C"
}
}
-bool QUICreator::create(const QString &path, int width, int height, QImage &
+bool QUICreator::create(const TQString &path, int width, int height, TQImage &
img)
{
- QWidget *w = QWidgetFactory::create(path, 0, 0);
+ TQWidget *w = TQWidgetFactory::create(path, 0, 0);
if ( w )
{
- QPixmap p = QPixmap::grabWidget(w);
- img = p.convertToImage().smoothScale(width,height,QImage::ScaleMin);
+ TQPixmap p = TQPixmap::grabWidget(w);
+ img = p.convertToImage().smoothScale(width,height,TQImage::ScaleMin);
return true;
}
else
diff --git a/kuiviewer/quicreator.h b/kuiviewer/quicreator.h
index c1139357..45f13f07 100644
--- a/kuiviewer/quicreator.h
+++ b/kuiviewer/quicreator.h
@@ -28,7 +28,7 @@ class QUICreator : public ThumbCreator
{
public:
QUICreator() {};
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};