summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/knotes
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/knotes')
-rw-r--r--kontact/plugins/knotes/knotes_part.cpp124
-rw-r--r--kontact/plugins/knotes/knotes_part.h36
-rw-r--r--kontact/plugins/knotes/knotes_part_p.h34
-rw-r--r--kontact/plugins/knotes/knotes_plugin.cpp10
-rw-r--r--kontact/plugins/knotes/knotes_plugin.h4
-rw-r--r--kontact/plugins/knotes/knotetip.cpp84
-rw-r--r--kontact/plugins/knotes/knotetip.h12
-rw-r--r--kontact/plugins/knotes/summarywidget.cpp54
-rw-r--r--kontact/plugins/knotes/summarywidget.h16
9 files changed, 187 insertions, 187 deletions
diff --git a/kontact/plugins/knotes/knotes_part.cpp b/kontact/plugins/knotes/knotes_part.cpp
index 5bd160d1d..4702eb2d2 100644
--- a/kontact/plugins/knotes/knotes_part.cpp
+++ b/kontact/plugins/knotes/knotes_part.cpp
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -38,7 +38,7 @@
#include "knotetip.h"
-KNotesPart::KNotesPart( QObject *parent, const char *name )
+KNotesPart::KNotesPart( TQObject *parent, const char *name )
: DCOPObject( "KNotesIface" ), KParts::ReadOnlyPart( parent, name ),
mNotesView( new KNotesIconView() ),
mNoteTip( new KNoteTip( mNotesView ) ),
@@ -50,38 +50,38 @@ KNotesPart::KNotesPart( QObject *parent, const char *name )
setInstance( new KInstance( "knotes" ) );
// create the actions
- new KAction( i18n( "&New" ), "knotes", CTRL+Key_N, this, SLOT( newNote() ),
+ new KAction( i18n( "&New" ), "knotes", CTRL+Key_N, this, TQT_SLOT( newNote() ),
actionCollection(), "file_new" );
- new KAction( i18n( "Rename..." ), "text", this, SLOT( renameNote() ),
+ new KAction( i18n( "Rename..." ), "text", this, TQT_SLOT( renameNote() ),
actionCollection(), "edit_rename" );
- new KAction( i18n( "Delete" ), "editdelete", Key_Delete, this, SLOT( killSelectedNotes() ),
+ new KAction( i18n( "Delete" ), "editdelete", Key_Delete, this, TQT_SLOT( killSelectedNotes() ),
actionCollection(), "edit_delete" );
- new KAction( i18n( "Print Selected Notes..." ), "print", CTRL+Key_P, this, SLOT( printSelectedNotes() ),
+ new KAction( i18n( "Print Selected Notes..." ), "print", CTRL+Key_P, this, TQT_SLOT( printSelectedNotes() ),
actionCollection(), "print_note" );
// TODO icons: s/editdelete/knotes_delete/ or the other way round in knotes
// set the view up
- mNotesView->setSelectionMode( QIconView::Extended );
+ mNotesView->setSelectionMode( TQIconView::Extended );
mNotesView->setItemsMovable( false );
- mNotesView->setResizeMode( QIconView::Adjust );
+ mNotesView->setResizeMode( TQIconView::Adjust );
mNotesView->setAutoArrange( true );
mNotesView->setSorting( true );
- connect( mNotesView, SIGNAL( executed( QIconViewItem* ) ),
- this, SLOT( editNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( returnPressed( QIconViewItem* ) ),
- this, SLOT( editNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( itemRenamed( QIconViewItem* ) ),
- this, SLOT( renamedNote( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ),
- this, SLOT( popupRMB( QIconViewItem*, const QPoint& ) ) );
- connect( mNotesView, SIGNAL( onItem( QIconViewItem* ) ),
- this, SLOT( slotOnItem( QIconViewItem* ) ) );
- connect( mNotesView, SIGNAL( onViewport() ),
- this, SLOT( slotOnViewport() ) );
- connect( mNotesView, SIGNAL( currentChanged( QIconViewItem* ) ),
- this, SLOT( slotOnCurrentChanged( QIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ this, TQT_SLOT( editNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( returnPressed( TQIconViewItem* ) ),
+ this, TQT_SLOT( editNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( itemRenamed( TQIconViewItem* ) ),
+ this, TQT_SLOT( renamedNote( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( popupRMB( TQIconViewItem*, const TQPoint& ) ) );
+ connect( mNotesView, TQT_SIGNAL( onItem( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotOnItem( TQIconViewItem* ) ) );
+ connect( mNotesView, TQT_SIGNAL( onViewport() ),
+ this, TQT_SLOT( slotOnViewport() ) );
+ connect( mNotesView, TQT_SIGNAL( currentChanged( TQIconViewItem* ) ),
+ this, TQT_SLOT( slotOnCurrentChanged( TQIconViewItem* ) ) );
slotOnCurrentChanged( 0 );
@@ -91,10 +91,10 @@ KNotesPart::KNotesPart( QObject *parent, const char *name )
setXMLFile( "knotes_part.rc" );
// connect the resource manager
- connect( mManager, SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
- this, SLOT( createNote( KCal::Journal* ) ) );
- connect( mManager, SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
- this, SLOT( killNote( KCal::Journal* ) ) );
+ connect( mManager, TQT_SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( createNote( KCal::Journal* ) ) );
+ connect( mManager, TQT_SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( killNote( KCal::Journal* ) ) );
// read the notes
mManager->load();
@@ -111,9 +111,9 @@ KNotesPart::~KNotesPart()
void KNotesPart::printSelectedNotes()
{
- QValueList<KCal::Journal*> journals;
+ TQValueList<KCal::Journal*> journals;
- for ( QIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() ) {
journals.append( static_cast<KNotesIconViewItem *>( it )->journal() );
}
@@ -128,9 +128,9 @@ void KNotesPart::printSelectedNotes()
printer.printNotes(journals );
#if 0
- QString content;
+ TQString content;
if ( m_editor->textFormat() == PlainText )
- content = QStyleSheet::convertFromPlainText( m_editor->text() );
+ content = TQStyleSheet::convertFromPlainText( m_editor->text() );
else
content = m_editor->text();
@@ -152,7 +152,7 @@ bool KNotesPart::openFile()
// public KNotes DCOP interface implementation
-QString KNotesPart::newNote( const QString& name, const QString& text )
+TQString KNotesPart::newNote( const TQString& name, const TQString& text )
{
// create the new note
KCal::Journal *journal = new KCal::Journal();
@@ -161,7 +161,7 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
if ( !name.isEmpty() )
journal->setSummary( name );
else
- journal->setSummary( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ journal->setSummary( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
// the body of the note
journal->setDescription( text );
@@ -177,7 +177,7 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
mNoteEditDlg->setTitle( journal->summary() );
mNoteEditDlg->setText( journal->description() );
- if ( mNoteEditDlg->exec() == QDialog::Accepted )
+ if ( mNoteEditDlg->exec() == TQDialog::Accepted )
{
journal->setSummary( mNoteEditDlg->title() );
journal->setDescription( mNoteEditDlg->text() );
@@ -199,18 +199,18 @@ QString KNotesPart::newNote( const QString& name, const QString& text )
return journal->uid();
}
-QString KNotesPart::newNoteFromClipboard( const QString& name )
+TQString KNotesPart::newNoteFromClipboard( const TQString& name )
{
- const QString& text = KApplication::clipboard()->text();
+ const TQString& text = KApplication::clipboard()->text();
return newNote( name, text );
}
-void KNotesPart::killNote( const QString& id )
+void KNotesPart::killNote( const TQString& id )
{
killNote( id, false );
}
-void KNotesPart::killNote( const QString& id, bool force )
+void KNotesPart::killNote( const TQString& id, bool force )
{
KNotesIconViewItem *note = mNoteList[ id ];
@@ -227,25 +227,25 @@ void KNotesPart::killNote( const QString& id, bool force )
}
}
-QString KNotesPart::name( const QString& id ) const
+TQString KNotesPart::name( const TQString& id ) const
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note )
return note->text();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesPart::text( const QString& id ) const
+TQString KNotesPart::text( const TQString& id ) const
{
KNotesIconViewItem *note = mNoteList[id];
if ( note )
return note->journal()->description();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesPart::setName( const QString& id, const QString& newName )
+void KNotesPart::setName( const TQString& id, const TQString& newName )
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note ) {
@@ -254,7 +254,7 @@ void KNotesPart::setName( const QString& id, const QString& newName )
}
}
-void KNotesPart::setText( const QString& id, const QString& newText )
+void KNotesPart::setText( const TQString& id, const TQString& newText )
{
KNotesIconViewItem *note = mNoteList[ id ];
if ( note ) {
@@ -263,10 +263,10 @@ void KNotesPart::setText( const QString& id, const QString& newText )
}
}
-QMap<QString, QString> KNotesPart::notes() const
+TQMap<TQString, TQString> KNotesPart::notes() const
{
- QMap<QString, QString> notes;
- QDictIterator<KNotesIconViewItem> it( mNoteList );
+ TQMap<TQString, TQString> notes;
+ TQDictIterator<KNotesIconViewItem> it( mNoteList );
for ( ; it.current(); ++it )
notes.insert( (*it)->journal()->uid(), (*it)->journal()->summary() );
@@ -279,11 +279,11 @@ QMap<QString, QString> KNotesPart::notes() const
void KNotesPart::killSelectedNotes()
{
- QPtrList<KNotesIconViewItem> items;
- QStringList notes;
+ TQPtrList<KNotesIconViewItem> items;
+ TQStringList notes;
KNotesIconViewItem *knivi;
- for ( QIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = mNotesView->firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() ) {
knivi = static_cast<KNotesIconViewItem *>( it );
items.append( knivi );
@@ -301,7 +301,7 @@ void KNotesPart::killSelectedNotes()
KStdGuiItem::del() );
if ( ret == KMessageBox::Continue ) {
- QPtrListIterator<KNotesIconViewItem> kniviIt( items );
+ TQPtrListIterator<KNotesIconViewItem> kniviIt( items );
while ( (knivi = *kniviIt) ) {
++kniviIt;
mManager->deleteNote( knivi->journal() );
@@ -311,14 +311,14 @@ void KNotesPart::killSelectedNotes()
}
}
-void KNotesPart::popupRMB( QIconViewItem *item, const QPoint& pos )
+void KNotesPart::popupRMB( TQIconViewItem *item, const TQPoint& pos )
{
- QPopupMenu *contextMenu = NULL;
+ TQPopupMenu *contextMenu = NULL;
if ( item )
- contextMenu = static_cast<QPopupMenu *>( factory()->container( "note_context", this ) );
+ contextMenu = static_cast<TQPopupMenu *>( factory()->container( "note_context", this ) );
else
- contextMenu = static_cast<QPopupMenu *>( factory()->container( "notepart_context", this ) );
+ contextMenu = static_cast<TQPopupMenu *>( factory()->container( "notepart_context", this ) );
if ( !contextMenu )
return;
@@ -326,9 +326,9 @@ void KNotesPart::popupRMB( QIconViewItem *item, const QPoint& pos )
contextMenu->popup( pos );
}
-void KNotesPart::slotOnItem( QIconViewItem *i )
+void KNotesPart::slotOnItem( TQIconViewItem *i )
{
- // TODO: disable (i.e. setNote( QString::null )) when mouse button pressed
+ // TODO: disable (i.e. setNote( TQString::null )) when mouse button pressed
KNotesIconViewItem *item = static_cast<KNotesIconViewItem *>( i );
mNoteTip->setNote( item );
@@ -346,7 +346,7 @@ void KNotesPart::slotOnViewport()
void KNotesPart::createNote( KCal::Journal *journal )
{
// make sure all fields are existent, initialize them with default values
- QString property = journal->customProperty( "KNotes", "BgColor" );
+ TQString property = journal->customProperty( "KNotes", "BgColor" );
if ( property.isNull() )
journal->setCustomProperty( "KNotes", "BgColor", "#ffff00" );
@@ -366,7 +366,7 @@ void KNotesPart::killNote( KCal::Journal *journal )
mNoteList.remove( journal->uid() );
}
-void KNotesPart::editNote( QIconViewItem *item )
+void KNotesPart::editNote( TQIconViewItem *item )
{
if ( !mNoteEditDlg )
mNoteEditDlg = new KNoteEditDlg( widget() );
@@ -377,7 +377,7 @@ void KNotesPart::editNote( QIconViewItem *item )
mNoteEditDlg->setTitle( journal->summary() );
mNoteEditDlg->setText( journal->description() );
- if ( mNoteEditDlg->exec() == QDialog::Accepted ) {
+ if ( mNoteEditDlg->exec() == TQDialog::Accepted ) {
item->setText( mNoteEditDlg->title() );
journal->setDescription( mNoteEditDlg->text() );
mManager->save();
@@ -389,12 +389,12 @@ void KNotesPart::renameNote()
mNotesView->currentItem()->rename();
}
-void KNotesPart::renamedNote( QIconViewItem* )
+void KNotesPart::renamedNote( TQIconViewItem* )
{
mManager->save();
}
-void KNotesPart::slotOnCurrentChanged( QIconViewItem* )
+void KNotesPart::slotOnCurrentChanged( TQIconViewItem* )
{
KAction *renameAction = actionCollection()->action( "edit_rename" );
KAction *deleteAction = actionCollection()->action( "edit_delete" );
diff --git a/kontact/plugins/knotes/knotes_part.h b/kontact/plugins/knotes/knotes_part.h
index c034d04fb..b737ddf83 100644
--- a/kontact/plugins/knotes/knotes_part.h
+++ b/kontact/plugins/knotes/knotes_part.h
@@ -22,7 +22,7 @@
#ifndef KNOTES_PART_H
#define KNOTES_PART_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kiconview.h>
#include <kglobal.h>
@@ -49,42 +49,42 @@ class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
Q_OBJECT
public:
- KNotesPart( QObject *parent = 0, const char *name = 0 );
+ KNotesPart( TQObject *parent = 0, const char *name = 0 );
~KNotesPart();
bool openFile();
public slots:
- QString newNote( const QString& name = QString::null,
- const QString& text = QString::null );
- QString newNoteFromClipboard( const QString& name = QString::null );
+ TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null );
+ TQString newNoteFromClipboard( const TQString& name = TQString::null );
public:
- void killNote( const QString& id );
- void killNote( const QString& id, bool force );
+ void killNote( const TQString& id );
+ void killNote( const TQString& id, bool force );
- QString name( const QString& id ) const;
- QString text( const QString& id ) const;
+ TQString name( const TQString& id ) const;
+ TQString text( const TQString& id ) const;
- void setName( const QString& id, const QString& newName );
- void setText( const QString& id, const QString& newText );
+ void setName( const TQString& id, const TQString& newName );
+ void setText( const TQString& id, const TQString& newText );
- QMap<QString, QString> notes() const;
+ TQMap<TQString, TQString> notes() const;
private slots:
void createNote( KCal::Journal *journal );
void killNote( KCal::Journal *journal );
- void editNote( QIconViewItem *item );
+ void editNote( TQIconViewItem *item );
void renameNote();
- void renamedNote( QIconViewItem *item );
+ void renamedNote( TQIconViewItem *item );
- void slotOnItem( QIconViewItem *item );
+ void slotOnItem( TQIconViewItem *item );
void slotOnViewport();
- void slotOnCurrentChanged( QIconViewItem *item );
+ void slotOnCurrentChanged( TQIconViewItem *item );
- void popupRMB( QIconViewItem *item, const QPoint& pos );
+ void popupRMB( TQIconViewItem *item, const TQPoint& pos );
void killSelectedNotes();
void printSelectedNotes();
@@ -95,7 +95,7 @@ class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
KNoteEditDlg *mNoteEditDlg;
KNotesResourceManager *mManager;
- QDict<KNotesIconViewItem> mNoteList;
+ TQDict<KNotesIconViewItem> mNoteList;
};
#endif
diff --git a/kontact/plugins/knotes/knotes_part_p.h b/kontact/plugins/knotes/knotes_part_p.h
index 55a0374b6..0bf073f3a 100644
--- a/kontact/plugins/knotes/knotes_part_p.h
+++ b/kontact/plugins/knotes/knotes_part_p.h
@@ -32,8 +32,8 @@
#ifndef KNOTES_PART_P_H
#define KNOTES_PART_P_H
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kactioncollection.h>
#include <klocale.h>
@@ -67,8 +67,8 @@ class KNotesIconViewItem : public KIconViewItem
setRenameEnabled( true );
KIconEffect effect;
- QColor color( journal->customProperty( "KNotes", "BgColor" ) );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "knotes", KIcon::Desktop );
+ TQColor color( journal->customProperty( "KNotes", "BgColor" ) );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "knotes", KIcon::Desktop );
icon = effect.apply( icon, KIconEffect::Colorize, 1, color, false );
setPixmap( icon );
setText( journal->summary() );
@@ -79,7 +79,7 @@ class KNotesIconViewItem : public KIconViewItem
return mJournal;
}
- virtual void setText( const QString& text )
+ virtual void setText( const TQString& text )
{
KIconViewItem::setText( text );
mJournal->setSummary( text );
@@ -93,10 +93,10 @@ class KNotesIconViewItem : public KIconViewItem
class KNotesIconView : public KIconView
{
protected:
- QDragObject* dragObject()
+ TQDragObject* dragObject()
{
- QValueList<KNotesIconViewItem*> selectedItems;
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
+ TQValueList<KNotesIconViewItem*> selectedItems;
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() )
selectedItems.append( static_cast<KNotesIconViewItem *>( it ) );
}
@@ -117,7 +117,7 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
Q_OBJECT
public:
- KNoteEditDlg( QWidget *parent = 0, const char *name = 0 )
+ KNoteEditDlg( TQWidget *parent = 0, const char *name = 0 )
: KDialogBase( Plain, i18n( "Edit Note" ), Ok | Cancel, Ok,
parent, name, true, true )
{
@@ -128,11 +128,11 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
setXMLFile( "knotesui.rc" );
actionCollection()->setWidget( this );
- QWidget *page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout( page );
+ TQWidget *page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout( page );
- QHBoxLayout *hbl = new QHBoxLayout( layout, marginHint() );
- QLabel *label = new QLabel( page);
+ TQHBoxLayout *hbl = new TQHBoxLayout( layout, marginHint() );
+ TQLabel *label = new TQLabel( page);
label->setText( i18n( "Name:" ) );
hbl->addWidget( label,0 );
mTitleEdit= new KLineEdit( page, "name" );
@@ -152,22 +152,22 @@ class KNoteEditDlg : public KDialogBase, virtual public KXMLGUIClient
layout->addWidget( mNoteEdit );
}
- QString text() const
+ TQString text() const
{
return mNoteEdit->text();
}
- void setText( const QString& text )
+ void setText( const TQString& text )
{
mNoteEdit->setText( text );
}
- QString title() const
+ TQString title() const
{
return mTitleEdit->text();
}
- void setTitle( const QString& text )
+ void setTitle( const TQString& text )
{
mTitleEdit->setText( text );
}
diff --git a/kontact/plugins/knotes/knotes_plugin.cpp b/kontact/plugins/knotes/knotes_plugin.cpp
index beaaa6331..1a94fdea3 100644
--- a/kontact/plugins/knotes/knotes_plugin.cpp
+++ b/kontact/plugins/knotes/knotes_plugin.cpp
@@ -38,16 +38,16 @@ K_EXPORT_COMPONENT_FACTORY( libkontact_knotesplugin,
KNotesPluginFactory( "kontact_knotesplugin" ) )
-KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const QStringList & )
+KNotesPlugin::KNotesPlugin( Kontact::Core *core, const char *, const TQStringList & )
: Kontact::Plugin( core, core, "knotes" ),
mAboutData( 0 )
{
setInstance( KNotesPluginFactory::instance() );
insertNewAction( new KAction( i18n( "New Note..." ), "knotes", CTRL+SHIFT+Key_N,
- this, SLOT( slotNewNote() ), actionCollection(), "new_note" ) );
+ this, TQT_SLOT( slotNewNote() ), actionCollection(), "new_note" ) );
insertSyncAction( new KAction( i18n( "Synchronize Notes" ), "reload", 0,
- this, SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) );
+ this, TQT_SLOT( slotSyncNotes() ), actionCollection(), "knotes_sync" ) );
}
KNotesPlugin::~KNotesPlugin()
@@ -59,7 +59,7 @@ KParts::ReadOnlyPart* KNotesPlugin::createPart()
return new KNotesPart( this, "notes" );
}
-Kontact::Summary *KNotesPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *KNotesPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new KNotesSummaryWidget( this, parentWidget );
}
@@ -90,7 +90,7 @@ void KNotesPlugin::slotNewNote()
void KNotesPlugin::slotSyncNotes()
{
DCOPRef ref( "kmail", "KMailICalIface" );
- ref.send( "triggerSync", QString("Note") );
+ ref.send( "triggerSync", TQString("Note") );
}
#include "knotes_plugin.moc"
diff --git a/kontact/plugins/knotes/knotes_plugin.h b/kontact/plugins/knotes/knotes_plugin.h
index d4d58cb03..a94494581 100644
--- a/kontact/plugins/knotes/knotes_plugin.h
+++ b/kontact/plugins/knotes/knotes_plugin.h
@@ -34,10 +34,10 @@ class KNotesPlugin : public Kontact::Plugin
Q_OBJECT
public:
- KNotesPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ KNotesPlugin( Kontact::Core *core, const char *name, const TQStringList& );
~KNotesPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
int weight() const { return 600; }
diff --git a/kontact/plugins/knotes/knotetip.cpp b/kontact/plugins/knotes/knotetip.cpp
index 6e2c998d7..64db3a336 100644
--- a/kontact/plugins/knotes/knotetip.cpp
+++ b/kontact/plugins/knotes/knotetip.cpp
@@ -29,9 +29,9 @@
your version.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -41,23 +41,23 @@
KNoteTip::KNoteTip( KIconView *parent )
- : QFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
+ : TQFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop ),
mFilter( false ),
mView( parent ),
mNoteIVI( 0 ),
- mPreview( new QTextEdit( this ) )
+ mPreview( new TQTextEdit( this ) )
{
mPreview->setReadOnly( true );
- mPreview->setHScrollBarMode( QScrollView::AlwaysOff );
- mPreview->setVScrollBarMode( QScrollView::AlwaysOff );
+ mPreview->setHScrollBarMode( TQScrollView::AlwaysOff );
+ mPreview->setVScrollBarMode( TQScrollView::AlwaysOff );
- QBoxLayout *layout = new QVBoxLayout( this );
+ TQBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( mPreview );
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setMargin( 1 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
hide();
}
@@ -87,8 +87,8 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
else
mPreview->setTextFormat( Qt::PlainText );
- QColor fg( journal->customProperty( "KNotes", "FgColor" ) );
- QColor bg( journal->customProperty( "KNotes", "BgColor" ) );
+ TQColor fg( journal->customProperty( "KNotes", "FgColor" ) );
+ TQColor bg( journal->customProperty( "KNotes", "BgColor" ) );
setColor( fg, bg );
mPreview->setText( journal->description() );
@@ -100,7 +100,7 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
while ( w > 60 && h == mPreview->heightForWidth( w - 20 ) )
w -= 20;
- QRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
+ TQRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
resize( w, QMIN( h, desk.height() / 2 - 20 ) );
hide();
@@ -113,13 +113,13 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
// protected, virtual methods
-void KNoteTip::resizeEvent( QResizeEvent *ev )
+void KNoteTip::resizeEvent( TQResizeEvent *ev )
{
- QFrame::resizeEvent( ev );
+ TQFrame::resizeEvent( ev );
reposition();
}
-void KNoteTip::timerEvent( QTimerEvent * )
+void KNoteTip::timerEvent( TQTimerEvent * )
{
killTimers();
@@ -133,17 +133,17 @@ void KNoteTip::timerEvent( QTimerEvent * )
}
}
-bool KNoteTip::eventFilter( QObject *, QEvent *e )
+bool KNoteTip::eventFilter( TQObject *, TQEvent *e )
{
switch ( e->type() ) {
- case QEvent::Leave:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- case QEvent::Wheel:
+ case TQEvent::Leave:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ case TQEvent::Wheel:
killTimers();
setFilter( false );
hide();
@@ -157,20 +157,20 @@ bool KNoteTip::eventFilter( QObject *, QEvent *e )
// private stuff
-void KNoteTip::setColor( const QColor &fg, const QColor &bg )
+void KNoteTip::setColor( const TQColor &fg, const TQColor &bg )
{
- QPalette newpalette = palette();
- newpalette.setColor( QColorGroup::Background, bg );
- newpalette.setColor( QColorGroup::Foreground, fg );
- newpalette.setColor( QColorGroup::Base, bg ); // text background
- newpalette.setColor( QColorGroup::Text, fg ); // text color
- newpalette.setColor( QColorGroup::Button, bg );
+ TQPalette newpalette = palette();
+ newpalette.setColor( TQColorGroup::Background, bg );
+ newpalette.setColor( TQColorGroup::Foreground, fg );
+ newpalette.setColor( TQColorGroup::Base, bg ); // text background
+ newpalette.setColor( TQColorGroup::Text, fg ); // text color
+ newpalette.setColor( TQColorGroup::Button, bg );
// the shadow
- newpalette.setColor( QColorGroup::Midlight, bg.light(110) );
- newpalette.setColor( QColorGroup::Shadow, bg.dark(116) );
- newpalette.setColor( QColorGroup::Light, bg.light(180) );
- newpalette.setColor( QColorGroup::Dark, bg.dark(108) );
+ newpalette.setColor( TQColorGroup::Midlight, bg.light(110) );
+ newpalette.setColor( TQColorGroup::Shadow, bg.dark(116) );
+ newpalette.setColor( TQColorGroup::Light, bg.light(180) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(108) );
setPalette( newpalette );
// set the text color
@@ -185,9 +185,9 @@ void KNoteTip::setFilter( bool enable )
if ( enable ) {
kapp->installEventFilter( this );
- QApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
} else {
- QApplication::setGlobalMouseTracking( false );
+ TQApplication::setGlobalMouseTracking( false );
kapp->removeEventFilter( this );
}
@@ -199,14 +199,14 @@ void KNoteTip::reposition()
if ( !mNoteIVI )
return;
- QRect rect = mNoteIVI->rect();
- QPoint off = mView->mapToGlobal( mView->contentsToViewport( QPoint( 0, 0 ) ) );
+ TQRect rect = mNoteIVI->rect();
+ TQPoint off = mView->mapToGlobal( mView->contentsToViewport( TQPoint( 0, 0 ) ) );
rect.moveBy( off.x(), off.y() );
- QPoint pos = rect.center();
+ TQPoint pos = rect.center();
// should the tooltip be shown to the left or to the right of the ivi?
- QRect desk = KGlobalSettings::desktopGeometry( pos );
+ TQRect desk = KGlobalSettings::desktopGeometry( pos );
if ( rect.center().x() + width() > desk.right() ) {
// to the left
if ( pos.x() - width() < 0 )
diff --git a/kontact/plugins/knotes/knotetip.h b/kontact/plugins/knotes/knotetip.h
index f07b75f0c..a97391962 100644
--- a/kontact/plugins/knotes/knotetip.h
+++ b/kontact/plugins/knotes/knotetip.h
@@ -32,7 +32,7 @@
#ifndef KNOTETIP_H
#define KNOTETIP_H
-#include <qframe.h>
+#include <tqframe.h>
class QTextEdit;
class KIconView;
@@ -47,12 +47,12 @@ class KNoteTip : public QFrame
void setNote( KNotesIconViewItem *item );
protected:
- virtual bool eventFilter( QObject *, QEvent *e );
- virtual void timerEvent( QTimerEvent * );
- virtual void resizeEvent( QResizeEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent *e );
+ virtual void timerEvent( TQTimerEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private:
- void setColor( const QColor &fg, const QColor &bg );
+ void setColor( const TQColor &fg, const TQColor &bg );
void setFilter( bool enable );
void reposition();
@@ -62,7 +62,7 @@ class KNoteTip : public QFrame
KIconView *mView;
KNotesIconViewItem *mNoteIVI;
- QTextEdit *mPreview;
+ TQTextEdit *mPreview;
};
#endif
diff --git a/kontact/plugins/knotes/summarywidget.cpp b/kontact/plugins/knotes/summarywidget.cpp
index 3045ede53..012e6ae82 100644
--- a/kontact/plugins/knotes/summarywidget.cpp
+++ b/kontact/plugins/knotes/summarywidget.cpp
@@ -21,10 +21,10 @@
without including the source code for Qt in the source distribution.
*/
-#include <qobject.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqobject.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -45,26 +45,26 @@
#include "summarywidget.h"
KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ), mLayout( 0 ), mPlugin( plugin )
{
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 3, 3 );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 3, 3 );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_notes",
KIcon::Desktop, KIcon::SizeMedium );
- QWidget* header = createHeader( this, icon, i18n( "Notes" ) );
+ TQWidget* header = createHeader( this, icon, i18n( "Notes" ) );
mainLayout->addWidget( header );
- mLayout = new QGridLayout( mainLayout, 7, 3, 3 );
+ mLayout = new TQGridLayout( mainLayout, 7, 3, 3 );
mLayout->setRowStretch( 6, 1 );
- mCalendar = new KCal::CalendarLocal( QString::fromLatin1("UTC") );
+ mCalendar = new KCal::CalendarLocal( TQString::fromLatin1("UTC") );
KNotesResourceManager *manager = new KNotesResourceManager();
- QObject::connect( manager, SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
- this, SLOT( addNote( KCal::Journal* ) ) );
- QObject::connect( manager, SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
- this, SLOT( removeNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigRegisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( addNote( KCal::Journal* ) ) );
+ TQObject::connect( manager, TQT_SIGNAL( sigDeregisteredNote( KCal::Journal* ) ),
+ this, TQT_SLOT( removeNote( KCal::Journal* ) ) );
manager->load();
@@ -74,7 +74,7 @@ KNotesSummaryWidget::KNotesSummaryWidget( Kontact::Plugin *plugin,
void KNotesSummaryWidget::updateView()
{
mNotes = mCalendar->journals();
- QLabel *label;
+ TQLabel *label;
for ( label = mLabels.first(); label; label = mLabels.next() )
label->deleteLater();
@@ -83,14 +83,14 @@ void KNotesSummaryWidget::updateView()
KIconLoader loader( "knotes" );
int counter = 0;
- QPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
+ TQPixmap pm = loader.loadIcon( "knotes", KIcon::Small );
KCal::Journal::List::Iterator it;
if ( mNotes.count() ) {
for (it = mNotes.begin(); it != mNotes.end(); ++it) {
// Fill Note Pixmap Field
- label = new QLabel( this );
+ label = new TQLabel( this );
label->setPixmap( pm );
label->setMaximumWidth( label->minimumSizeHint().width() );
label->setAlignment( AlignVCenter );
@@ -98,7 +98,7 @@ void KNotesSummaryWidget::updateView()
mLabels.append( label );
// File Note Summary Field
- QString newtext = (*it)->summary();
+ TQString newtext = (*it)->summary();
KURLLabel *urlLabel = new KURLLabel( (*it)->uid(), newtext, this );
urlLabel->installEventFilter( this );
@@ -108,16 +108,16 @@ void KNotesSummaryWidget::updateView()
mLabels.append( urlLabel );
if ( !(*it)->description().isEmpty() ) {
- QToolTip::add( urlLabel, (*it)->description().left( 80 ) );
+ TQToolTip::add( urlLabel, (*it)->description().left( 80 ) );
}
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( urlClicked( const QString& ) ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( urlClicked( const TQString& ) ) );
counter++;
}
} else {
- QLabel *noNotes = new QLabel( i18n( "No Notes Available" ), this );
+ TQLabel *noNotes = new TQLabel( i18n( "No Notes Available" ), this );
noNotes->setAlignment( AlignHCenter | AlignVCenter );
mLayout->addWidget( noNotes, 0, 1 );
mLabels.append( noNotes );
@@ -127,7 +127,7 @@ void KNotesSummaryWidget::updateView()
label->show();
}
-void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
+void KNotesSummaryWidget::urlClicked( const TQString &/*uid*/ )
{
if ( !mPlugin->isRunningStandalone() )
mPlugin->core()->selectPlugin( mPlugin );
@@ -135,14 +135,14 @@ void KNotesSummaryWidget::urlClicked( const QString &/*uid*/ )
mPlugin->bringToForeground();
}
-bool KNotesSummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool KNotesSummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
KURLLabel* label = static_cast<KURLLabel*>( obj );
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message( i18n( "Read Note: \"%1\"" ).arg( label->text() ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
diff --git a/kontact/plugins/knotes/summarywidget.h b/kontact/plugins/knotes/summarywidget.h
index f21d829fa..dff4319ac 100644
--- a/kontact/plugins/knotes/summarywidget.h
+++ b/kontact/plugins/knotes/summarywidget.h
@@ -26,9 +26,9 @@
#include "summary.h"
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include <libkcal/resourcelocal.h>
#include <libkcal/calendarresources.h>
@@ -45,15 +45,15 @@ class KNotesSummaryWidget : public Kontact::Summary
Q_OBJECT
public:
- KNotesSummaryWidget( Kontact::Plugin *plugin, QWidget *parent, const char *name = 0 );
+ KNotesSummaryWidget( Kontact::Plugin *plugin, TQWidget *parent, const char *name = 0 );
void updateSummary( bool force = false ) { Q_UNUSED( force ); updateView(); }
protected:
- virtual bool eventFilter( QObject *obj, QEvent* e );
+ virtual bool eventFilter( TQObject *obj, TQEvent* e );
protected slots:
- void urlClicked( const QString& );
+ void urlClicked( const TQString& );
void updateView();
void addNote( KCal::Journal* );
void removeNote( KCal::Journal* );
@@ -62,9 +62,9 @@ class KNotesSummaryWidget : public Kontact::Summary
KCal::CalendarLocal *mCalendar;
KCal::Journal::List mNotes;
- QGridLayout *mLayout;
+ TQGridLayout *mLayout;
- QPtrList<QLabel> mLabels;
+ TQPtrList<TQLabel> mLabels;
Kontact::Plugin *mPlugin;
};