summaryrefslogtreecommitdiffstats
path: root/kontact/src
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/src
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/src')
-rw-r--r--kontact/src/aboutdialog.cpp8
-rw-r--r--kontact/src/aboutdialog.h5
-rw-r--r--kontact/src/iconsidepane.cpp18
-rw-r--r--kontact/src/iconsidepane.h16
-rw-r--r--kontact/src/kcmkontact.cpp22
-rw-r--r--kontact/src/kcmkontact.h10
-rw-r--r--kontact/src/mainwindow.cpp24
-rw-r--r--kontact/src/mainwindow.h5
-rw-r--r--kontact/src/profiledialog.cpp6
-rw-r--r--kontact/src/profiledialog.h7
-rw-r--r--kontact/src/profilemanager.cpp6
-rw-r--r--kontact/src/profilemanager.h9
-rw-r--r--kontact/src/sidepanebase.cpp4
-rw-r--r--kontact/src/sidepanebase.h5
14 files changed, 77 insertions, 68 deletions
diff --git a/kontact/src/aboutdialog.cpp b/kontact/src/aboutdialog.cpp
index e671ddeb1..e7fef654a 100644
--- a/kontact/src/aboutdialog.cpp
+++ b/kontact/src/aboutdialog.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 "aboutdialog.h"
@@ -68,7 +68,7 @@ void AboutDialog::addAboutData( const TQString &title, const TQString &icon,
TQPixmap pixmap = KGlobal::iconLoader()->loadIcon( icon,
KIcon::Desktop, 48 );
- TQFrame *topFrame = addPage( title, TQString::null, pixmap );
+ TQFrame *topFrame = addPage( title, TQString(), pixmap );
TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
@@ -165,7 +165,7 @@ void AboutDialog::addLicenseText( const KAboutData *about )
TQString title = i18n( "%1 License" ).arg( about->programName() );
- TQFrame *topFrame = addPage( title, TQString::null, pixmap );
+ TQFrame *topFrame = addPage( title, TQString(), pixmap );
TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
KTextBrowser *textBrowser = new KTextBrowser( topFrame );
diff --git a/kontact/src/aboutdialog.h b/kontact/src/aboutdialog.h
index ab8ab1a82..c5faa503f 100644
--- a/kontact/src/aboutdialog.h
+++ b/kontact/src/aboutdialog.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 KONTACT_ABOUTDIALOG_H
#define KONTACT_ABOUTDIALOG_H
@@ -34,6 +34,7 @@ class Plugin;
class AboutDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
AboutDialog( Kontact::Core *core, const char *name = 0 );
diff --git a/kontact/src/iconsidepane.cpp b/kontact/src/iconsidepane.cpp
index b54454e14..7e4d027ed 100644
--- a/kontact/src/iconsidepane.cpp
+++ b/kontact/src/iconsidepane.cpp
@@ -92,8 +92,8 @@ class PluginProxy
using namespace Kontact;
-EntryItem::EntryItem( Navigator *parent, Kontact::Plugin *plugin )
- : TQListBoxItem( parent ),
+EntryItem::EntryItem( Navigator *tqparent, Kontact::Plugin *plugin )
+ : TQListBoxItem( tqparent ),
mPlugin( plugin ),
mHasHover( false ),
mPaintActive( false )
@@ -137,7 +137,7 @@ int EntryItem::width( const TQListBox *listbox ) const
if ( navigator()->viewMode() == SmallIcons )
w += listbox->fontMetrics().width( text() );
else
- w = QMAX( w, listbox->fontMetrics().width( text() ) );
+ w = TQMAX( w, listbox->fontMetrics().width( text() ) );
}
return w + ( KDialog::marginHint() * 2 );
}
@@ -149,7 +149,7 @@ int EntryItem::height( const TQListBox *listbox ) const
h = (int)navigator()->viewMode() + 4;
if ( navigator()->showText() ) {
if ( navigator()->viewMode() == SmallIcons || !navigator()->showIcons() )
- h = QMAX( h, listbox->fontMetrics().lineSpacing() ) + KDialog::spacingHint() * 2;
+ h = TQMAX( h, listbox->fontMetrics().lineSpacing() ) + KDialog::spacingHint() * 2;
else
h = (int)navigator()->viewMode() + listbox->fontMetrics().lineSpacing() + 4;
}
@@ -250,8 +250,8 @@ void EntryItem::setPaintActive( bool paintActive )
mPaintActive = paintActive;
}
-Navigator::Navigator( IconSidePane *parent, const char *name )
- : KListBox( parent, name ), mSidePane( parent ),
+Navigator::Navigator( IconSidePane *tqparent, const char *name )
+ : KListBox( tqparent, name ), mSidePane( tqparent ),
mShowIcons( true ), mShowText( true )
{
mMouseOn = 0;
@@ -399,7 +399,7 @@ void Navigator::resizeEvent( TQResizeEvent *event )
void Navigator::enterEvent( TQEvent *event )
{
- // work around Qt behaviour: onItem is not emmitted in enterEvent()
+ // work around TQt behaviour: onItem is not emmitted in enterEvent()
KListBox::enterEvent( event );
emit onItem( itemAt( mapFromGlobal( TQCursor::pos() ) ) );
}
@@ -535,8 +535,8 @@ void Navigator::slotMouseOff()
slotMouseOn( 0 );
}
-IconSidePane::IconSidePane( Core *core, TQWidget *parent, const char *name )
- : SidePaneBase( core, parent, name )
+IconSidePane::IconSidePane( Core *core, TQWidget *tqparent, const char *name )
+ : SidePaneBase( core, tqparent, name )
{
mNavigator = new Navigator( this );
connect( mNavigator, TQT_SIGNAL( pluginActivated( Kontact::Plugin* ) ),
diff --git a/kontact/src/iconsidepane.h b/kontact/src/iconsidepane.h
index a5aad36ac..d7cc532da 100644
--- a/kontact/src/iconsidepane.h
+++ b/kontact/src/iconsidepane.h
@@ -48,7 +48,7 @@ enum IconViewMode { LargeIcons = 48, NormalIcons = 32, SmallIcons = 22, ShowText
A TQListBoxPixmap Square Box with an optional icon and a text
underneath.
*/
-class EntryItem : public QListBoxItem
+class EntryItem : public TQListBoxItem
{
public:
EntryItem( Navigator *, Kontact::Plugin * );
@@ -86,13 +86,13 @@ class EntryItem : public QListBoxItem
/**
* Tooltip that changes text depending on the item it is above.
- * Compliments of "Practical Qt" by Dalheimer, Petersen et al.
+ * Compliments of "Practical TQt" by Dalheimer, Petersen et al.
*/
-class EntryItemToolTip : public QToolTip
+class EntryItemToolTip : public TQToolTip
{
public:
- EntryItemToolTip( TQListBox* parent )
- : TQToolTip( parent->viewport() ), mListBox( parent )
+ EntryItemToolTip( TQListBox* tqparent )
+ : TQToolTip( tqparent->viewport() ), mListBox( tqparent )
{}
protected:
void maybeTip( const TQPoint& p ) {
@@ -118,8 +118,9 @@ class EntryItemToolTip : public QToolTip
class Navigator : public KListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- Navigator( IconSidePane *parent = 0, const char *name = 0 );
+ Navigator( IconSidePane *tqparent = 0, const char *name = 0 );
virtual void setSelected( TQListBoxItem *, bool );
@@ -173,8 +174,9 @@ class Navigator : public KListBox
class IconSidePane : public SidePaneBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- IconSidePane( Core *core, TQWidget *parent, const char *name = 0 );
+ IconSidePane( Core *core, TQWidget *tqparent, const char *name = 0 );
~IconSidePane();
virtual void indicateForegrunding( Kontact::Plugin* );
diff --git a/kontact/src/kcmkontact.cpp b/kontact/src/kcmkontact.cpp
index 2162ffa0e..2e7c61f83 100644
--- a/kontact/src/kcmkontact.cpp
+++ b/kontact/src/kcmkontact.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 "kcmkontact.h"
@@ -42,16 +42,16 @@
extern "C"
{
- KDE_EXPORT KCModule *create_kontactconfig( TQWidget *parent, const char * ) {
- return new KcmKontact( parent, "kcmkontact" );
+ KDE_EXPORT KCModule *create_kontactconfig( TQWidget *tqparent, const char * ) {
+ return new KcmKontact( tqparent, "kcmkontact" );
}
}
-class PluginItem : public QListViewItem
+class PluginItem : public TQListViewItem
{
public:
- PluginItem( TQListView *parent, const KService::Ptr &ptr )
- : TQListViewItem( parent, ptr->name(), ptr->comment(), ptr->library() ),
+ PluginItem( TQListView *tqparent, const KService::Ptr &ptr )
+ : TQListViewItem( tqparent, ptr->name(), ptr->comment(), ptr->library() ),
mPtr( ptr )
{
}
@@ -65,8 +65,8 @@ class PluginItem : public QListViewItem
KService::Ptr mPtr;
};
-KcmKontact::KcmKontact( TQWidget *parent, const char *name )
- : KPrefsModule( Kontact::Prefs::self(), parent, name )
+KcmKontact::KcmKontact( TQWidget *tqparent, const char *name )
+ : KPrefsModule( Kontact::Prefs::self(), tqparent, name )
{
TQBoxLayout *topLayout = new TQVBoxLayout( this );
TQBoxLayout *pluginStartupLayout = new TQHBoxLayout( topLayout );
@@ -100,10 +100,10 @@ const KAboutData* KcmKontact::aboutData() const
}
-PluginSelection::PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *parent )
+PluginSelection::PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *tqparent )
{
mItem = item;
- mPluginCombo = new TQComboBox( parent );
+ mPluginCombo = new TQComboBox( tqparent );
connect( mPluginCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) );
}
diff --git a/kontact/src/kcmkontact.h b/kontact/src/kcmkontact.h
index ed926db4e..1d3f04a6f 100644
--- a/kontact/src/kcmkontact.h
+++ b/kontact/src/kcmkontact.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 KCMKONTACT_H
@@ -39,9 +39,10 @@ class KListView;
class KcmKontact : public KPrefsModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KcmKontact( TQWidget *parent = 0, const char *name = 0 );
+ KcmKontact( TQWidget *tqparent = 0, const char *name = 0 );
virtual const KAboutData* aboutData() const;
};
@@ -49,9 +50,10 @@ class KcmKontact : public KPrefsModule
class PluginSelection : public KPrefsWid
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *parent );
+ PluginSelection( KConfigSkeleton::ItemString *item, TQWidget *tqparent );
~PluginSelection();
void readConfig();
diff --git a/kontact/src/mainwindow.cpp b/kontact/src/mainwindow.cpp
index ab6134669..0e56f918a 100644
--- a/kontact/src/mainwindow.cpp
+++ b/kontact/src/mainwindow.cpp
@@ -87,8 +87,8 @@ using namespace Kontact;
class SettingsDialogWrapper : public KSettings::Dialog
{
public:
- SettingsDialogWrapper( ContentInListView content, TQWidget * parent = 0 )
- : KSettings::Dialog( content, parent, 0 )
+ SettingsDialogWrapper( ContentInListView content, TQWidget * tqparent = 0 )
+ : KSettings::Dialog( content, tqparent, 0 )
{
}
@@ -185,9 +185,9 @@ void MainWindow::initObject()
showTip( false );
// done initializing
- slotShowStatusMsg( TQString::null );
+ slotShowStatusMsg( TQString() );
- connect( KPIM::BroadcasStatus::instance(), TQT_SIGNAL( statusMsg( const TQString& ) ),
+ connect( KPIM::BroadcastqStatus::instance(), TQT_SIGNAL( statusMsg( const TQString& ) ),
this, TQT_SLOT( slotShowStatusMsg( const TQString& ) ) );
// launch commandline specified module if any
@@ -787,7 +787,7 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
return;
}
- KApplication::setOverrideCursor( TQCursor( Qt::WaitCursor ) );
+ KApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
KParts::Part *part = plugin->part();
@@ -805,12 +805,12 @@ void MainWindow::selectPlugin( Kontact::Plugin *plugin )
TQWidget *tqfocusWidget = kapp->tqfocusWidget();
if ( mCurrentPlugin && tqfocusWidget ) {
// save the focus widget only when it belongs to the activated part
- TQWidget *parent = tqfocusWidget->tqparentWidget();
- while ( parent ) {
- if ( parent == mCurrentPlugin->part()->widget() )
+ TQWidget *tqparent = tqfocusWidget->tqparentWidget();
+ while ( tqparent ) {
+ if ( tqparent == mCurrentPlugin->part()->widget() )
mFocusWidgets.insert( mCurrentPlugin->identifier(), TQGuardedPtr<TQWidget>( tqfocusWidget ) );
- parent = parent->tqparentWidget();
+ tqparent = tqparent->tqparentWidget();
}
}
@@ -1027,7 +1027,7 @@ void MainWindow::updateConfig()
void MainWindow::showAboutDialog()
{
- KApplication::setOverrideCursor( TQCursor( Qt::WaitCursor ) );
+ KApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
if ( !mAboutDialog )
mAboutDialog = new AboutDialog( this );
@@ -1084,7 +1084,7 @@ void MainWindow::slotOpenUrl( const KURL &url )
if ( !url.query().isEmpty() ) {
app = url.query().mid( 1 );
}
- kapp->invokeHelp( TQString::null, app );
+ kapp->invokeHelp( TQString(), app );
}
} else {
new KRun( url, this );
@@ -1101,7 +1101,7 @@ void MainWindow::readProperties( KConfig *config )
for ( ; it != end; ++it ) {
Plugin *plugin = *it;
if ( !plugin->isRunningStandalone() ) {
- TQStringList::ConstIterator activePlugin = activePlugins.find( plugin->identifier() );
+ TQStringList::ConstIterator activePlugin = activePlugins.tqfind( plugin->identifier() );
if ( activePlugin != activePlugins.end() ) {
plugin->readProperties( config );
}
diff --git a/kontact/src/mainwindow.h b/kontact/src/mainwindow.h
index 5d5945b6b..6732ed27f 100644
--- a/kontact/src/mainwindow.h
+++ b/kontact/src/mainwindow.h
@@ -67,6 +67,7 @@ typedef TQPtrList<KAction> ActionPluginList;
class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public KontactIface
{
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow();
@@ -74,8 +75,8 @@ class MainWindow : public Kontact::Core, public KDCOPServiceStarter, public Kont
// KDCOPServiceStarter interface
virtual int startServiceFor( const TQString& serviceType,
- const TQString& constraint = TQString::null,
- const TQString& preferences = TQString::null,
+ const TQString& constraint = TQString(),
+ const TQString& preferences = TQString(),
TQString *error = 0, TQCString* dcopService = 0,
int flags = 0 );
diff --git a/kontact/src/profiledialog.cpp b/kontact/src/profiledialog.cpp
index 5d440e5f7..cb28d1194 100644
--- a/kontact/src/profiledialog.cpp
+++ b/kontact/src/profiledialog.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 "profiledialog.h"
@@ -34,7 +34,7 @@
#include <tqpushbutton.h>
#include <tqstring.h>
-Kontact::ProfileDialog::ProfileDialog( TQWidget* parent, WFlags flags ) : KDialogBase( parent, /*name=*/0, /*modal=*/true, /*caption=*/TQString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
+Kontact::ProfileDialog::ProfileDialog( TQWidget* tqparent, WFlags flags ) : KDialogBase( tqparent, /*name=*/0, /*modal=*/true, /*caption=*/TQString(), /*buttonMask=*/KDialogBase::Ok|KDialogBase::Close )
{
setWFlags( flags );
setCaption( i18n("Configure Profiles") );
diff --git a/kontact/src/profiledialog.h b/kontact/src/profiledialog.h
index b20a86985..fc9559b5c 100644
--- a/kontact/src/profiledialog.h
+++ b/kontact/src/profiledialog.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 KONTACT_PROFILEDIALOG_H
@@ -40,9 +40,10 @@ namespace Kontact {
class ProfileDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- explicit ProfileDialog( TQWidget* parent = 0, WFlags f = 0 );
+ explicit ProfileDialog( TQWidget* tqparent = 0, WFlags f = 0 );
private:
enum ListColumn {
diff --git a/kontact/src/profilemanager.cpp b/kontact/src/profilemanager.cpp
index 804f65e31..deed6f37a 100644
--- a/kontact/src/profilemanager.cpp
+++ b/kontact/src/profilemanager.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 "profilemanager.h"
@@ -131,7 +131,7 @@ Kontact::ProfileManager* Kontact::ProfileManager::self()
return m_self;
}
-Kontact::ProfileManager::ProfileManager( TQObject* parent ) : TQObject( parent )
+Kontact::ProfileManager::ProfileManager( TQObject* tqparent ) : TQObject( tqparent )
{
}
diff --git a/kontact/src/profilemanager.h b/kontact/src/profilemanager.h
index 0b335b950..b7abdcb3f 100644
--- a/kontact/src/profilemanager.h
+++ b/kontact/src/profilemanager.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 KONTACT_PROFILEMANAGER_H
@@ -86,9 +86,10 @@ private:
TQString m_originalLocation;
};
-class ProfileManager : public QObject
+class ProfileManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ImportError {
SuccessfulImport=0,
@@ -145,7 +146,7 @@ private:
static Kontact::Profile readFromConfiguration( const TQString& configFile, bool isLocal );
- explicit ProfileManager( TQObject* parent = 0 );
+ explicit ProfileManager( TQObject* tqparent = 0 );
void readConfig();
diff --git a/kontact/src/sidepanebase.cpp b/kontact/src/sidepanebase.cpp
index 92a3ce510..486e273ba 100644
--- a/kontact/src/sidepanebase.cpp
+++ b/kontact/src/sidepanebase.cpp
@@ -25,8 +25,8 @@
using namespace Kontact;
-SidePaneBase::SidePaneBase( Core *core, TQWidget *parent, const char *name )
- : TQVBox( parent, name ), mCore( core )
+SidePaneBase::SidePaneBase( Core *core, TQWidget *tqparent, const char *name )
+ : TQVBox( tqparent, name ), mCore( core )
{
}
diff --git a/kontact/src/sidepanebase.h b/kontact/src/sidepanebase.h
index 0b4a7a542..77acc66f7 100644
--- a/kontact/src/sidepanebase.h
+++ b/kontact/src/sidepanebase.h
@@ -31,11 +31,12 @@ namespace Kontact
class Core;
class Plugin;
-class SidePaneBase : public QVBox
+class SidePaneBase : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- SidePaneBase( Core *core, TQWidget *parent, const char *name = 0 );
+ SidePaneBase( Core *core, TQWidget *tqparent, const char *name = 0 );
virtual ~SidePaneBase();
signals: