summaryrefslogtreecommitdiffstats
path: root/libkdepim/kpartsdesignerplugin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/kpartsdesignerplugin
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kpartsdesignerplugin')
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp40
-rw-r--r--libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h42
2 files changed, 41 insertions, 41 deletions
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
index 834418d2c..b615c40b8 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.cpp
@@ -22,14 +22,14 @@
#include <kparts/componentfactory.h>
#include <kparts/part.h>
#include <kmimetype.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdepimmacros.h>
-KPartsGenericPart::KPartsGenericPart( QWidget* parentWidget, const char* name )
- : QWidget( parentWidget, name ), m_part( 0 )
+KPartsGenericPart::KPartsGenericPart( TQWidget* parentWidget, const char* name )
+ : TQWidget( parentWidget, name ), m_part( 0 )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
}
@@ -41,14 +41,14 @@ void KPartsGenericPart::load()
// Not sure why - but it's not really needed anyway.
if ( !kapp )
return;
- QString mimetype = m_mimetype;
+ TQString mimetype = m_mimetype;
if ( mimetype == "auto" )
mimetype == KMimeType::findByURL( m_url )->name();
if ( m_part ) {
delete m_part;
}
// "this" is both the parent widget and the parent object
- m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, QString::null, this, 0, this, 0 );
+ m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString::null, this, 0, this, 0 );
if ( m_part ) {
m_part->openURL( m_url );
m_part->widget()->show();
@@ -59,47 +59,47 @@ void KPartsGenericPart::load()
static const char* mykey = "KPartsGenericPart";
-QStringList KPartsWidgetPlugin::keys() const {
- return QStringList() << mykey;
+TQStringList KPartsWidgetPlugin::keys() const {
+ return TQStringList() << mykey;
}
-QWidget * KPartsWidgetPlugin::create( const QString & key, QWidget * parent, const char * name ) {
+TQWidget * KPartsWidgetPlugin::create( const TQString & key, TQWidget * parent, const char * name ) {
if ( key == mykey )
return new KPartsGenericPart( parent, name );
return 0;
}
-QString KPartsWidgetPlugin::group( const QString & key ) const {
+TQString KPartsWidgetPlugin::group( const TQString & key ) const {
if ( key == mykey )
return "Display (KDE)";
- return QString::null;
+ return TQString::null;
}
#if 0
-QIconSet KPartsWidgetPlugin::iconSet( const QString & key ) const {
- return QIconSet();
+TQIconSet KPartsWidgetPlugin::iconSet( const TQString & key ) const {
+ return TQIconSet();
}
#endif
-QString KPartsWidgetPlugin::includeFile( const QString & key ) const {
+TQString KPartsWidgetPlugin::includeFile( const TQString & key ) const {
if ( key == mykey )
return "partplugin.h";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::toolTip( const QString & key ) const {
+TQString KPartsWidgetPlugin::toolTip( const TQString & key ) const {
if ( key == mykey )
return "Generic KParts viewer";
- return QString::null;
+ return TQString::null;
}
-QString KPartsWidgetPlugin::whatsThis( const QString & key ) const {
+TQString KPartsWidgetPlugin::whatsThis( const TQString & key ) const {
if ( key == mykey )
return "A widget to embed any KParts viewer, given a url and optionally a mimetype";
- return QString::null;
+ return TQString::null;
}
-bool KPartsWidgetPlugin::isContainer( const QString & /*key*/ ) const {
+bool KPartsWidgetPlugin::isContainer( const TQString & /*key*/ ) const {
return false;
}
diff --git a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
index 798053cac..5df3db240 100644
--- a/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
+++ b/libkdepim/kpartsdesignerplugin/kpartsdesignerplugin.h
@@ -21,50 +21,50 @@
#ifndef DESIGNER_PARTPLUGIN_H
#define DESIGNER_PARTPLUGIN_H
-#include <qwidgetplugin.h>
-#include <qwidget.h>
+#include <tqwidgetplugin.h>
+#include <tqwidget.h>
namespace KParts { class ReadOnlyPart; }
/**
* Generic part loader, able to view any kind of file for which
* a KParts::ReadOnlyPart is available
*/
-class KPartsGenericPart : public QWidget {
+class KPartsGenericPart : public TQWidget {
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
- Q_PROPERTY( QString mimetype READ mimetype WRITE setMimetype )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
+ Q_PROPERTY( TQString mimetype READ mimetype WRITE setMimetype )
public:
- KPartsGenericPart( QWidget* parentWidget, const char* name );
+ KPartsGenericPart( TQWidget* parentWidget, const char* name );
- QString url() const { return m_url; }
- void setURL( const QString& url ) { m_url = url; load(); }
+ TQString url() const { return m_url; }
+ void setURL( const TQString& url ) { m_url = url; load(); }
// The mimetype, or "auto" if unknown
- QString mimetype() const { return m_mimetype; }
- void setMimetype( const QString& mimetype ) { m_mimetype = mimetype; load(); }
+ TQString mimetype() const { return m_mimetype; }
+ void setMimetype( const TQString& mimetype ) { m_mimetype = mimetype; load(); }
private:
void load();
private:
- QString m_mimetype;
- QString m_url;
+ TQString m_mimetype;
+ TQString m_url;
KParts::ReadOnlyPart* m_part;
};
/**
* Qt designer plugin for embedding a KParts using KPartsGenericPart
*/
-class KPartsWidgetPlugin : public QWidgetPlugin {
+class KPartsWidgetPlugin : public TQWidgetPlugin {
public:
- QStringList keys() const;
- QWidget * create( const QString & key, QWidget * parent, const char * name );
- QString group( const QString & key ) const;
- //QIconSet iconSet( const QString & key ) const;
- QString includeFile( const QString & key ) const;
- QString toolTip( const QString & key ) const;
- QString whatsThis( const QString & key ) const;
- bool isContainer( const QString & key ) const;
+ TQStringList keys() const;
+ TQWidget * create( const TQString & key, TQWidget * parent, const char * name );
+ TQString group( const TQString & key ) const;
+ //TQIconSet iconSet( const TQString & key ) const;
+ TQString includeFile( const TQString & key ) const;
+ TQString toolTip( const TQString & key ) const;
+ TQString whatsThis( const TQString & key ) const;
+ bool isContainer( const TQString & key ) const;
};
#endif