summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/knotes
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/knotes
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/knotes')
-rw-r--r--kontact/plugins/knotes/knotes_part.cpp10
-rw-r--r--kontact/plugins/knotes/knotes_part.h9
-rw-r--r--kontact/plugins/knotes/knotes_part_p.h17
-rw-r--r--kontact/plugins/knotes/knotes_plugin.h1
-rw-r--r--kontact/plugins/knotes/knotetip.cpp16
-rw-r--r--kontact/plugins/knotes/knotetip.h10
-rw-r--r--kontact/plugins/knotes/summarywidget.cpp12
-rw-r--r--kontact/plugins/knotes/summarywidget.h7
8 files changed, 43 insertions, 39 deletions
diff --git a/kontact/plugins/knotes/knotes_part.cpp b/kontact/plugins/knotes/knotes_part.cpp
index ef70e8f56..a7864c423 100644
--- a/kontact/plugins/knotes/knotes_part.cpp
+++ b/kontact/plugins/knotes/knotes_part.cpp
@@ -38,8 +38,8 @@
#include "knotetip.h"
-KNotesPart::KNotesPart( TQObject *parent, const char *name )
- : DCOPObject( "KNotesIface" ), KParts::ReadOnlyPart( parent, name ),
+KNotesPart::KNotesPart( TQObject *tqparent, const char *name )
+ : DCOPObject( "KNotesIface" ), KParts::ReadOnlyPart( tqparent, name ),
mNotesView( new KNotesIconView() ),
mNoteTip( new KNoteTip( mNotesView ) ),
mNoteEditDlg( 0 ),
@@ -233,7 +233,7 @@ TQString KNotesPart::name( const TQString& id ) const
if ( note )
return note->text();
else
- return TQString::null;
+ return TQString();
}
TQString KNotesPart::text( const TQString& id ) const
@@ -242,7 +242,7 @@ TQString KNotesPart::text( const TQString& id ) const
if ( note )
return note->journal()->description();
else
- return TQString::null;
+ return TQString();
}
void KNotesPart::setName( const TQString& id, const TQString& newName )
@@ -328,7 +328,7 @@ void KNotesPart::popupRMB( TQIconViewItem *item, const TQPoint& pos )
void KNotesPart::slotOnItem( TQIconViewItem *i )
{
- // TODO: disable (i.e. setNote( TQString::null )) when mouse button pressed
+ // TODO: disable (i.e. setNote( TQString() )) when mouse button pressed
KNotesIconViewItem *item = static_cast<KNotesIconViewItem *>( i );
mNoteTip->setNote( item );
diff --git a/kontact/plugins/knotes/knotes_part.h b/kontact/plugins/knotes/knotes_part.h
index 764bb4849..9bc4e8472 100644
--- a/kontact/plugins/knotes/knotes_part.h
+++ b/kontact/plugins/knotes/knotes_part.h
@@ -47,17 +47,18 @@ class Journal;
class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
{
Q_OBJECT
+ TQ_OBJECT
public:
- KNotesPart( TQObject *parent = 0, const char *name = 0 );
+ KNotesPart( TQObject *tqparent = 0, const char *name = 0 );
~KNotesPart();
bool openFile();
public slots:
- TQString newNote( const TQString& name = TQString::null,
- const TQString& text = TQString::null );
- TQString newNoteFromClipboard( const TQString& name = TQString::null );
+ TQString newNote( const TQString& name = TQString(),
+ const TQString& text = TQString() );
+ TQString newNoteFromClipboard( const TQString& name = TQString() );
public:
void killNote( const TQString& id );
diff --git a/kontact/plugins/knotes/knotes_part_p.h b/kontact/plugins/knotes/knotes_part_p.h
index 2c96235f5..7665426c6 100644
--- a/kontact/plugins/knotes/knotes_part_p.h
+++ b/kontact/plugins/knotes/knotes_part_p.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -60,8 +60,8 @@
class KNotesIconViewItem : public KIconViewItem
{
public:
- KNotesIconViewItem( KIconView *parent, KCal::Journal *journal )
- : KIconViewItem( parent ),
+ KNotesIconViewItem( KIconView *tqparent, KCal::Journal *journal )
+ : KIconViewItem( tqparent ),
mJournal( journal )
{
setRenameEnabled( true );
@@ -115,11 +115,12 @@ class KNotesIconView : public KIconView
class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- KNoteEditDlg( TQWidget *parent = 0, const char *name = 0 )
+ KNoteEditDlg( TQWidget *tqparent = 0, const char *name = 0 )
: KDialogBase( Plain, i18n( "Edit Note" ), Ok | Cancel, Ok,
- parent, name, true, true )
+ tqparent, name, true, true )
{
// this dialog is modal to prevent one from editing the same note twice in two
// different windows
@@ -136,7 +137,7 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
label->setText( i18n( "Name:" ) );
hbl->addWidget( label,0 );
mTitleEdit= new KLineEdit( page, "name" );
- hbl->addWidget( mTitleEdit, 1,Qt::AlignVCenter );
+ hbl->addWidget( mTitleEdit, 1,TQt::AlignVCenter );
mNoteEdit = new KNoteEdit( actionCollection(), page );
mNoteEdit->setTextFormat( RichText );
diff --git a/kontact/plugins/knotes/knotes_plugin.h b/kontact/plugins/knotes/knotes_plugin.h
index 65e6450df..680eb7f5f 100644
--- a/kontact/plugins/knotes/knotes_plugin.h
+++ b/kontact/plugins/knotes/knotes_plugin.h
@@ -32,6 +32,7 @@ class SummaryWidget;
class KNotesPlugin : public Kontact::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
KNotesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
diff --git a/kontact/plugins/knotes/knotetip.cpp b/kontact/plugins/knotes/knotetip.cpp
index 3ba9a9ab3..afa21fb40 100644
--- a/kontact/plugins/knotes/knotetip.cpp
+++ b/kontact/plugins/knotes/knotetip.cpp
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -40,11 +40,11 @@
#include "knotes_part_p.h"
-KNoteTip::KNoteTip( KIconView *parent )
+KNoteTip::KNoteTip( KIconView *tqparent )
: TQFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop ),
mFilter( false ),
- mView( parent ),
+ mView( tqparent ),
mNoteIVI( 0 ),
mPreview( new TQTextEdit( this ) )
{
@@ -83,9 +83,9 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
} else {
KCal::Journal *journal = item->journal();
if ( journal->customProperty( "KNotes", "RichText" ) == "true" )
- mPreview->setTextFormat( Qt::RichText );
+ mPreview->setTextFormat( TQt::RichText );
else
- mPreview->setTextFormat( Qt::PlainText );
+ mPreview->setTextFormat( TQt::PlainText );
TQColor fg( journal->customProperty( "KNotes", "FgColor" ) );
TQColor bg( journal->customProperty( "KNotes", "BgColor" ) );
@@ -101,7 +101,7 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
w -= 20;
TQRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
- resize( w, QMIN( h, desk.height() / 2 - 20 ) );
+ resize( w, TQMIN( h, desk.height() / 2 - 20 ) );
hide();
killTimers();
diff --git a/kontact/plugins/knotes/knotetip.h b/kontact/plugins/knotes/knotetip.h
index c19244fa8..ca342fa43 100644
--- a/kontact/plugins/knotes/knotetip.h
+++ b/kontact/plugins/knotes/knotetip.h
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -38,10 +38,10 @@ class TQTextEdit;
class KIconView;
class KNotesIconViewItem;
-class KNoteTip : public QFrame
+class KNoteTip : public TQFrame
{
public:
- KNoteTip( KIconView *parent );
+ KNoteTip( KIconView *tqparent );
~KNoteTip();
void setNote( KNotesIconViewItem *item );
diff --git a/kontact/plugins/knotes/summarywidget.cpp b/kontact/plugins/knotes/summarywidget.cpp
index b714ff19e..611425b9d 100644
--- a/kontact/plugins/knotes/summarywidget.cpp
+++ b/kontact/plugins/knotes/summarywidget.cpp
@@ -17,8 +17,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 <tqobject.h>
@@ -45,8 +45,8 @@
#include "summarywidget.h"
KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
- TQWidget *parent, const char *name )
- : Kontact::Summary( parent, name ), mLayout( 0 ), mPlugin( plugin )
+ TQWidget *tqparent, const char *name )
+ : Kontact::Summary( tqparent, name ), mLayout( 0 ), mPlugin( plugin )
{
TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
@@ -103,7 +103,7 @@ void KNotesSummaryWidget::updateView()
KURLLabel *urlLabel = new KURLLabel( (*it)->uid(), newtext, this );
urlLabel->installEventFilter( this );
urlLabel->setTextFormat(RichText);
- urlLabel->tqsetAlignment( urlLabel->tqalignment() | Qt::WordBreak );
+ urlLabel->tqsetAlignment( urlLabel->tqalignment() | TQt::WordBreak );
mLayout->addWidget( urlLabel, counter, 1 );
mLabels.append( urlLabel );
@@ -142,7 +142,7 @@ bool KNotesSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
if ( e->type() == TQEvent::Enter )
emit message( i18n( "Read Note: \"%1\"" ).arg( label->text() ) );
if ( e->type() == TQEvent::Leave )
- emit message( TQString::null );
+ emit message( TQString() );
}
return Kontact::Summary::eventFilter( obj, e );
diff --git a/kontact/plugins/knotes/summarywidget.h b/kontact/plugins/knotes/summarywidget.h
index cc71f4727..97ccd0940 100644
--- a/kontact/plugins/knotes/summarywidget.h
+++ b/kontact/plugins/knotes/summarywidget.h
@@ -17,8 +17,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 SUMMARYWIDGET_H
@@ -43,9 +43,10 @@ namespace Kontact {
class KNotesSummaryWidget : public Kontact::Summary
{
Q_OBJECT
+ TQ_OBJECT
public:
- KNotesSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name = 0 );
+ KNotesSummaryWidget( Kontact::Plugin *plugin, TQWidget *tqparent, const char *name = 0 );
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }