diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /kuiviewer | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kuiviewer')
-rw-r--r-- | kuiviewer/kuiviewer.cpp | 12 | ||||
-rw-r--r-- | kuiviewer/kuiviewer.h | 1 | ||||
-rw-r--r-- | kuiviewer/kuiviewer_part.cpp | 16 | ||||
-rw-r--r-- | kuiviewer/kuiviewer_part.h | 5 | ||||
-rw-r--r-- | kuiviewer/quicreator.cpp | 2 |
5 files changed, 19 insertions, 17 deletions
diff --git a/kuiviewer/kuiviewer.cpp b/kuiviewer/kuiviewer.cpp index fab228b7..b710ce95 100644 --- a/kuiviewer/kuiviewer.cpp +++ b/kuiviewer/kuiviewer.cpp @@ -60,7 +60,7 @@ KUIViewer::KUIViewer() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this, + m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(TQT_TQOBJECT(this), "kuiviewer_part", "KParts::ReadOnlyPart" )); if (m_part) @@ -97,8 +97,8 @@ void KUIViewer::load(const KURL& url) void KUIViewer::setupActions() { - KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(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( TQString::null, i18n("*.ui *.UI|User Interface Files"), this ); + KFileDialog::getOpenURL( TQString(), i18n("*.ui *.UI|User Interface Files"), this ); if (file_name.isEmpty() == false) { @@ -153,11 +153,11 @@ void KUIViewer::takeScreenshot(const TQCString &filename, int w, int h){ // resize widget to the desired size m_part->widget()->setMinimumSize(w, h); m_part->widget()->setMaximumSize(w, h); - m_part->widget()->repaint(); + m_part->widget()->tqrepaint(); // resize app to be as large as desired size adjustSize(); // Disable the saving of the size - setAutoSaveSettings(TQString::fromLatin1("MainWindow"), false); + setAutoSaveSettings(TQString::tqfromLatin1("MainWindow"), false); } TQPixmap pixmap = TQPixmap::grabWidget( m_part->widget() ); pixmap.save( filename, "PNG" ); diff --git a/kuiviewer/kuiviewer.h b/kuiviewer/kuiviewer.h index 9ae71b37..415e712d 100644 --- a/kuiviewer/kuiviewer.h +++ b/kuiviewer/kuiviewer.h @@ -49,6 +49,7 @@ class ReadOnlyPart; class KUIViewer : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor diff --git a/kuiviewer/kuiviewer_part.cpp b/kuiviewer/kuiviewer_part.cpp index 5f231361..2ff58821 100644 --- a/kuiviewer/kuiviewer_part.cpp +++ b/kuiviewer/kuiviewer_part.cpp @@ -51,10 +51,10 @@ typedef KParts::GenericFactory<KUIViewerPart> KUIViewerPartFactory; K_EXPORT_COMPONENT_FACTORY( libkuiviewerpart, KUIViewerPartFactory ) -KUIViewerPart::KUIViewerPart( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KUIViewerPart::KUIViewerPart( TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*args*/ ) - : KParts::ReadOnlyPart(parent, name) + : KParts::ReadOnlyPart(tqparent, name) { // we need an instance setInstance( KUIViewerPartFactory::instance() ); @@ -62,7 +62,7 @@ KUIViewerPart::KUIViewerPart( TQWidget *parentWidget, const char *widgetName, KGlobal::locale()->insertCatalogue("kuiviewer"); // this should be your custom internal widget - m_widget = new TQVBox( parentWidget, widgetName ); + m_widget = new TQVBox( tqparentWidget, widgetName ); // notify the part that this is our internal widget setWidget(m_widget); @@ -72,7 +72,7 @@ KUIViewerPart::KUIViewerPart( TQWidget *parentWidget, const char *widgetName, m_style = new KListAction( i18n("Style"), CTRL + Key_S, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotStyle(int)), actionCollection(), "change_style"); @@ -152,7 +152,7 @@ bool KUIViewerPart::openURL( const KURL& url) emit setWindowCaption( url.prettyURL() ); m_url = url; - m_file = TQString::null; + m_file = TQString(); if (KIO::NetAccess::download(url, m_file)) return openFile(); else @@ -187,7 +187,7 @@ void KUIViewerPart::slotStyle(int) TQObjectList *l = m_widget->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) - ( static_cast<TQWidget *>(o) )->setStyle( style ); + ( TQT_TQWIDGET(o) )->setStyle( style ); delete l; m_widget->show(); @@ -205,7 +205,7 @@ void KUIViewerPart::slotGrab() return; } - QClipboard *clipboard = TQApplication::clipboard(); + TQClipboard *clipboard = TQApplication::tqclipboard(); clipboard->setPixmap(TQPixmap::grabWidget(m_widget)); } diff --git a/kuiviewer/kuiviewer_part.h b/kuiviewer/kuiviewer_part.h index 4966923f..09a2a882 100644 --- a/kuiviewer/kuiviewer_part.h +++ b/kuiviewer/kuiviewer_part.h @@ -43,12 +43,13 @@ class KListView; class KUIViewerPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - KUIViewerPart(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList &args); + KUIViewerPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList &args); /** * Destructor diff --git a/kuiviewer/quicreator.cpp b/kuiviewer/quicreator.cpp index 0dc6da3e..c7a9e996 100644 --- a/kuiviewer/quicreator.cpp +++ b/kuiviewer/quicreator.cpp @@ -47,7 +47,7 @@ img) if ( w ) { TQPixmap p = TQPixmap::grabWidget(w); - img = p.convertToImage().smoothScale(width,height,TQImage::ScaleMin); + img = p.convertToImage().smoothScale(width,height,TQ_ScaleMin); return true; } else |