summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/summary
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kontact/plugins/summary
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/plugins/summary')
-rw-r--r--kontact/plugins/summary/dropwidget.cpp8
-rw-r--r--kontact/plugins/summary/dropwidget.h5
-rw-r--r--kontact/plugins/summary/kcmkontactsummary.cpp26
-rw-r--r--kontact/plugins/summary/kcmkontactsummary.h10
-rw-r--r--kontact/plugins/summary/summaryview_part.cpp32
-rw-r--r--kontact/plugins/summary/summaryview_part.h3
-rw-r--r--kontact/plugins/summary/summaryview_plugin.h1
7 files changed, 45 insertions, 40 deletions
diff --git a/kontact/plugins/summary/dropwidget.cpp b/kontact/plugins/summary/dropwidget.cpp
index 5b6039827..300d7993d 100644
--- a/kontact/plugins/summary/dropwidget.cpp
+++ b/kontact/plugins/summary/dropwidget.cpp
@@ -23,8 +23,8 @@
#include "dropwidget.h"
-DropWidget::DropWidget( TQWidget *parent, const char *name )
- : TQWidget( parent, name )
+DropWidget::DropWidget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name )
{
setAcceptDrops( true );
}
@@ -36,8 +36,8 @@ void DropWidget::dragEnterEvent( TQDragEnterEvent *event )
void DropWidget::dropEvent( TQDropEvent *event )
{
- int tqalignment = ( event->pos().x() < (width() / 2) ? Qt::AlignLeft : Qt::AlignRight );
- tqalignment |= ( event->pos().y() < (height() / 2) ? Qt::AlignTop : Qt::AlignBottom );
+ int tqalignment = ( event->pos().x() < (width() / 2) ? TQt::AlignLeft : TQt::AlignRight );
+ tqalignment |= ( event->pos().y() < (height() / 2) ? TQt::AlignTop : TQt::AlignBottom );
emit summaryWidgetDropped( this, event->source(), tqalignment );
}
diff --git a/kontact/plugins/summary/dropwidget.h b/kontact/plugins/summary/dropwidget.h
index 41c892eaf..ee430d90c 100644
--- a/kontact/plugins/summary/dropwidget.h
+++ b/kontact/plugins/summary/dropwidget.h
@@ -24,12 +24,13 @@
#include <tqwidget.h>
-class DropWidget : public QWidget
+class DropWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DropWidget( TQWidget *parent, const char *name = 0 );
+ DropWidget( TQWidget *tqparent, const char *name = 0 );
signals:
void summaryWidgetDropped( TQWidget *target, TQWidget *widget, int tqalignment );
diff --git a/kontact/plugins/summary/kcmkontactsummary.cpp b/kontact/plugins/summary/kcmkontactsummary.cpp
index 22d27f47d..ba78c226a 100644
--- a/kontact/plugins/summary/kcmkontactsummary.cpp
+++ b/kontact/plugins/summary/kcmkontactsummary.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#include <kaboutdata.h>
@@ -43,16 +43,16 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kontactsummary( TQWidget *parent, const char * ) {
- return new KCMKontactSummary( parent, "kcmkontactsummary" );
+ KDE_EXPORT KCModule *create_kontactsummary( TQWidget *tqparent, const char * ) {
+ return new KCMKontactSummary( tqparent, "kcmkontactsummary" );
}
}
-class PluginItem : public QCheckListItem
+class PluginItem : public TQCheckListItem
{
public:
- PluginItem( KPluginInfo *info, KListView *parent )
- : TQCheckListItem( parent, TQString::null, TQCheckListItem::CheckBox ),
+ PluginItem( KPluginInfo *info, KListView *tqparent )
+ : TQCheckListItem( tqparent, TQString(), TQCheckListItem::CheckBox ),
mInfo( info )
{
TQPixmap pm = KGlobal::iconLoader()->loadIcon( mInfo->icon(), KIcon::Small );
@@ -71,15 +71,15 @@ class PluginItem : public QCheckListItem
else if ( column == 1 )
return mInfo->comment();
else
- return TQString::null;
+ return TQString();
}
private:
KPluginInfo *mInfo;
};
-PluginView::PluginView( TQWidget *parent, const char *name )
- : KListView( parent, name )
+PluginView::PluginView( TQWidget *tqparent, const char *name )
+ : KListView( tqparent, name )
{
addColumn( i18n( "Name" ) );
setAllColumnsShowFocus( true );
@@ -90,8 +90,8 @@ PluginView::~PluginView()
{
}
-KCMKontactSummary::KCMKontactSummary( TQWidget *parent, const char *name )
- : KCModule( parent, name )
+KCMKontactSummary::KCMKontactSummary( TQWidget *tqparent, const char *name )
+ : KCModule( tqparent, name )
{
TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
@@ -157,7 +157,7 @@ void KCMKontactSummary::load()
if ( var.toBool() == true ) {
PluginItem *item = new PluginItem( *it, mPluginView );
- if ( activeSummaries.find( (*it)->pluginName() ) != activeSummaries.end() )
+ if ( activeSummaries.tqfind( (*it)->pluginName() ) != activeSummaries.end() )
item->setOn( true );
}
}
diff --git a/kontact/plugins/summary/kcmkontactsummary.h b/kontact/plugins/summary/kcmkontactsummary.h
index fd1f983d9..4545f16d3 100644
--- a/kontact/plugins/summary/kcmkontactsummary.h
+++ b/kontact/plugins/summary/kcmkontactsummary.h
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
- with any edition of Qt, and distribute the resulting executable,
- without including the source code for Qt in the source distribution.
+ with any edition of TQt, and distribute the resulting executable,
+ without including the source code for TQt in the source distribution.
*/
#ifndef KCMKONTACTSUMMARY_H
@@ -33,18 +33,20 @@ class KPluginInfo;
class PluginView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginView( TQWidget *parent, const char *name = 0 );
+ PluginView( TQWidget *tqparent, const char *name = 0 );
~PluginView();
};
class KCMKontactSummary : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KCMKontactSummary( TQWidget *parent = 0, const char *name = 0 );
+ KCMKontactSummary( TQWidget *tqparent = 0, const char *name = 0 );
virtual void load();
virtual void save();
diff --git a/kontact/plugins/summary/summaryview_part.cpp b/kontact/plugins/summary/summaryview_part.cpp
index e7c161ea1..f28ce79ec 100644
--- a/kontact/plugins/summary/summaryview_part.cpp
+++ b/kontact/plugins/summary/summaryview_part.cpp
@@ -58,7 +58,7 @@
#include "summaryview_part.h"
#include "broadcaststatus.h"
-using KPIM::BroadcasStatus;
+using KPIM::BroadcastqStatus;
namespace Kontact
{
@@ -67,8 +67,8 @@ namespace Kontact
SummaryViewPart::SummaryViewPart( Kontact::Core *core, const char*,
const KAboutData *aboutData,
- TQObject *parent, const char *name )
- : KParts::ReadOnlyPart( parent, name ),
+ TQObject *tqparent, const char *name )
+ : KParts::ReadOnlyPart( tqparent, name ),
mCore( core ), mFrame( 0 ), mConfigAction( 0 )
{
setInstance( new KInstance( aboutData ) );
@@ -168,7 +168,7 @@ void SummaryViewPart::updateWidgets()
TQValueList<Kontact::Plugin*>::ConstIterator it = plugins.begin();
for ( ; it != end; ++it ) {
Kontact::Plugin *plugin = *it;
- if ( activeSummaries.find( plugin->identifier() ) == activeSummaries.end() )
+ if ( activeSummaries.tqfind( plugin->identifier() ) == activeSummaries.end() )
continue;
Kontact::Summary *summary = plugin->createSummaryWidget( mFrame );
@@ -177,7 +177,7 @@ void SummaryViewPart::updateWidgets()
mSummaries.insert( plugin->identifier(), summary );
connect( summary, TQT_SIGNAL( message( const TQString& ) ),
- BroadcasStatus::instance(), TQT_SLOT( seStatusMsg( const TQString& ) ) );
+ BroadcastqStatus::instance(), TQT_SLOT( seStatusMsg( const TQString& ) ) );
connect( summary, TQT_SIGNAL( summaryWidgetDropped( TQWidget*, TQWidget*, int ) ),
this, TQT_SLOT( summaryWidgetMoved( TQWidget*, TQWidget*, int ) ) );
@@ -197,13 +197,13 @@ void SummaryViewPart::updateWidgets()
{
TQStringList::Iterator strIt;
for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) {
- if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) {
+ if ( loadedSummaries.tqfind( *strIt ) == loadedSummaries.end() ) {
strIt = mLeftColumnSummaries.remove( strIt );
--strIt;
}
}
for ( strIt = mRightColumnSummaries.begin(); strIt != mRightColumnSummaries.end(); ++strIt ) {
- if ( loadedSummaries.find( *strIt ) == loadedSummaries.end() ) {
+ if ( loadedSummaries.tqfind( *strIt ) == loadedSummaries.end() ) {
strIt = mRightColumnSummaries.remove( strIt );
--strIt;
}
@@ -223,12 +223,12 @@ void SummaryViewPart::updateWidgets()
TQStringList::Iterator strIt;
for ( strIt = mLeftColumnSummaries.begin(); strIt != mLeftColumnSummaries.end(); ++strIt ) {
- if ( mSummaries.find( *strIt ) != mSummaries.end() )
+ if ( mSummaries.tqfind( *strIt ) != mSummaries.end() )
mLeftColumn->addWidget( mSummaries[ *strIt ] );
}
for ( strIt = mRightColumnSummaries.begin(); strIt != mRightColumnSummaries.end(); ++strIt ) {
- if ( mSummaries.find( *strIt ) != mSummaries.end() )
+ if ( mSummaries.tqfind( *strIt ) != mSummaries.end() )
mRightColumn->addWidget( mSummaries[ *strIt ] );
}
@@ -266,17 +266,17 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in
if ( target == mFrame ) {
int pos = 0;
- if ( tqalignment & Qt::AlignTop )
+ if ( tqalignment & TQt::AlignTop )
pos = 0;
- if ( tqalignment & Qt::AlignLeft ) {
- if ( tqalignment & Qt::AlignBottom )
+ if ( tqalignment & TQt::AlignLeft ) {
+ if ( tqalignment & TQt::AlignBottom )
pos = mLeftColumnSummaries.count();
mLeftColumn->insertWidget( pos, widget );
mLeftColumnSummaries.insert( mLeftColumnSummaries.at( pos ), widgetName( widget ) );
} else {
- if ( tqalignment & Qt::AlignBottom )
+ if ( tqalignment & TQt::AlignBottom )
pos = mRightColumnSummaries.count();
mRightColumn->insertWidget( pos, widget );
@@ -288,7 +288,7 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in
int targetPos = mLeftColumn->findWidget( target );
if ( targetPos != -1 ) {
- if ( tqalignment == Qt::AlignBottom )
+ if ( tqalignment == TQt::AlignBottom )
targetPos++;
mLeftColumn->insertWidget( targetPos, widget );
@@ -296,7 +296,7 @@ void SummaryViewPart::summaryWidgetMoved( TQWidget *target, TQWidget *widget, in
} else {
targetPos = mRightColumn->findWidget( target );
- if ( tqalignment == Qt::AlignBottom )
+ if ( tqalignment == TQt::AlignBottom )
targetPos++;
mRightColumn->insertWidget( targetPos, widget );
@@ -428,7 +428,7 @@ TQString SummaryViewPart::widgetName( TQWidget *widget ) const
return it.key();
}
- return TQString::null;
+ return TQString();
}
#include "summaryview_part.moc"
diff --git a/kontact/plugins/summary/summaryview_part.h b/kontact/plugins/summary/summaryview_part.h
index 38e68b153..b04b944a0 100644
--- a/kontact/plugins/summary/summaryview_part.h
+++ b/kontact/plugins/summary/summaryview_part.h
@@ -52,11 +52,12 @@ class KCMultiDialog;
class SummaryViewPart : public KParts::ReadOnlyPart
{
Q_OBJECT
+ TQ_OBJECT
public:
SummaryViewPart( Kontact::Core *core, const char *widgetName,
const KAboutData *aboutData,
- TQObject *parent = 0, const char *name = 0 );
+ TQObject *tqparent = 0, const char *name = 0 );
~SummaryViewPart();
public slots:
diff --git a/kontact/plugins/summary/summaryview_plugin.h b/kontact/plugins/summary/summaryview_plugin.h
index 82e3db96b..44d7c6d8c 100644
--- a/kontact/plugins/summary/summaryview_plugin.h
+++ b/kontact/plugins/summary/summaryview_plugin.h
@@ -35,6 +35,7 @@ class SummaryViewPart;
class SummaryView : public Kontact::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
SummaryView( Kontact::Core *core, const char *name, const TQStringList& );