summaryrefslogtreecommitdiffstats
path: root/knotes
diff options
context:
space:
mode:
Diffstat (limited to 'knotes')
-rw-r--r--knotes/KNotesAppIface.h52
-rw-r--r--knotes/KNotesIface.h26
-rw-r--r--knotes/knote.cpp348
-rw-r--r--knotes/knote.h62
-rw-r--r--knotes/knotealarmdlg.cpp32
-rw-r--r--knotes/knotealarmdlg.h4
-rw-r--r--knotes/knotebutton.cpp54
-rw-r--r--knotes/knotebutton.h14
-rw-r--r--knotes/knoteconfigdlg.cpp92
-rw-r--r--knotes/knoteconfigdlg.h16
-rw-r--r--knotes/knoteedit.cpp132
-rw-r--r--knotes/knoteedit.h20
-rw-r--r--knotes/knotehostdlg.cpp22
-rw-r--r--knotes/knotehostdlg.h6
-rw-r--r--knotes/knoteprinter.cpp62
-rw-r--r--knotes/knoteprinter.h48
-rw-r--r--knotes/knotesalarm.cpp18
-rw-r--r--knotes/knotesalarm.h8
-rw-r--r--knotes/knotesapp.cpp202
-rw-r--r--knotes/knotesapp.h72
-rw-r--r--knotes/knoteslegacy.cpp64
-rw-r--r--knotes/knoteslegacy.h8
-rw-r--r--knotes/knotesnetrecv.cpp32
-rw-r--r--knotes/knotesnetrecv.h10
-rw-r--r--knotes/knotesnetsend.cpp20
-rw-r--r--knotes/knotesnetsend.h14
-rw-r--r--knotes/main.cpp6
-rw-r--r--knotes/resourcelocal.cpp8
-rw-r--r--knotes/resourcelocal.h2
-rw-r--r--knotes/resourcelocal_plugin.cpp4
-rw-r--r--knotes/resourcelocalconfig.cpp10
-rw-r--r--knotes/resourcelocalconfig.h2
-rw-r--r--knotes/resourcemanager.cpp6
-rw-r--r--knotes/resourcemanager.h6
-rw-r--r--knotes/resourcenotes.h2
35 files changed, 742 insertions, 742 deletions
diff --git a/knotes/KNotesAppIface.h b/knotes/KNotesAppIface.h
index f97776fdb..7ddfdc28a 100644
--- a/knotes/KNotesAppIface.h
+++ b/knotes/KNotesAppIface.h
@@ -32,8 +32,8 @@
#ifndef __KNotesAppIface_h__
#define __KNotesAppIface_h__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -49,8 +49,8 @@ k_dcop:
* @param text the body of the new note
* @return the new notes' id
*/
- virtual QString newNote( const QString& name = QString::null,
- const QString& text = QString::null ) = 0;
+ virtual TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null ) = 0;
/**
* Create a new note and inserts the current text in the clipboard
@@ -60,54 +60,54 @@ k_dcop:
* KNotes will choose an appropriate name
* @return the new notes' id
*/
- virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
+ virtual TQString newNoteFromClipboard( const TQString& name = TQString::null ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
*/
- virtual ASYNC killNote( const QString& noteId ) = 0;
+ virtual ASYNC killNote( const TQString& noteId ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
* @param force do not request confirmation
*/
- virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
+ virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
/**
* Get all the notes including their ids.
- * @return a QMap that maps the id of a note to its name
+ * @return a TQMap that maps the id of a note to its name
*/
- virtual QMap<QString,QString> notes() const = 0;
+ virtual TQMap<TQString,TQString> notes() const = 0;
/**
* Changes the title/name of a note.
* @param noteId the id of the note to be modified
* @param newName the new title
*/
- virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
+ virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
/**
* Sets the text of a note. This will delete the old text!
* @param noteId the id of the note
* @param newText the new text for the note
*/
- virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
+ virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
/**
* Returns the foreground/text color of a note.
* @param noteId the id of the note in question
* @return the foreground/text color as a QString
*/
- virtual QString fgColor( const QString& noteId ) const = 0;
+ virtual TQString fgColor( const TQString& noteId ) const = 0;
/**
* Returns the background color of a note.
* @param noteId the id of the note in question
* @return the background color as a QString
*/
- virtual QString bgColor( const QString& noteId ) const = 0;
+ virtual TQString bgColor( const TQString& noteId ) const = 0;
/**
* Sets the color (foreground and background color) of a note.
@@ -115,22 +115,22 @@ k_dcop:
* @param fgColor the new text color for the note
* @param bgColor the new background color for the note
*/
- virtual ASYNC setColor( const QString& noteId, const QString& fgColor,
- const QString& bgColor ) = 0;
+ virtual ASYNC setColor( const TQString& noteId, const TQString& fgColor,
+ const TQString& bgColor ) = 0;
/**
* Returns the title/name of a note.
* @param noteId the id of the note in question
* @return the name as a QString
*/
- virtual QString name( const QString& noteId ) const = 0;
+ virtual TQString name( const TQString& noteId ) const = 0;
/**
* Returns the text of a note.
* @param noteId the id of the note in question
* @return the body as a QString
*/
- virtual QString text( const QString& noteId ) const = 0;
+ virtual TQString text( const TQString& noteId ) const = 0;
/******** HERE STARTS THE KNotesAppIface DCOP INTERFACE EXTENSION ********/
@@ -139,13 +139,13 @@ k_dcop:
* Show a note as if it had been selected from the "notes" menu.
* @param noteId the id of the note to show
*/
- virtual ASYNC showNote( const QString& noteId ) const = 0;
+ virtual ASYNC showNote( const TQString& noteId ) const = 0;
/**
* Hide a note.
* @param noteId the id of the note to hide
*/
- virtual ASYNC hideNote( const QString& noteId ) const = 0;
+ virtual ASYNC hideNote( const TQString& noteId ) const = 0;
/**
* Show all notes on their respective desktops.
@@ -162,14 +162,14 @@ k_dcop:
* @param noteId the id of the note in question
* @return the width as a uint
*/
- virtual int width( const QString& noteId ) const = 0;
+ virtual int width( const TQString& noteId ) const = 0;
/**
* Returns the height of a note.
* @param noteId the id of the note in question
* @return the height as a uint
*/
- virtual int height( const QString& noteId ) const = 0;
+ virtual int height( const TQString& noteId ) const = 0;
/**
* Repositions a note.
@@ -177,7 +177,7 @@ k_dcop:
* @param x the new x-coordinate of the note
* @param y the new y-coordinate of the note
*/
- virtual ASYNC move( const QString& noteId, int x, int y ) const = 0;
+ virtual ASYNC move( const TQString& noteId, int x, int y ) const = 0;
/**
* Changes the size of a note.
@@ -185,13 +185,13 @@ k_dcop:
* @param width the new width of the note
* @param height the new height of the note
*/
- virtual ASYNC resize( const QString& noteId, int width, int height ) const = 0;
+ virtual ASYNC resize( const TQString& noteId, int width, int height ) const = 0;
/**
* This tells KNotes that a specific app has synchronized with all the notes.
* @param app the app that has synced with KNotes
*/
- virtual ASYNC sync( const QString& app ) = 0;
+ virtual ASYNC sync( const TQString& app ) = 0;
/**
* Test if a note was created new after the last sync.
@@ -200,7 +200,7 @@ k_dcop:
* @return true if the note is new, false if not or if the note does
* not exist
*/
- virtual bool isNew( const QString& app, const QString& noteId ) const = 0;
+ virtual bool isNew( const TQString& app, const TQString& noteId ) const = 0;
/**
* Test if a note was modified since the last sync.
@@ -209,7 +209,7 @@ k_dcop:
* @return true if modified (note that this will return true if the note is
* new as well!) and false if the note is not modified or doesn't exist
*/
- virtual bool isModified( const QString& app, const QString& noteId ) const = 0;
+ virtual bool isModified( const TQString& app, const TQString& noteId ) const = 0;
};
#endif
diff --git a/knotes/KNotesIface.h b/knotes/KNotesIface.h
index b1d22de3a..dc9cd41de 100644
--- a/knotes/KNotesIface.h
+++ b/knotes/KNotesIface.h
@@ -22,8 +22,8 @@
#ifndef __KNotesIface_h__
#define __KNotesIface_h__
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <dcopobject.h>
@@ -39,8 +39,8 @@ k_dcop:
* @param text the body of the new note
* @return the new notes' id
*/
- virtual QString newNote( const QString& name = QString::null,
- const QString& text = QString::null ) = 0;
+ virtual TQString newNote( const TQString& name = TQString::null,
+ const TQString& text = TQString::null ) = 0;
/**
* Create a new note and inserts the current text in the clipboard
@@ -50,54 +50,54 @@ k_dcop:
* KNotes will choose an appropriate name
* @return the new notes' id
*/
- virtual QString newNoteFromClipboard( const QString& name = QString::null ) = 0;
+ virtual TQString newNoteFromClipboard( const TQString& name = TQString::null ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
*/
- virtual ASYNC killNote( const QString& noteId ) = 0;
+ virtual ASYNC killNote( const TQString& noteId ) = 0;
/**
* Deletes a note forever.
* @param noteId the id of the note to kill
* @param force do not request confirmation
*/
- virtual ASYNC killNote( const QString& noteId, bool force ) = 0;
+ virtual ASYNC killNote( const TQString& noteId, bool force ) = 0;
/**
* Get all the notes including their ids.
- * @return a QMap that maps the id of a note to its name
+ * @return a TQMap that maps the id of a note to its name
*/
- virtual QMap<QString,QString> notes() const = 0;
+ virtual TQMap<TQString,TQString> notes() const = 0;
/**
* Changes the title/name of a note.
* @param noteId the id of the note to be modified
* @param newName the new title
*/
- virtual ASYNC setName( const QString& noteId, const QString& newName ) = 0;
+ virtual ASYNC setName( const TQString& noteId, const TQString& newName ) = 0;
/**
* Sets the text of a note. This will delete the old text!
* @param noteId the id of the note
* @param newText the new text for the note
*/
- virtual ASYNC setText( const QString& noteId, const QString& newText ) = 0;
+ virtual ASYNC setText( const TQString& noteId, const TQString& newText ) = 0;
/**
* Returns the title/name of a note.
* @param noteId the id of the note in question
* @return the name as a QString
*/
- virtual QString name( const QString& noteId ) const = 0;
+ virtual TQString name( const TQString& noteId ) const = 0;
/**
* Returns the text of a note.
* @param noteId the id of the note in question
* @return the body as a QString
*/
- virtual QString text( const QString& noteId ) const = 0;
+ virtual TQString text( const TQString& noteId ) const = 0;
};
#endif
diff --git a/knotes/knote.cpp b/knotes/knote.cpp
index 795da8a16..1e55dd14c 100644
--- a/knotes/knote.cpp
+++ b/knotes/knote.cpp
@@ -18,18 +18,18 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qlabel.h>
-#include <qdrawutil.h>
-#include <qsize.h>
-#include <qsizegrip.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qsimplerichtext.h>
-#include <qobjectlist.h>
-#include <qfile.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqdrawutil.h>
+#include <tqsize.h>
+#include <tqsizegrip.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqsimplerichtext.h>
+#include <tqobjectlist.h>
+#include <tqfile.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -80,8 +80,8 @@ extern Time qt_x_time;
int KNote::s_ppOffset = 0;
-KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *name )
- : QFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
+KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *name )
+ : TQFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
m_label( 0 ), m_pushpin( 0 ), m_fold( 0 ), m_button( 0 ), m_tool( 0 ), m_editor( 0 ),
m_config( 0 ), m_journal( j ), m_find( 0 ),
m_kwinConf( KSharedConfig::openConfig( "kwinrc", true ) )
@@ -98,70 +98,70 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// (KOrganizer's journals don't have titles but a valid start date)
if ( m_journal->summary().isNull() && m_journal->dtStart().isValid() )
{
- QString s = KGlobal::locale()->formatDateTime( m_journal->dtStart() );
+ TQString s = KGlobal::locale()->formatDateTime( m_journal->dtStart() );
m_journal->setSummary( s );
}
// create the menu items for the note - not the editor...
// rename, mail, print, save as, insert date, alarm, close, delete, new note
new KAction( i18n("New"), "filenew", 0,
- this, SIGNAL(sigRequestNewNote()), actionCollection(), "new_note" );
+ this, TQT_SIGNAL(sigRequestNewNote()), actionCollection(), "new_note" );
new KAction( i18n("Rename..."), "text", 0,
- this, SLOT(slotRename()), actionCollection(), "rename_note" );
+ this, TQT_SLOT(slotRename()), actionCollection(), "rename_note" );
m_readOnly = new KToggleAction( i18n("Lock"), "lock" , 0,
- this, SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" );
+ this, TQT_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" );
m_readOnly->setCheckedState( KGuiItem( i18n("Unlock"), "unlock" ) );
new KAction( i18n("Hide"), "fileclose" , Key_Escape,
- this, SLOT(slotClose()), actionCollection(), "hide_note" );
+ this, TQT_SLOT(slotClose()), actionCollection(), "hide_note" );
new KAction( i18n("Delete"), "knotes_delete", 0,
- this, SLOT(slotKill()), actionCollection(), "delete_note" );
+ this, TQT_SLOT(slotKill()), actionCollection(), "delete_note" );
new KAction( i18n("Insert Date"), "knotes_date", 0 ,
- this, SLOT(slotInsDate()), actionCollection(), "insert_date" );
+ this, TQT_SLOT(slotInsDate()), actionCollection(), "insert_date" );
new KAction( i18n("Set Alarm..."), "knotes_alarm", 0 ,
- this, SLOT(slotSetAlarm()), actionCollection(), "set_alarm" );
+ this, TQT_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" );
new KAction( i18n("Send..."), "network", 0,
- this, SLOT(slotSend()), actionCollection(), "send_note" );
+ this, TQT_SLOT(slotSend()), actionCollection(), "send_note" );
new KAction( i18n("Mail..."), "mail_send", 0,
- this, SLOT(slotMail()), actionCollection(), "mail_note" );
+ this, TQT_SLOT(slotMail()), actionCollection(), "mail_note" );
new KAction( i18n("Save As..."), "filesaveas", 0,
- this, SLOT(slotSaveAs()), actionCollection(), "save_note" );
- KStdAction::print( this, SLOT(slotPrint()), actionCollection(), "print_note" );
+ this, TQT_SLOT(slotSaveAs()), actionCollection(), "save_note" );
+ KStdAction::print( this, TQT_SLOT(slotPrint()), actionCollection(), "print_note" );
new KAction( i18n("Preferences..."), "configure", 0,
- this, SLOT(slotPreferences()), actionCollection(), "configure_note" );
+ this, TQT_SLOT(slotPreferences()), actionCollection(), "configure_note" );
m_keepAbove = new KToggleAction( i18n("Keep Above Others"), "up", 0,
- this, SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" );
+ this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" );
m_keepAbove->setExclusiveGroup( "keepAB" );
m_keepBelow = new KToggleAction( i18n("Keep Below Others"), "down", 0,
- this, SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" );
+ this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" );
m_keepBelow->setExclusiveGroup( "keepAB" );
m_toDesktop = new KListAction( i18n("To Desktop"), 0,
- this, SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" );
- connect( m_toDesktop->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotUpdateDesktopActions()) );
+ this, TQT_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" );
+ connect( m_toDesktop->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUpdateDesktopActions()) );
// invisible action to walk through the notes to make this configurable
new KAction( i18n("Walk Through Notes"), 0, SHIFT+Key_BackTab,
- this, SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" );
+ this, TQT_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" );
// create the note header, button and label...
- m_label = new QLabel( this );
+ m_label = new TQLabel( this );
m_label->setFrameStyle( NoFrame );
m_label->setLineWidth( 0 );
m_label->installEventFilter( this ); // receive events (for dragging & action menu)
setName( m_journal->summary() ); // don't worry, no signals are connected at this stage yet
m_button = new KNoteButton( "knotes_close", this );
- connect( m_button, SIGNAL(clicked()), this, SLOT(slotClose()) );
+ connect( m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()) );
// create the note editor
m_editor = new KNoteEdit( actionCollection(), this );
m_editor->installEventFilter( this ); // receive events (for modified)
m_editor->viewport()->installEventFilter( this );
- connect( m_editor, SIGNAL(contentsMoving( int, int )), this, SLOT(slotUpdateViewport( int, int )));
+ connect( m_editor, TQT_SIGNAL(contentsMoving( int, int )), this, TQT_SLOT(slotUpdateViewport( int, int )));
KXMLGUIBuilder builder( this );
KXMLGUIFactory factory( &builder, this );
@@ -177,12 +177,12 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
m_tool->setIconText( KToolBar::IconOnly );
// if there was just a way of making KComboBox adhere the toolbar height...
- QObjectList *list = m_tool->queryList( "KComboBox" );
- QObjectListIt it( *list );
+ TQObjectList *list = m_tool->queryList( "KComboBox" );
+ TQObjectListIt it( *list );
while ( it.current() != 0 )
{
KComboBox *combo = (KComboBox *)it.current();
- QFont font = combo->font();
+ TQFont font = combo->font();
font.setPointSize( 7 );
combo->setFont( font );
combo->setFixedHeight( 14 );
@@ -196,15 +196,15 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
setFocusProxy( m_editor );
// create the resize handle
- m_editor->setCornerWidget( new QSizeGrip( this ) );
+ m_editor->setCornerWidget( new TQSizeGrip( this ) );
uint width = m_editor->cornerWidget()->width();
uint height = m_editor->cornerWidget()->height();
- QBitmap mask;
+ TQBitmap mask;
mask.resize( width, height );
mask.fill( color0 );
- QPointArray array;
+ TQPointArray array;
array.setPoints( 3, 0, height, width, height, width, 0 );
- QPainter p;
+ TQPainter p;
p.begin( &mask );
p.setBrush( color1 );
p.drawPolygon( array );
@@ -213,7 +213,7 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
m_editor->cornerWidget()->setBackgroundMode( PaletteBase );
// the config file location
- QString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
+ TQString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
configFile += m_journal->uid();
// no config file yet? -> use the default display config if available
@@ -265,21 +265,21 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) )
closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1;
- QPixmap pushpin_pix;
+ TQPixmap pushpin_pix;
if ( closeLeft )
- pushpin_pix = QPixmap( QPixmap( pushpin_xpm ).convertToImage().mirror( true, false ) );
+ pushpin_pix = TQPixmap( TQPixmap( pushpin_xpm ).convertToImage().mirror( true, false ) );
else
- pushpin_pix = QPixmap( pushpin_xpm );
+ pushpin_pix = TQPixmap( pushpin_xpm );
// the pushpin label at the top left or right corner
- m_pushpin = new QLabel( this );
+ m_pushpin = new TQLabel( this );
m_pushpin->setScaledContents( true );
m_pushpin->setBackgroundMode( NoBackground );
m_pushpin->setPixmap( pushpin_pix );
m_pushpin->resize( pushpin_pix.size() );
// fold label at bottom right corner
- m_fold = new QLabel( this );
+ m_fold = new TQLabel( this );
m_fold->setScaledContents( true );
m_fold->setBackgroundMode( NoBackground );
@@ -290,22 +290,22 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// let KWin do the placement if the position is illegal--at least 10 pixels
// of a note need to be visible
- const QPoint& position = m_config->position();
- QRect desk = kapp->desktop()->rect();
+ const TQPoint& position = m_config->position();
+ TQRect desk = kapp->desktop()->rect();
desk.addCoords( 10, 10, -10, -10 );
- if ( desk.intersects( QRect( position, QSize( width, height ) ) ) )
+ if ( desk.intersects( TQRect( position, TQSize( width, height ) ) ) )
move( position ); // do before calling show() to avoid flicker
// config items in the journal have priority
- QString property = m_journal->customProperty( "KNotes", "FgColor" );
+ TQString property = m_journal->customProperty( "KNotes", "FgColor" );
if ( !property.isNull() )
- m_config->setFgColor( QColor( property ) );
+ m_config->setFgColor( TQColor( property ) );
else
m_journal->setCustomProperty( "KNotes", "FgColor", m_config->fgColor().name() );
property = m_journal->customProperty( "KNotes", "BgColor" );
if ( !property.isNull() )
- m_config->setBgColor( QColor( property ) );
+ m_config->setBgColor( TQColor( property ) );
else
m_journal->setCustomProperty( "KNotes", "BgColor", m_config->bgColor().name() );
@@ -320,7 +320,7 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// create the mask for the fold---to be done after slotApplyConfig(),
// which calls createFold()
- m_fold->setMask( QRegion( m_fold->pixmap()->createHeuristicMask() ) );
+ m_fold->setMask( TQRegion( m_fold->pixmap()->createHeuristicMask() ) );
// if this is a new note put on current desktop - we can't use defaults
// in KConfig XT since only _changes_ will be stored in the config file
@@ -359,8 +359,8 @@ KNote::KNote( QDomDocument buildDoc, Journal *j, QWidget *parent, const char *na
// HACK: update the icon color - again after showing the note, to make kicker aware of the new colors
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
- QPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
+ TQPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
+ TQPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, m_config->bgColor(), false );
KWin::setIcons( winId(), icon, miniIcon );
}
@@ -389,7 +389,7 @@ void KNote::slotKill( bool force )
delete m_config;
m_config = 0;
- QString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
+ TQString configFile = KGlobal::dirs()->saveLocation( "appdata", "notes/" );
configFile += m_journal->uid();
if ( !KIO::NetAccess::del( KURL::fromPathOrURL( configFile ), this ) )
@@ -430,26 +430,26 @@ void KNote::saveConfig() const
m_config->writeConfig();
}
-QString KNote::noteId() const
+TQString KNote::noteId() const
{
return m_journal->uid();
}
-QString KNote::name() const
+TQString KNote::name() const
{
return m_label->text();
}
-QString KNote::text() const
+TQString KNote::text() const
{
return m_editor->text();
}
-QString KNote::plainText() const
+TQString KNote::plainText() const
{
if ( m_editor->textFormat() == RichText )
{
- QTextEdit conv;
+ TQTextEdit conv;
conv.setTextFormat( RichText );
conv.setText( m_editor->text() );
conv.setTextFormat( PlainText );
@@ -459,7 +459,7 @@ QString KNote::plainText() const
return m_editor->text();
}
-void KNote::setName( const QString& name )
+void KNote::setName( const TQString& name )
{
m_label->setText( name );
updateLabelAlignment();
@@ -474,23 +474,23 @@ void KNote::setName( const QString& name )
emit sigNameChanged();
}
-void KNote::setText( const QString& text )
+void KNote::setText( const TQString& text )
{
m_editor->setText( text );
saveData();
}
-QColor KNote::fgColor() const
+TQColor KNote::fgColor() const
{
return m_config->fgColor();
}
-QColor KNote::bgColor() const
+TQColor KNote::bgColor() const
{
return m_config->bgColor();
}
-void KNote::setColor( const QColor& fg, const QColor& bg )
+void KNote::setColor( const TQColor& fg, const TQColor& bg )
{
m_journal->setCustomProperty( "KNotes", "FgColor", fg.name() );
m_journal->setCustomProperty( "KNotes", "BgColor", bg.name() );
@@ -501,25 +501,25 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
emit sigDataChanged();
m_config->writeConfig();
- 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 );
- newpalette.setColor( QColorGroup::ButtonText, fg );
+ 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 );
+ newpalette.setColor( TQColorGroup::ButtonText, fg );
-// newpalette.setColor( QColorGroup::Highlight, bg );
-// newpalette.setColor( QColorGroup::HighlightedText, fg );
+// newpalette.setColor( TQColorGroup::Highlight, bg );
+// newpalette.setColor( TQColorGroup::HighlightedText, fg );
// the shadow
- newpalette.setColor( QColorGroup::Midlight, bg.light(150) );
- newpalette.setColor( QColorGroup::Shadow, bg.dark(116) );
- newpalette.setColor( QColorGroup::Light, bg.light(180) );
+ newpalette.setColor( TQColorGroup::Midlight, bg.light(150) );
+ newpalette.setColor( TQColorGroup::Shadow, bg.dark(116) );
+ newpalette.setColor( TQColorGroup::Light, bg.light(180) );
if ( s_ppOffset )
- newpalette.setColor( QColorGroup::Dark, bg.dark(200) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(200) );
else
- newpalette.setColor( QColorGroup::Dark, bg.dark(108) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(108) );
setPalette( newpalette );
// set the text color
@@ -529,20 +529,20 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
updateBackground();
// set darker value for the hide button...
- QPalette darker = palette();
- darker.setColor( QColorGroup::Button, bg.dark(116) );
+ TQPalette darker = palette();
+ darker.setColor( TQColorGroup::Button, bg.dark(116) );
m_button->setPalette( darker );
// update the icon color
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, bg, false );
- QPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, bg, false );
+ TQPixmap icon = effect.apply( kapp->icon(), KIconEffect::Colorize, 1, bg, false );
+ TQPixmap miniIcon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1, bg, false );
KWin::setIcons( winId(), icon, miniIcon );
// set the color for the selection used to highlight the find stuff
- QColor sel = palette().color( QPalette::Active, QColorGroup::Base ).dark();
+ TQColor sel = palette().color( TQPalette::Active, TQColorGroup::Base ).dark();
if ( sel == Qt::black )
- sel = palette().color( QPalette::Active, QColorGroup::Base ).light();
+ sel = palette().color( TQPalette::Active, TQColorGroup::Base ).light();
m_editor->setSelectionAttributes( 1, sel, true );
@@ -554,14 +554,14 @@ void KNote::setColor( const QColor& fg, const QColor& bg )
emit sigColorChanged();
}
-void KNote::find( const QString& pattern, long options )
+void KNote::find( const TQString& pattern, long options )
{
delete m_find;
m_find = new KFind( pattern, options, this );
- connect( m_find, SIGNAL(highlight( const QString &, int, int )),
- this, SLOT(slotHighlight( const QString &, int, int )) );
- connect( m_find, SIGNAL(findNext()), this, SLOT(slotFindNext()) );
+ connect( m_find, TQT_SIGNAL(highlight( const TQString &, int, int )),
+ this, TQT_SLOT(slotHighlight( const TQString &, int, int )) );
+ connect( m_find, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()) );
m_find->setData( plainText() );
slotFindNext();
@@ -589,7 +589,7 @@ void KNote::slotFindNext()
}
}
-void KNote::slotHighlight( const QString& str, int idx, int len )
+void KNote::slotHighlight( const TQString& str, int idx, int len )
{
int paraFrom = 0, idxFrom = 0, p = 0;
for ( ; p < idx; ++p )
@@ -623,13 +623,13 @@ bool KNote::isModified() const
}
// FIXME KDE 4.0: remove sync(), isNew() and isModified()
-void KNote::sync( const QString& app )
+void KNote::sync( const TQString& app )
{
- QByteArray sep( 1 );
+ TQByteArray sep( 1 );
sep[0] = '\0';
KMD5 hash;
- QCString result;
+ TQCString result;
hash.update( m_label->text().utf8() );
hash.update( sep );
@@ -642,17 +642,17 @@ void KNote::sync( const QString& app )
config->writeEntry( app, result.data() );
}
-bool KNote::isNew( const QString& app ) const
+bool KNote::isNew( const TQString& app ) const
{
KConfig *config = m_config->config();
config->setGroup( "Synchronisation" );
- QString hash = config->readEntry( app );
+ TQString hash = config->readEntry( app );
return hash.isEmpty();
}
-bool KNote::isModified( const QString& app ) const
+bool KNote::isModified( const TQString& app ) const
{
- QByteArray sep( 1 );
+ TQByteArray sep( 1 );
sep[0] = '\0';
KMD5 hash;
@@ -663,7 +663,7 @@ bool KNote::isModified( const QString& app ) const
KConfig *config = m_config->config();
config->setGroup( "Synchronisation" );
- QString orig = config->readEntry( app );
+ TQString orig = config->readEntry( app );
if ( hash.verify( orig.utf8() ) ) // returns false on error!
return false;
@@ -686,7 +686,7 @@ void KNote::slotRename()
{
// pop up dialog to get the new name
bool ok;
- QString newName = KInputDialog::getText( QString::null,
+ TQString newName = KInputDialog::getText( TQString::null,
i18n("Please enter the new name:"), m_label->text(), &ok, this );
if ( !ok ) // handle cancel
return;
@@ -731,7 +731,7 @@ void KNote::slotClose()
void KNote::slotInsDate()
{
- m_editor->insert( KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()) );
+ m_editor->insert( KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()) );
}
void KNote::slotSetAlarm()
@@ -739,7 +739,7 @@ void KNote::slotSetAlarm()
KNoteAlarmDlg dlg( name(), this );
dlg.setIncidence( m_journal );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
emit sigDataChanged();
}
@@ -751,8 +751,8 @@ void KNote::slotPreferences()
// create a new preferences dialog...
KNoteConfigDlg *dialog = new KNoteConfigDlg( m_config, name(), this, noteId().utf8() );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(slotApplyConfig()) );
- connect( this, SIGNAL(sigNameChanged()), dialog, SLOT(slotUpdateCaption()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplyConfig()) );
+ connect( this, TQT_SIGNAL(sigNameChanged()), dialog, TQT_SLOT(slotUpdateCaption()) );
dialog->show();
}
@@ -760,8 +760,8 @@ void KNote::slotSend()
{
// pop up dialog to get the IP
KNoteHostDlg hostDlg( i18n("Send \"%1\"").arg( name() ), this );
- bool ok = (hostDlg.exec() == QDialog::Accepted);
- QString host = hostDlg.host();
+ bool ok = (hostDlg.exec() == TQDialog::Accepted);
+ TQString host = hostDlg.host();
if ( !ok ) // handle cancel
return;
@@ -782,10 +782,10 @@ void KNote::slotSend()
void KNote::slotMail()
{
// get the mail action command
- QStringList cmd_list = QStringList::split( QChar(' '), KNotesGlobalConfig::mailAction() );
+ TQStringList cmd_list = TQStringList::split( TQChar(' '), KNotesGlobalConfig::mailAction() );
KProcess mail;
- for ( QStringList::Iterator it = cmd_list.begin();
+ for ( TQStringList::Iterator it = cmd_list.begin();
it != cmd_list.end(); ++it )
{
if ( *it == "%f" )
@@ -804,9 +804,9 @@ void KNote::slotPrint()
{
saveData();
- 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();
@@ -816,33 +816,33 @@ void KNote::slotPrint()
printer.setContext( m_editor->context() );
printer.setStyleSheet( m_editor->styleSheet() );
printer.setColorGroup( colorGroup() );
- printer.printNote( QString(), content );
+ printer.printNote( TQString(), content );
}
void KNote::slotSaveAs()
{
- QCheckBox *convert = 0;
+ TQCheckBox *convert = 0;
if ( m_editor->textFormat() == RichText )
{
- convert = new QCheckBox( 0 );
+ convert = new TQCheckBox( 0 );
convert->setText( i18n("Save note as plain text") );
}
- KFileDialog dlg( QString::null, QString::null, this, "filedialog", true, convert );
+ KFileDialog dlg( TQString::null, TQString::null, this, "filedialog", true, convert );
dlg.setOperationMode( KFileDialog::Saving );
dlg.setCaption( i18n("Save As") );
dlg.exec();
- QString fileName = dlg.selectedFile();
+ TQString fileName = dlg.selectedFile();
if ( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( file.exists() &&
KMessageBox::warningContinueCancel( this, i18n("<qt>A file named <b>%1</b> already exists.<br>"
- "Are you sure you want to overwrite it?</qt>").arg( QFileInfo(file).fileName() ) )
+ "Are you sure you want to overwrite it?</qt>").arg( TQFileInfo(file).fileName() ) )
!= KMessageBox::Continue )
{
return;
@@ -850,7 +850,7 @@ void KNote::slotSaveAs()
if ( file.open( IO_WriteOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
// convert rich text to plain text first
if ( convert && convert->isChecked() )
stream << plainText();
@@ -929,13 +929,13 @@ void KNote::slotUpdateDesktopActions()
NETRootInfo wm_root( qt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
NETWinInfo wm_client( qt_xdisplay(), winId(), qt_xrootwin(), NET::WMDesktop );
- QStringList desktops;
+ TQStringList desktops;
desktops.append( i18n("&All Desktops") );
- desktops.append( QString::null ); // Separator
+ desktops.append( TQString::null ); // Separator
int count = wm_root.numberOfDesktops();
for ( int n = 1; n <= count; n++ )
- desktops.append( QString("&%1 %2").arg( n ).arg( QString::fromUtf8(wm_root.desktopName( n )) ) );
+ desktops.append( TQString("&%1 %2").arg( n ).arg( TQString::fromUtf8(wm_root.desktopName( n )) ) );
m_toDesktop->setItems( desktops );
@@ -966,11 +966,11 @@ void KNote::toDesktop( int desktop )
void KNote::createFold()
{
- QPixmap fold( 15, 15 );
- QPainter foldp( &fold );
+ TQPixmap fold( 15, 15 );
+ TQPainter foldp( &fold );
foldp.setPen( Qt::NoPen );
foldp.setBrush( palette().active().dark() );
- QPointArray foldpoints( 3 );
+ TQPointArray foldpoints( 3 );
foldpoints.putPoints( 0, 3, 0, 0, 14, 0, 0, 14 );
foldp.drawPolygon( foldpoints );
foldp.end();
@@ -980,7 +980,7 @@ void KNote::createFold()
void KNote::updateLabelAlignment()
{
// if the name is too long to fit, left-align it, otherwise center it (#59028)
- QString labelText = m_label->text();
+ TQString labelText = m_label->text();
if ( m_label->fontMetrics().boundingRect( labelText ).width() > m_label->width() )
m_label->setAlignment( AlignLeft );
else
@@ -997,7 +997,7 @@ void KNote::updateFocus()
if ( !m_editor->isReadOnly() )
{
- if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == QTextEdit::RichText )
+ if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == TQTextEdit::RichText )
{
m_tool->show();
setGeometry( x(), y(), width(), height() + m_tool->height() );
@@ -1044,18 +1044,18 @@ void KNote::updateMask()
int w = width();
int h = height();
- QRegion reg( 0, s_ppOffset, w, h - s_ppOffset );
+ TQRegion reg( 0, s_ppOffset, w, h - s_ppOffset );
- const QBitmap *pushpin_bitmap = m_pushpin->pixmap()->mask();
- QRegion pushpin_reg( *pushpin_bitmap );
+ const TQBitmap *pushpin_bitmap = m_pushpin->pixmap()->mask();
+ TQRegion pushpin_reg( *pushpin_bitmap );
m_pushpin->setMask( pushpin_reg );
pushpin_reg.translate( m_pushpin->x(), m_pushpin->y() );
if ( !hasFocus() )
{
- QPointArray foldpoints( 3 );
+ TQPointArray foldpoints( 3 );
foldpoints.putPoints( 0, 3, w-15, h, w, h-15, w, h );
- QRegion fold( foldpoints, false );
+ TQRegion fold( foldpoints, false );
setMask( reg.unite( pushpin_reg ).subtract( fold ) );
}
else
@@ -1066,7 +1066,7 @@ void KNote::updateBackground( int y_offset )
{
if ( !s_ppOffset )
{
- m_editor->setPaper( QBrush( colorGroup().background() ) );
+ m_editor->setPaper( TQBrush( colorGroup().background() ) );
return;
}
@@ -1081,9 +1081,9 @@ void KNote::updateBackground( int y_offset )
y_offset = y_offset % h;
- QImage grad_img( w, h, 32 );
+ TQImage grad_img( w, h, 32 );
QRgb rgbcol;
- QColor bg = palette().active().background();
+ TQColor bg = palette().active().background();
for ( int i = 0; i < h; ++i )
{
@@ -1100,8 +1100,8 @@ void KNote::updateBackground( int y_offset )
grad_img.setPixel( j, i, rgbcol );
}
- // setPaletteBackgroundPixmap makes QTextEdit::color() stop working!!
- m_editor->setPaper( QBrush( Qt::black, QPixmap( grad_img ) ) );
+ // setPaletteBackgroundPixmap makes TQTextEdit::color() stop working!!
+ m_editor->setPaper( TQBrush( Qt::black, TQPixmap( grad_img ) ) );
}
void KNote::updateLayout()
@@ -1149,10 +1149,10 @@ void KNote::updateLayout()
contentsRect().width(), headerHeight
);
- m_editor->setGeometry( QRect(
- QPoint( contentsRect().x(),
+ m_editor->setGeometry( TQRect(
+ TQPoint( contentsRect().x(),
contentsRect().y() + headerHeight + s_ppOffset ),
- QPoint( contentsRect().right(),
+ TQPoint( contentsRect().right(),
contentsRect().bottom() - ( m_tool ? (m_tool->isHidden() ? 0 : m_tool->height()) : 0 ) )
) );
@@ -1181,9 +1181,9 @@ void KNote::updateLayout()
// -------------------- protected methods -------------------- //
-void KNote::drawFrame( QPainter *p )
+void KNote::drawFrame( TQPainter *p )
{
- QRect r = frameRect();
+ TQRect r = frameRect();
r.setTop( s_ppOffset );
if ( s_ppOffset )
qDrawShadePanel( p, r, colorGroup(), false, lineWidth() );
@@ -1191,7 +1191,7 @@ void KNote::drawFrame( QPainter *p )
qDrawWinPanel( p, r, colorGroup(), false );
}
-void KNote::showEvent( QShowEvent * )
+void KNote::showEvent( TQShowEvent * )
{
if ( m_config->hideNote() )
{
@@ -1204,29 +1204,29 @@ void KNote::showEvent( QShowEvent * )
}
}
-void KNote::resizeEvent( QResizeEvent *qre )
+void KNote::resizeEvent( TQResizeEvent *qre )
{
- QFrame::resizeEvent( qre );
+ TQFrame::resizeEvent( qre );
updateLayout();
}
-void KNote::closeEvent( QCloseEvent * )
+void KNote::closeEvent( TQCloseEvent * )
{
slotClose();
}
-void KNote::dragEnterEvent( QDragEnterEvent *e )
+void KNote::dragEnterEvent( TQDragEnterEvent *e )
{
if ( !m_config->readOnly() )
e->accept( KColorDrag::canDecode( e ) );
}
-void KNote::dropEvent( QDropEvent *e )
+void KNote::dropEvent( TQDropEvent *e )
{
if ( m_config->readOnly() )
return;
- QColor bg;
+ TQColor bg;
if ( KColorDrag::decode( e, bg ) )
setColor( paletteForegroundColor(), bg );
}
@@ -1236,41 +1236,41 @@ bool KNote::focusNextPrevChild( bool )
return true;
}
-bool KNote::event( QEvent *ev )
+bool KNote::event( TQEvent *ev )
{
- if ( ev->type() == QEvent::LayoutHint )
+ if ( ev->type() == TQEvent::LayoutHint )
{
updateLayout();
return true;
}
else
- return QFrame::event( ev );
+ return TQFrame::event( ev );
}
-bool KNote::eventFilter( QObject *o, QEvent *ev )
+bool KNote::eventFilter( TQObject *o, TQEvent *ev )
{
- if ( ev->type() == QEvent::DragEnter &&
- KColorDrag::canDecode( static_cast<QDragEnterEvent *>(ev) ) )
+ if ( ev->type() == TQEvent::DragEnter &&
+ KColorDrag::canDecode( static_cast<TQDragEnterEvent *>(ev) ) )
{
- dragEnterEvent( static_cast<QDragEnterEvent *>(ev) );
+ dragEnterEvent( static_cast<TQDragEnterEvent *>(ev) );
return true;
}
- if ( ev->type() == QEvent::Drop &&
- KColorDrag::canDecode( static_cast<QDropEvent *>(ev) ) )
+ if ( ev->type() == TQEvent::Drop &&
+ KColorDrag::canDecode( static_cast<TQDropEvent *>(ev) ) )
{
- dropEvent( static_cast<QDropEvent *>(ev) );
+ dropEvent( static_cast<TQDropEvent *>(ev) );
return true;
}
if ( o == m_label )
{
- QMouseEvent *e = (QMouseEvent *)ev;
+ TQMouseEvent *e = (TQMouseEvent *)ev;
- if ( ev->type() == QEvent::MouseButtonDblClick )
+ if ( ev->type() == TQEvent::MouseButtonDblClick )
slotRename();
- if ( ev->type() == QEvent::MouseButtonPress &&
+ if ( ev->type() == TQEvent::MouseButtonPress &&
(e->button() == LeftButton || e->button() == MidButton))
{
e->button() == LeftButton ? KWin::raiseWindow( winId() )
@@ -1283,7 +1283,7 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
}
#if KDE_IS_VERSION( 3, 5, 1 )
- if ( ev->type() == QEvent::MouseButtonRelease )
+ if ( ev->type() == TQEvent::MouseButtonRelease )
{
NETRootInfo wm_root( qt_xdisplay(), NET::WMMoveResize );
wm_root.moveResizeRequest( winId(), e->globalX(), e->globalY(), NET::MoveResizeCancel );
@@ -1291,10 +1291,10 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
}
#endif
- if ( m_menu && ( ev->type() == QEvent::MouseButtonPress )
+ if ( m_menu && ( ev->type() == TQEvent::MouseButtonPress )
&& ( e->button() == RightButton ) )
{
- m_menu->popup( QCursor::pos() );
+ m_menu->popup( TQCursor::pos() );
return true;
}
@@ -1303,18 +1303,18 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
if ( o == m_editor )
{
- if ( ev->type() == QEvent::FocusOut )
+ if ( ev->type() == TQEvent::FocusOut )
{
- QFocusEvent *fe = static_cast<QFocusEvent *>(ev);
- if ( fe->reason() != QFocusEvent::Popup &&
- fe->reason() != QFocusEvent::Mouse )
+ TQFocusEvent *fe = static_cast<TQFocusEvent *>(ev);
+ if ( fe->reason() != TQFocusEvent::Popup &&
+ fe->reason() != TQFocusEvent::Mouse )
{
updateFocus();
if ( m_editor->isModified() )
saveData();
}
}
- else if ( ev->type() == QEvent::FocusIn )
+ else if ( ev->type() == TQEvent::FocusIn )
updateFocus();
return false;
@@ -1323,10 +1323,10 @@ bool KNote::eventFilter( QObject *o, QEvent *ev )
if ( o == m_editor->viewport() )
{
if ( m_edit_menu &&
- ev->type() == QEvent::MouseButtonPress &&
- ((QMouseEvent *)ev)->button() == RightButton )
+ ev->type() == TQEvent::MouseButtonPress &&
+ ((TQMouseEvent *)ev)->button() == RightButton )
{
- m_edit_menu->popup( QCursor::pos() );
+ m_edit_menu->popup( TQCursor::pos() );
return true;
}
}
diff --git a/knotes/knote.h b/knotes/knote.h
index 0309f59d7..0f15bf4ba 100644
--- a/knotes/knote.h
+++ b/knotes/knote.h
@@ -21,11 +21,11 @@
#ifndef KNOTE_H
#define KNOTE_H
-#include <qstring.h>
-#include <qevent.h>
-#include <qframe.h>
-#include <qpoint.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
#include <kconfig.h>
#include <kxmlguiclient.h>
@@ -48,37 +48,37 @@ namespace KCal {
}
-class KNote : public QFrame, virtual public KXMLGUIClient
+class KNote : public TQFrame, virtual public KXMLGUIClient
{
Q_OBJECT
public:
- KNote( QDomDocument buildDoc, KCal::Journal *journal, QWidget *parent = 0,
+ KNote( TQDomDocument buildDoc, KCal::Journal *journal, TQWidget *parent = 0,
const char *name = 0 );
~KNote();
void saveData();
void saveConfig() const;
- QString noteId() const;
+ TQString noteId() const;
- QString name() const;
- QString text() const;
- QString plainText() const;
+ TQString name() const;
+ TQString text() const;
+ TQString plainText() const;
- void setName( const QString& name );
- void setText( const QString& text );
+ void setName( const TQString& name );
+ void setText( const TQString& text );
- QColor fgColor() const;
- QColor bgColor() const;
- void setColor( const QColor& fg, const QColor& bg );
+ TQColor fgColor() const;
+ TQColor bgColor() const;
+ void setColor( const TQColor& fg, const TQColor& bg );
- void find( const QString& pattern, long options );
+ void find( const TQString& pattern, long options );
bool isModified() const;
- void sync( const QString& app );
- bool isNew( const QString& app ) const;
- bool isModified( const QString& app ) const;
+ void sync( const TQString& app );
+ bool isNew( const TQString& app ) const;
+ bool isModified( const TQString& app ) const;
static void setStyle( int style );
@@ -96,15 +96,15 @@ signals:
void sigFindFinished();
protected:
- virtual void drawFrame( QPainter* );
- virtual void showEvent( QShowEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void closeEvent( QCloseEvent* );
- virtual void dropEvent( QDropEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
+ virtual void drawFrame( TQPainter* );
+ virtual void showEvent( TQShowEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void closeEvent( TQCloseEvent* );
+ virtual void dropEvent( TQDropEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
- virtual bool event( QEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool event( TQEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
virtual bool focusNextPrevChild( bool );
@@ -125,7 +125,7 @@ private slots:
void slotPopupActionToDesktop( int id );
void slotFindNext();
- void slotHighlight( const QString& txt, int idx, int len );
+ void slotHighlight( const TQString& txt, int idx, int len );
void slotApplyConfig();
void slotUpdateKeepAboveBelow();
@@ -145,10 +145,10 @@ private:
void toDesktop( int desktop );
- QString toPlainText( const QString& );
+ TQString toPlainText( const TQString& );
private:
- QLabel *m_label, *m_pushpin, *m_fold;
+ TQLabel *m_label, *m_pushpin, *m_fold;
KNoteButton *m_button;
KToolBar *m_tool;
KNoteEdit *m_editor;
diff --git a/knotes/knotealarmdlg.cpp b/knotes/knotealarmdlg.cpp
index 0acd44214..ef71c0f51 100644
--- a/knotes/knotealarmdlg.cpp
+++ b/knotes/knotealarmdlg.cpp
@@ -29,10 +29,10 @@
your version.
*******************************************************************/
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqvbox.h>
#include <klocale.h>
@@ -45,33 +45,33 @@
#include "knotealarmdlg.h"
-KNoteAlarmDlg::KNoteAlarmDlg( const QString& caption, QWidget *parent, const char *name )
+KNoteAlarmDlg::KNoteAlarmDlg( const TQString& caption, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok )
{
- QVBox *page = makeVBoxMainWidget();
- QGroupBox *group = new QGroupBox( 3, Vertical, i18n("Scheduled Alarm"), page );
- m_buttons = new QButtonGroup( page );
+ TQVBox *page = makeVBoxMainWidget();
+ TQGroupBox *group = new TQGroupBox( 3, Vertical, i18n("Scheduled Alarm"), page );
+ m_buttons = new TQButtonGroup( page );
m_buttons->hide();
- QRadioButton *none = new QRadioButton( i18n("&No alarm"), group );
+ TQRadioButton *none = new TQRadioButton( i18n("&No alarm"), group );
m_buttons->insert( none );
- QHBox *at = new QHBox( group );
- QRadioButton *label_at = new QRadioButton( i18n("Alarm &at:"), at );
+ TQHBox *at = new TQHBox( group );
+ TQRadioButton *label_at = new TQRadioButton( i18n("Alarm &at:"), at );
m_buttons->insert( label_at );
m_atDate = new KDateEdit( at );
m_atTime = new KTimeEdit( at );
at->setStretchFactor( m_atDate, 1 );
- QHBox *in = new QHBox( group );
- QRadioButton *label_in = new QRadioButton( i18n("Alarm &in:"), in );
+ TQHBox *in = new TQHBox( group );
+ TQRadioButton *label_in = new TQRadioButton( i18n("Alarm &in:"), in );
m_buttons->insert( label_in );
m_inTime = new KTimeEdit( in );
- QLabel *in_min = new QLabel( i18n("hours/minutes"), in );
+ TQLabel *in_min = new TQLabel( i18n("hours/minutes"), in );
label_in->setEnabled( false ); // TODO
- connect( m_buttons, SIGNAL(clicked( int )), SLOT(slotButtonChanged( int )) );
+ connect( m_buttons, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotButtonChanged( int )) );
}
@@ -140,7 +140,7 @@ void KNoteAlarmDlg::slotOk()
alarm = m_journal->alarms().first();
if ( m_buttons->selectedId() == 1 )
- alarm->setTime( QDateTime( m_atDate->date(), m_atTime->getTime() ) );
+ alarm->setTime( TQDateTime( m_atDate->date(), m_atTime->getTime() ) );
else
{
// TODO
diff --git a/knotes/knotealarmdlg.h b/knotes/knotealarmdlg.h
index e39f81869..ba001af7d 100644
--- a/knotes/knotealarmdlg.h
+++ b/knotes/knotealarmdlg.h
@@ -47,7 +47,7 @@ class KNoteAlarmDlg : public KDialogBase
{
Q_OBJECT
public:
- KNoteAlarmDlg( const QString& caption, QWidget *parent=0, const char *name=0 );
+ KNoteAlarmDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
void setIncidence( KCal::Journal *journal );
@@ -58,7 +58,7 @@ private slots:
void slotButtonChanged( int id );
private:
- QButtonGroup *m_buttons;
+ TQButtonGroup *m_buttons;
KCal::Journal *m_journal;
KDateEdit *m_atDate;
diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp
index 372510010..b6cf49bc4 100644
--- a/knotes/knotebutton.cpp
+++ b/knotes/knotebutton.cpp
@@ -18,10 +18,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qsizepolicy.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqsizepolicy.h>
#include <kglobal.h>
#include <kicontheme.h>
@@ -30,11 +30,11 @@
#include "knotebutton.h"
-KNoteButton::KNoteButton( const QString& icon, QWidget *parent, const char *name )
- : QPushButton( parent, name )
+KNoteButton::KNoteButton( const TQString& icon, TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
setFocusPolicy( NoFocus );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
m_flat = true;
@@ -46,55 +46,55 @@ KNoteButton::~KNoteButton()
{
}
-void KNoteButton::enterEvent( QEvent * )
+void KNoteButton::enterEvent( TQEvent * )
{
m_flat = false;
repaint( false );
}
-void KNoteButton::leaveEvent( QEvent * )
+void KNoteButton::leaveEvent( TQEvent * )
{
m_flat = true;
repaint();
}
-QSize KNoteButton::sizeHint() const
+TQSize KNoteButton::sizeHint() const
{
- return QSize( QPushButton::sizeHint().height(), QPushButton::sizeHint().height() );
+ return TQSize( TQPushButton::sizeHint().height(), TQPushButton::sizeHint().height() );
}
-void KNoteButton::drawButton( QPainter* p )
+void KNoteButton::drawButton( TQPainter* p )
{
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( isDown() )
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
if ( isOn() )
- flags |= QStyle::Style_On;
+ flags |= TQStyle::Style_On;
if ( !isFlat() && !isDown() )
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
if ( !m_flat )
- flags |= QStyle::Style_MouseOver;
+ flags |= TQStyle::Style_MouseOver;
- style().drawPrimitive( QStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
+ style().drawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags );
drawButtonLabel( p );
}
-void KNoteButton::drawButtonLabel( QPainter* p )
+void KNoteButton::drawButtonLabel( TQPainter* p )
{
if ( iconSet() && !iconSet()->isNull() )
{
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if ( isEnabled() )
- mode = hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if ( isToggleButton() && isOn() )
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pix = iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pix = iconSet()->pixmap( TQIconSet::Small, mode, state );
int dx = ( width() - pix.width() ) / 2;
int dy = ( height() - pix.height() ) / 2;
@@ -102,8 +102,8 @@ void KNoteButton::drawButtonLabel( QPainter* p )
// Shift button contents if pushed.
if ( isOn() || isDown() )
{
- dx += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this );
- dy += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this );
+ dx += style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal, this );
+ dy += style().pixelMetric( TQStyle::PM_ButtonShiftVertical, this );
}
p->drawPixmap( dx, dy, pix );
diff --git a/knotes/knotebutton.h b/knotes/knotebutton.h
index 9d0d2baa6..19ffe9b84 100644
--- a/knotes/knotebutton.h
+++ b/knotes/knotebutton.h
@@ -21,7 +21,7 @@
#ifndef KNOTEBUTTON_H
#define KNOTEBUTTON_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
class QPainter;
class QEvent;
@@ -32,17 +32,17 @@ class KNoteButton: public QPushButton
{
Q_OBJECT
public:
- KNoteButton( const QString& icon, QWidget *parent=0, const char *name=0 );
+ KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 );
~KNoteButton();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
- virtual void drawButton( QPainter *p );
- virtual void drawButtonLabel( QPainter *p );
+ virtual void drawButton( TQPainter *p );
+ virtual void drawButtonLabel( TQPainter *p );
private:
bool m_flat;
diff --git a/knotes/knoteconfigdlg.cpp b/knotes/knoteconfigdlg.cpp
index 334ec37bd..a1238768b 100644
--- a/knotes/knoteconfigdlg.cpp
+++ b/knotes/knoteconfigdlg.cpp
@@ -18,12 +18,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qhgroupbox.h>
-#include <qtabwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqhgroupbox.h>
+#include <tqtabwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,8 +41,8 @@
#include "version.h"
-KNoteConfigDlg::KNoteConfigDlg( KNoteConfig *config, const QString& title,
- QWidget *parent, const char *name )
+KNoteConfigDlg::KNoteConfigDlg( KNoteConfig *config, const TQString& title,
+ TQWidget *parent, const char *name )
: KConfigDialog( parent, name, config ? config : KNotesGlobalConfig::self(), IconList,
config ? Default|Ok|Apply|Cancel : Default|Ok|Cancel, Ok )
{
@@ -86,32 +86,32 @@ void KNoteConfigDlg::slotUpdateCaption()
setCaption( note->name() );
}
-QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
+TQWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
{
- QWidget *displayPage = new QWidget();
- QGridLayout *layout = new QGridLayout( displayPage, 2, 2,
+ TQWidget *displayPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( displayPage, 2, 2,
defaults ? marginHint() : 0, spacingHint() );
- QLabel *label_FgColor = new QLabel( i18n("&Text color:"), displayPage, "label_FgColor" );
+ TQLabel *label_FgColor = new TQLabel( i18n("&Text color:"), displayPage, "label_FgColor" );
layout->addWidget( label_FgColor, 0, 0 );
KColorButton *kcfg_FgColor = new KColorButton( displayPage, "kcfg_FgColor" );
label_FgColor->setBuddy( kcfg_FgColor );
layout->addWidget( kcfg_FgColor, 0, 1 );
- QLabel *label_BgColor = new QLabel( i18n("&Background color:"), displayPage, "label_BgColor" );
+ TQLabel *label_BgColor = new TQLabel( i18n("&Background color:"), displayPage, "label_BgColor" );
layout->addWidget( label_BgColor, 1, 0 );
KColorButton *kcfg_BgColor = new KColorButton( displayPage, "kcfg_BgColor" );
label_BgColor->setBuddy( kcfg_BgColor );
layout->addWidget( kcfg_BgColor, 1, 1 );
- QCheckBox *kcfg_ShowInTaskbar = new QCheckBox( i18n("&Show note in taskbar"),
+ TQCheckBox *kcfg_ShowInTaskbar = new TQCheckBox( i18n("&Show note in taskbar"),
displayPage, "kcfg_ShowInTaskbar" );
if ( defaults )
{
- QLabel *label_Width = new QLabel( i18n("Default &width:"), displayPage, "label_Width" );
+ TQLabel *label_Width = new TQLabel( i18n("Default &width:"), displayPage, "label_Width" );
layout->addWidget( label_Width, 2, 0 );
KIntNumInput *kcfg_Width = new KIntNumInput( displayPage, "kcfg_Width" );
@@ -119,7 +119,7 @@ QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
kcfg_Width->setRange( 50, 2000, 10, false );
layout->addWidget( kcfg_Width, 2, 1 );
- QLabel *label_Height = new QLabel( i18n("Default &height:"), displayPage, "label_Height" );
+ TQLabel *label_Height = new TQLabel( i18n("Default &height:"), displayPage, "label_Height" );
layout->addWidget( label_Height, 3, 0 );
KIntNumInput *kcfg_Height = new KIntNumInput( displayPage, "kcfg_Height" );
@@ -135,13 +135,13 @@ QWidget *KNoteConfigDlg::makeDisplayPage( bool defaults )
return displayPage;
}
-QWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
+TQWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
{
- QWidget *editorPage = new QWidget();
- QGridLayout *layout = new QGridLayout( editorPage, 4, 3,
+ TQWidget *editorPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( editorPage, 4, 3,
defaults ? marginHint() : 0, spacingHint() );
- QLabel *label_TabSize = new QLabel( i18n( "&Tab size:" ), editorPage, "label_TabSize" );
+ TQLabel *label_TabSize = new TQLabel( i18n( "&Tab size:" ), editorPage, "label_TabSize" );
layout->addMultiCellWidget( label_TabSize, 0, 0, 0, 1 );
KIntNumInput *kcfg_TabSize = new KIntNumInput( editorPage, "kcfg_TabSize" );
@@ -149,44 +149,44 @@ QWidget *KNoteConfigDlg::makeEditorPage( bool defaults )
label_TabSize->setBuddy( kcfg_TabSize );
layout->addWidget( kcfg_TabSize, 0, 2 );
- QCheckBox *kcfg_AutoIndent = new QCheckBox( i18n("Auto &indent"), editorPage, "kcfg_AutoIndent" );
+ TQCheckBox *kcfg_AutoIndent = new TQCheckBox( i18n("Auto &indent"), editorPage, "kcfg_AutoIndent" );
layout->addMultiCellWidget( kcfg_AutoIndent, 1, 1, 0, 1 );
- QCheckBox *kcfg_RichText = new QCheckBox( i18n("&Rich text"), editorPage, "kcfg_RichText" );
+ TQCheckBox *kcfg_RichText = new TQCheckBox( i18n("&Rich text"), editorPage, "kcfg_RichText" );
layout->addWidget( kcfg_RichText, 1, 2 );
- QLabel *label_Font = new QLabel( i18n("Text font:"), editorPage, "label_Font" );
+ TQLabel *label_Font = new TQLabel( i18n("Text font:"), editorPage, "label_Font" );
layout->addWidget( label_Font, 3, 0 );
KFontRequester *kcfg_Font = new KFontRequester( editorPage, "kcfg_Font" );
- kcfg_Font->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+ kcfg_Font->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
layout->addMultiCellWidget( kcfg_Font, 3, 3, 1, 2 );
- QLabel *label_TitleFont = new QLabel( i18n("Title font:"), editorPage, "label_TitleFont" );
+ TQLabel *label_TitleFont = new TQLabel( i18n("Title font:"), editorPage, "label_TitleFont" );
layout->addWidget( label_TitleFont, 2, 0 );
KFontRequester *kcfg_TitleFont = new KFontRequester( editorPage, "kcfg_TitleFont" );
- kcfg_TitleFont->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+ kcfg_TitleFont->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
layout->addMultiCellWidget( kcfg_TitleFont, 2, 2, 1, 2 );
return editorPage;
}
-QWidget *KNoteConfigDlg::makeDefaultsPage()
+TQWidget *KNoteConfigDlg::makeDefaultsPage()
{
- QTabWidget *defaultsPage = new QTabWidget();
+ TQTabWidget *defaultsPage = new TQTabWidget();
defaultsPage->addTab( makeDisplayPage( true ), SmallIconSet( "knotes" ), i18n("Displa&y") );
defaultsPage->addTab( makeEditorPage( true ), SmallIconSet( "edit" ), i18n("&Editor") );
return defaultsPage;
}
-QWidget *KNoteConfigDlg::makeActionsPage()
+TQWidget *KNoteConfigDlg::makeActionsPage()
{
- QWidget *actionsPage = new QWidget();
- QGridLayout *layout = new QGridLayout( actionsPage, 2, 2, 0, spacingHint() );
+ TQWidget *actionsPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( actionsPage, 2, 2, 0, spacingHint() );
- QLabel *label_MailAction = new QLabel( i18n("&Mail action:"), actionsPage, "label_MailAction" );
+ TQLabel *label_MailAction = new TQLabel( i18n("&Mail action:"), actionsPage, "label_MailAction" );
layout->addWidget( label_MailAction, 0, 0 );
KLineEdit *kcfg_MailAction = new KLineEdit( actionsPage, "kcfg_MailAction" );
@@ -196,24 +196,24 @@ QWidget *KNoteConfigDlg::makeActionsPage()
return actionsPage;
}
-QWidget *KNoteConfigDlg::makeNetworkPage()
+TQWidget *KNoteConfigDlg::makeNetworkPage()
{
- QWidget *networkPage = new QWidget();
- QGridLayout *layout = new QGridLayout( networkPage, 4, 2, 0, spacingHint() );
+ TQWidget *networkPage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( networkPage, 4, 2, 0, spacingHint() );
- QGroupBox *incoming = new QHGroupBox( i18n("Incoming Notes"), networkPage );
+ TQGroupBox *incoming = new TQHGroupBox( i18n("Incoming Notes"), networkPage );
layout->addMultiCellWidget( incoming, 0, 0, 0, 1 );
- new QCheckBox( i18n("Accept incoming notes"), incoming, "kcfg_ReceiveNotes" );
+ new TQCheckBox( i18n("Accept incoming notes"), incoming, "kcfg_ReceiveNotes" );
- QGroupBox *outgoing = new QHGroupBox( i18n("Outgoing Notes"), networkPage );
+ TQGroupBox *outgoing = new TQHGroupBox( i18n("Outgoing Notes"), networkPage );
layout->addMultiCellWidget( outgoing, 1, 1, 0, 1 );
- QLabel *label_SenderID = new QLabel( i18n("&Sender ID:"), outgoing, "label_SenderID" );
+ TQLabel *label_SenderID = new TQLabel( i18n("&Sender ID:"), outgoing, "label_SenderID" );
KLineEdit *kcfg_SenderID = new KLineEdit( outgoing, "kcfg_SenderID" );
label_SenderID->setBuddy( kcfg_SenderID );
- QLabel *label_Port = new QLabel( i18n("&Port:"), networkPage, "label_Port" );
+ TQLabel *label_Port = new TQLabel( i18n("&Port:"), networkPage, "label_Port" );
layout->addWidget( label_Port, 2, 0 );
KIntNumInput *kcfg_Port = new KIntNumInput( networkPage, "kcfg_Port" );
@@ -224,16 +224,16 @@ QWidget *KNoteConfigDlg::makeNetworkPage()
return networkPage;
}
-QWidget *KNoteConfigDlg::makeStylePage()
+TQWidget *KNoteConfigDlg::makeStylePage()
{
- QWidget *stylePage = new QWidget();
- QGridLayout *layout = new QGridLayout( stylePage, 2, 2, 0, spacingHint() );
+ TQWidget *stylePage = new TQWidget();
+ TQGridLayout *layout = new TQGridLayout( stylePage, 2, 2, 0, spacingHint() );
- QLabel *label_Style = new QLabel( i18n("&Style:"), stylePage, "label_Style" );
+ TQLabel *label_Style = new TQLabel( i18n("&Style:"), stylePage, "label_Style" );
layout->addWidget( label_Style, 0, 0 );
- QComboBox *kcfg_Style = new QComboBox( stylePage, "kcfg_Style" );
- QStringList list;
+ TQComboBox *kcfg_Style = new TQComboBox( stylePage, "kcfg_Style" );
+ TQStringList list;
list << "Plain" << "Fancy";
kcfg_Style->insertStringList( list );
label_Style->setBuddy( kcfg_Style );
diff --git a/knotes/knoteconfigdlg.h b/knotes/knoteconfigdlg.h
index 2232b5e93..9a44a12a9 100644
--- a/knotes/knoteconfigdlg.h
+++ b/knotes/knoteconfigdlg.h
@@ -31,21 +31,21 @@ class KNoteConfigDlg : public KConfigDialog
{
Q_OBJECT
public:
- KNoteConfigDlg( KNoteConfig *config, const QString &title,
- QWidget *parent=0, const char *name=0 );
+ KNoteConfigDlg( KNoteConfig *config, const TQString &title,
+ TQWidget *parent=0, const char *name=0 );
~KNoteConfigDlg();
public slots:
void slotUpdateCaption();
protected:
- QWidget *makeDisplayPage( bool );
- QWidget *makeEditorPage( bool );
+ TQWidget *makeDisplayPage( bool );
+ TQWidget *makeEditorPage( bool );
- QWidget *makeDefaultsPage();
- QWidget *makeActionsPage();
- QWidget *makeNetworkPage();
- QWidget *makeStylePage();
+ TQWidget *makeDefaultsPage();
+ TQWidget *makeActionsPage();
+ TQWidget *makeNetworkPage();
+ TQWidget *makeStylePage();
};
#endif
diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp
index 2398df19f..7df68149c 100644
--- a/knotes/knoteedit.cpp
+++ b/knotes/knoteedit.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qdragobject.h>
-#include <qfont.h>
+#include <tqdragobject.h>
+#include <tqfont.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,7 +34,7 @@ static const short SEP = 5;
static const short ICON_SIZE = 10;
-KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *name )
+KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *parent, const char *name )
: KTextEdit( parent, name )
{
setAcceptDrops( true );
@@ -43,27 +43,27 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
setLinkUnderline( true );
// create the actions for the RMB menu
- KAction* undo = KStdAction::undo( this, SLOT(undo()), actions );
- KAction* redo = KStdAction::redo( this, SLOT(redo()), actions );
+ KAction* undo = KStdAction::undo( this, TQT_SLOT(undo()), actions );
+ KAction* redo = KStdAction::redo( this, TQT_SLOT(redo()), actions );
undo->setEnabled( isUndoAvailable() );
redo->setEnabled( isRedoAvailable() );
- m_cut = KStdAction::cut( this, SLOT(cut()), actions );
- m_copy = KStdAction::copy( this, SLOT(copy()), actions );
- m_paste = KStdAction::paste( this, SLOT(paste()), actions );
+ m_cut = KStdAction::cut( this, TQT_SLOT(cut()), actions );
+ m_copy = KStdAction::copy( this, TQT_SLOT(copy()), actions );
+ m_paste = KStdAction::paste( this, TQT_SLOT(paste()), actions );
m_cut->setEnabled( false );
m_copy->setEnabled( false );
m_paste->setEnabled( true );
- connect( this, SIGNAL(undoAvailable(bool)), undo, SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(redoAvailable(bool)), redo, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(undoAvailable(bool)), undo, TQT_SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(redoAvailable(bool)), redo, TQT_SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(copyAvailable(bool)), m_cut, SLOT(setEnabled(bool)) );
- connect( this, SIGNAL(copyAvailable(bool)), m_copy, SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(copyAvailable(bool)), m_cut, TQT_SLOT(setEnabled(bool)) );
+ connect( this, TQT_SIGNAL(copyAvailable(bool)), m_copy, TQT_SLOT(setEnabled(bool)) );
- new KAction( KStdGuiItem::clear(), 0, this, SLOT(clear()), actions, "edit_clear" );
- KStdAction::selectAll( this, SLOT(selectAll()), actions );
+ new KAction( KStdGuiItem::clear(), 0, this, TQT_SLOT(clear()), actions, "edit_clear" );
+ KStdAction::selectAll( this, TQT_SLOT(selectAll()), actions );
// create the actions modifying the text format
m_textBold = new KToggleAction( i18n("Bold"), "text_bold", CTRL + Key_B, 0, 0,
@@ -75,23 +75,23 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
m_textStrikeOut = new KToggleAction( i18n("Strike Out"), "text_strike", CTRL + Key_S, 0, 0,
actions, "format_strikeout" );
- connect( m_textBold, SIGNAL(toggled(bool)), SLOT(setBold(bool)) );
- connect( m_textItalic, SIGNAL(toggled(bool)), SLOT(setItalic(bool)) );
- connect( m_textUnderline, SIGNAL(toggled(bool)), SLOT(setUnderline(bool)) );
- connect( m_textStrikeOut, SIGNAL(toggled(bool)), SLOT(textStrikeOut(bool)) );
+ connect( m_textBold, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setBold(bool)) );
+ connect( m_textItalic, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setItalic(bool)) );
+ connect( m_textUnderline, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setUnderline(bool)) );
+ connect( m_textStrikeOut, TQT_SIGNAL(toggled(bool)), TQT_SLOT(textStrikeOut(bool)) );
m_textAlignLeft = new KToggleAction( i18n("Align Left"), "text_left", ALT + Key_L,
- this, SLOT(textAlignLeft()),
+ this, TQT_SLOT(textAlignLeft()),
actions, "format_alignleft" );
m_textAlignLeft->setChecked( true ); // just a dummy, will be updated later
m_textAlignCenter = new KToggleAction( i18n("Align Center"), "text_center", ALT + Key_C,
- this, SLOT(textAlignCenter()),
+ this, TQT_SLOT(textAlignCenter()),
actions, "format_aligncenter" );
m_textAlignRight = new KToggleAction( i18n("Align Right"), "text_right", ALT + Key_R,
- this, SLOT(textAlignRight()),
+ this, TQT_SLOT(textAlignRight()),
actions, "format_alignright" );
m_textAlignBlock = new KToggleAction( i18n("Align Block"), "text_block", ALT + Key_B,
- this, SLOT(textAlignBlock()),
+ this, TQT_SLOT(textAlignBlock()),
actions, "format_alignblock" );
m_textAlignLeft->setExclusiveGroup( "align" );
@@ -100,16 +100,16 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
m_textAlignBlock->setExclusiveGroup( "align" );
m_textList = new KToggleAction( i18n("List"), "enum_list", 0,
- this, SLOT(textList()),
+ this, TQT_SLOT(textList()),
actions, "format_list" );
m_textList->setExclusiveGroup( "style" );
m_textSuper = new KToggleAction( i18n("Superscript"), "text_super", 0,
- this, SLOT(textSuperScript()),
+ this, TQT_SLOT(textSuperScript()),
actions, "format_super" );
m_textSub = new KToggleAction( i18n("Subscript"), "text_sub", 0,
- this, SLOT(textSubScript()),
+ this, TQT_SLOT(textSubScript()),
actions, "format_sub" );
m_textSuper->setExclusiveGroup( "valign" );
@@ -118,53 +118,53 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, QWidget *parent, const char *n
// There is no easy possibility to implement text indenting with QTextEdit
//
// m_textIncreaseIndent = new KAction( i18n("Increase Indent"), "format_increaseindent", 0,
-// this, SLOT(textIncreaseIndent()),
+// this, TQT_SLOT(textIncreaseIndent()),
// actions, "format_increaseindent" );
//
// m_textDecreaseIndent = new KAction( i18n("Decrease Indent"), "format_decreaseindent", 0,
-// this, SLOT(textDecreaseIndent()),
+// this, TQT_SLOT(textDecreaseIndent()),
// actions, "format_decreaseindent" );
- QPixmap pix( ICON_SIZE, ICON_SIZE );
+ TQPixmap pix( ICON_SIZE, ICON_SIZE );
pix.fill( black ); // just a dummy, gets updated before widget is shown
m_textColor = new KAction( i18n("Text Color..."), pix, 0, this,
- SLOT(textColor()), actions, "format_color" );
+ TQT_SLOT(textColor()), actions, "format_color" );
m_textFont = new KFontAction( i18n("Text Font"), "text", KKey(),
actions, "format_font" );
- connect( m_textFont, SIGNAL(activated( const QString & )),
- this, SLOT(setFamily( const QString & )) );
+ connect( m_textFont, TQT_SIGNAL(activated( const TQString & )),
+ this, TQT_SLOT(setFamily( const TQString & )) );
m_textSize = new KFontSizeAction( i18n("Text Size"), KKey(),
actions, "format_size" );
- connect( m_textSize, SIGNAL(fontSizeChanged( int )),
- this, SLOT(setPointSize( int )) );
-
- // QTextEdit connections
- connect( this, SIGNAL(returnPressed()), SLOT(slotReturnPressed()) );
- connect( this, SIGNAL(currentFontChanged( const QFont & )),
- this, SLOT(fontChanged( const QFont & )) );
- connect( this, SIGNAL(currentColorChanged( const QColor & )),
- this, SLOT(colorChanged( const QColor & )) );
- connect( this, SIGNAL(currentAlignmentChanged( int )),
- this, SLOT(alignmentChanged( int )) );
- connect( this, SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )),
- this, SLOT(verticalAlignmentChanged( VerticalAlignment )) );
+ connect( m_textSize, TQT_SIGNAL(fontSizeChanged( int )),
+ this, TQT_SLOT(setPointSize( int )) );
+
+ // TQTextEdit connections
+ connect( this, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()) );
+ connect( this, TQT_SIGNAL(currentFontChanged( const TQFont & )),
+ this, TQT_SLOT(fontChanged( const TQFont & )) );
+ connect( this, TQT_SIGNAL(currentColorChanged( const TQColor & )),
+ this, TQT_SLOT(colorChanged( const TQColor & )) );
+ connect( this, TQT_SIGNAL(currentAlignmentChanged( int )),
+ this, TQT_SLOT(alignmentChanged( int )) );
+ connect( this, TQT_SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )),
+ this, TQT_SLOT(verticalAlignmentChanged( VerticalAlignment )) );
}
KNoteEdit::~KNoteEdit()
{
}
-void KNoteEdit::setText( const QString& text )
+void KNoteEdit::setText( const TQString& text )
{
- // to update the font and font size combo box - QTextEdit stopped
+ // to update the font and font size combo box - TQTextEdit stopped
// emitting the currentFontChanged signal with the new optimizations
KTextEdit::setText( text );
fontChanged( currentFont() );
}
-void KNoteEdit::setTextFont( const QFont& font )
+void KNoteEdit::setTextFont( const TQFont& font )
{
if ( textFormat() == PlainText )
setFont( font );
@@ -172,7 +172,7 @@ void KNoteEdit::setTextFont( const QFont& font )
setCurrentFont( font );
}
-void KNoteEdit::setTextColor( const QColor& color )
+void KNoteEdit::setTextColor( const TQColor& color )
{
setColor( color );
colorChanged( color );
@@ -180,7 +180,7 @@ void KNoteEdit::setTextColor( const QColor& color )
void KNoteEdit::setTabStop( int tabs )
{
- QFontMetrics fm( font() );
+ TQFontMetrics fm( font() );
setTabStopWidth( fm.width( 'x' ) * tabs );
}
@@ -199,12 +199,12 @@ void KNoteEdit::setTextFormat( TextFormat f )
if ( f == RichText )
{
- QString t = text();
+ TQString t = text();
KTextEdit::setTextFormat( f );
// if the note contains html/xml source try to display it, otherwise
// get the modified text again and set it to preserve newlines
- if ( QStyleSheet::mightBeRichText( t ) )
+ if ( TQStyleSheet::mightBeRichText( t ) )
setText( t );
else
setText( text() );
@@ -214,7 +214,7 @@ void KNoteEdit::setTextFormat( TextFormat f )
else
{
KTextEdit::setTextFormat( f );
- QString t = text();
+ TQString t = text();
setText( t );
disableRichTextActions();
@@ -223,9 +223,9 @@ void KNoteEdit::setTextFormat( TextFormat f )
void KNoteEdit::textStrikeOut( bool s )
{
- // QTextEdit does not support stroke out text (no saving,
+ // TQTextEdit does not support stroke out text (no saving,
// no changing of more than one selected character)
- QFont font;
+ TQFont font;
if ( !hasSelectedText() )
{
@@ -269,9 +269,9 @@ void KNoteEdit::textStrikeOut( bool s )
void KNoteEdit::textColor()
{
- QColor c = color();
+ TQColor c = color();
int ret = KColorDialog::getColor( c, this );
- if ( ret == QDialog::Accepted )
+ if ( ret == TQDialog::Accepted )
setTextColor( c );
}
@@ -302,9 +302,9 @@ void KNoteEdit::textAlignBlock()
void KNoteEdit::textList()
{
if ( m_textList->isChecked() )
- setParagType( QStyleSheetItem::DisplayListItem, QStyleSheetItem::ListDisc );
+ setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDisc );
else
- setParagType( QStyleSheetItem::DisplayBlock, QStyleSheetItem::ListDisc );
+ setParagType( TQStyleSheetItem::DisplayBlock, TQStyleSheetItem::ListDisc );
}
void KNoteEdit::textSuperScript()
@@ -334,7 +334,7 @@ void KNoteEdit::textSubScript()
/** protected methods **/
-void KNoteEdit::contentsDragEnterEvent( QDragEnterEvent *e )
+void KNoteEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( KURLDrag::canDecode( e ) )
e->accept();
@@ -342,7 +342,7 @@ void KNoteEdit::contentsDragEnterEvent( QDragEnterEvent *e )
KTextEdit::contentsDragEnterEvent( e );
}
-void KNoteEdit::contentsDropEvent( QDropEvent *e )
+void KNoteEdit::contentsDropEvent( TQDropEvent *e )
{
KURL::List list;
@@ -366,7 +366,7 @@ void KNoteEdit::slotReturnPressed()
autoIndent();
}
-void KNoteEdit::fontChanged( const QFont &f )
+void KNoteEdit::fontChanged( const TQFont &f )
{
m_textFont->setFont( f.family() );
m_textSize->setFontSize( f.pointSize() );
@@ -377,9 +377,9 @@ void KNoteEdit::fontChanged( const QFont &f )
m_textStrikeOut->setChecked( f.strikeOut() );
}
-void KNoteEdit::colorChanged( const QColor &c )
+void KNoteEdit::colorChanged( const TQColor &c )
{
- QPixmap pix( ICON_SIZE, ICON_SIZE );
+ TQPixmap pix( ICON_SIZE, ICON_SIZE );
pix.fill( c );
m_textColor->setIconSet( pix );
}
@@ -416,7 +416,7 @@ void KNoteEdit::verticalAlignmentChanged( VerticalAlignment a )
void KNoteEdit::autoIndent()
{
int para, index;
- QString string;
+ TQString string;
getCursorPosition( &para, &index );
while ( para > 0 && string.stripWhiteSpace().isEmpty() )
string = text( --para );
@@ -428,7 +428,7 @@ void KNoteEdit::autoIndent()
// character in string.
// It is assumed that string contains at least one non whitespace character
// ie \n \r \t \v \f and space
- QString indentString;
+ TQString indentString;
int len = string.length();
int i = 0;
@@ -439,7 +439,7 @@ void KNoteEdit::autoIndent()
insert( indentString );
}
-void KNoteEdit::emitLinkClicked( const QString &s )
+void KNoteEdit::emitLinkClicked( const TQString &s )
{
kdDebug(5500) << k_funcinfo << s << endl;
}
diff --git a/knotes/knoteedit.h b/knotes/knoteedit.h
index 94760f3a7..00442ae5a 100644
--- a/knotes/knoteedit.h
+++ b/knotes/knoteedit.h
@@ -21,7 +21,7 @@
#ifndef KNOTEEDIT_H
#define KNOTEEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <ktextedit.h>
@@ -39,12 +39,12 @@ class KNoteEdit : public KTextEdit
{
Q_OBJECT
public:
- KNoteEdit( KActionCollection *actions, QWidget *parent=0, const char *name=0 );
+ KNoteEdit( KActionCollection *actions, TQWidget *parent=0, const char *name=0 );
~KNoteEdit();
- void setText( const QString& text );
- void setTextFont( const QFont& font );
- void setTextColor( const QColor& color );
+ void setText( const TQString& text );
+ void setTextFont( const TQFont& font );
+ void setTextColor( const TQColor& color );
void setTabStop( int tabs );
void setAutoIndentMode( bool newmode );
@@ -69,14 +69,14 @@ public slots:
//void textDecreaseIndent();
protected:
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
private slots:
void slotReturnPressed();
- void fontChanged( const QFont &f );
- void colorChanged( const QColor &c );
+ void fontChanged( const TQFont &f );
+ void colorChanged( const TQColor &c );
void alignmentChanged( int a );
void verticalAlignmentChanged( VerticalAlignment a );
@@ -84,7 +84,7 @@ private:
void autoIndent();
virtual bool linksEnabled() const { return true; }
- virtual void emitLinkClicked( const QString &s );
+ virtual void emitLinkClicked( const TQString &s );
void enableRichTextActions();
void disableRichTextActions();
diff --git a/knotes/knotehostdlg.cpp b/knotes/knotehostdlg.cpp
index 7045c465c..e78894eae 100644
--- a/knotes/knotehostdlg.cpp
+++ b/knotes/knotehostdlg.cpp
@@ -30,10 +30,10 @@
your version.
*******************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -46,11 +46,11 @@
#include "knotesglobalconfig.h"
-KNoteHostDlg::KNoteHostDlg( const QString &caption, QWidget *parent, const char *name )
+KNoteHostDlg::KNoteHostDlg( const TQString &caption, TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, caption, Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
- (void)new QLabel( i18n("Hostname or IP address:"), page );
+ TQVBox *page = makeVBoxMainWidget();
+ (void)new TQLabel( i18n("Hostname or IP address:"), page );
m_hostCombo = new KHistoryCombo( true, page );
m_hostCombo->setMinimumWidth( fontMetrics().maxWidth() * 15 );
@@ -60,8 +60,8 @@ KNoteHostDlg::KNoteHostDlg( const QString &caption, QWidget *parent, const char
m_hostCombo->setHistoryItems( KNotesGlobalConfig::knownHosts(), true );
m_hostCombo->setFocus();
//m_hostCombo->completionObject()->setItems( KNotesGlobalConfig::hostCompletions() );
- connect( m_hostCombo->lineEdit(), SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( slotTextChanged( const QString & ) ) );
+ connect( m_hostCombo->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
slotTextChanged( m_hostCombo->lineEdit()->text() );
}
@@ -76,12 +76,12 @@ KNoteHostDlg::~KNoteHostDlg()
KNotesGlobalConfig::writeConfig();
}
-void KNoteHostDlg::slotTextChanged( const QString& text )
+void KNoteHostDlg::slotTextChanged( const TQString& text )
{
enableButtonOK( !text.isEmpty() );
}
-QString KNoteHostDlg::host() const
+TQString KNoteHostDlg::host() const
{
return m_hostCombo->currentText();
}
diff --git a/knotes/knotehostdlg.h b/knotes/knotehostdlg.h
index a48be2fb4..1e8c79ff1 100644
--- a/knotes/knotehostdlg.h
+++ b/knotes/knotehostdlg.h
@@ -45,13 +45,13 @@ class KNoteHostDlg : public KDialogBase
{
Q_OBJECT
public:
- KNoteHostDlg( const QString& caption, QWidget *parent=0, const char *name=0 );
+ KNoteHostDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
~KNoteHostDlg();
- QString host() const;
+ TQString host() const;
private slots:
- void slotTextChanged( const QString & );
+ void slotTextChanged( const TQString & );
private:
KHistoryCombo *m_hostCombo;
diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp
index d1e6ffd59..0bd6ef8a7 100644
--- a/knotes/knoteprinter.cpp
+++ b/knotes/knoteprinter.cpp
@@ -5,86 +5,86 @@
#include <klocale.h>
#include <kprinter.h>
-#include <qfont.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsimplerichtext.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsimplerichtext.h>
+#include <tqstring.h>
KNotePrinter::KNotePrinter() : m_styleSheet( 0 ), m_mimeSourceFactory( 0 )
{
}
-void KNotePrinter::setContext( const QString& context )
+void KNotePrinter::setContext( const TQString& context )
{
m_context = context;
}
-QString KNotePrinter::context() const
+TQString KNotePrinter::context() const
{
return m_context;
}
-void KNotePrinter::setMimeSourceFactory( QMimeSourceFactory* factory )
+void KNotePrinter::setMimeSourceFactory( TQMimeSourceFactory* factory )
{
m_mimeSourceFactory = factory;
}
-QMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
+TQMimeSourceFactory* KNotePrinter::mimeSourceFactory() const
{
return m_mimeSourceFactory;
}
-void KNotePrinter::setFont( const QFont& font )
+void KNotePrinter::setFont( const TQFont& font )
{
m_font = font;
}
-QFont KNotePrinter::font() const
+TQFont KNotePrinter::font() const
{
return m_font;
}
-void KNotePrinter::setColorGroup( const QColorGroup& colorGroup )
+void KNotePrinter::setColorGroup( const TQColorGroup& colorGroup )
{
m_colorGroup = colorGroup;
}
-QColorGroup KNotePrinter::colorGroup() const
+TQColorGroup KNotePrinter::colorGroup() const
{
return m_colorGroup;
}
-void KNotePrinter::setStyleSheet( QStyleSheet* styleSheet )
+void KNotePrinter::setStyleSheet( TQStyleSheet* styleSheet )
{
m_styleSheet = styleSheet;
}
-QStyleSheet* KNotePrinter::styleSheet() const
+TQStyleSheet* KNotePrinter::styleSheet() const
{
return m_styleSheet;
}
-void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
- const QString& content ) const
+void KNotePrinter::doPrint( KPrinter& printer, TQPainter& painter,
+ const TQString& content ) const
{
const int margin = 40; // pt
- QPaintDeviceMetrics metrics( painter.device() );
+ TQPaintDeviceMetrics metrics( painter.device() );
int marginX = margin * metrics.logicalDpiX() / 72;
int marginY = margin * metrics.logicalDpiY() / 72;
- QRect body( marginX, marginY,
+ TQRect body( marginX, marginY,
metrics.width() - marginX * 2,
metrics.height() - marginY * 2 );
- QSimpleRichText text( content, m_font, m_context,
+ TQSimpleRichText text( content, m_font, m_context,
m_styleSheet, m_mimeSourceFactory,
body.height() /*, linkColor, linkUnderline? */ );
text.setWidth( &painter, body.width() );
- QRect view( body );
+ TQRect view( body );
int page = 1;
@@ -97,8 +97,8 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
// page numbers
painter.setFont( m_font );
painter.drawText(
- view.right() - painter.fontMetrics().width( QString::number( page ) ),
- view.bottom() + painter.fontMetrics().ascent() + 5, QString::number( page )
+ view.right() - painter.fontMetrics().width( TQString::number( page ) ),
+ view.bottom() + painter.fontMetrics().ascent() + 5, TQString::number( page )
);
if ( view.top() >= text.height() )
@@ -109,20 +109,20 @@ void KNotePrinter::doPrint( KPrinter& printer, QPainter& painter,
}
}
-void KNotePrinter::printNote( const QString& name, const QString& content ) const
+void KNotePrinter::printNote( const TQString& name, const TQString& content ) const
{
KPrinter printer;
printer.setFullPage( true );
if ( !printer.setup( 0, i18n("Print %1").arg(name) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
doPrint( printer, painter, content );
painter.end();
}
-void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) const
+void KNotePrinter::printNotes( const TQValueList<KCal::Journal*>& journals ) const
{
if ( journals.isEmpty() )
return;
@@ -133,11 +133,11 @@ void KNotePrinter::printNotes( const QValueList<KCal::Journal*>& journals ) cons
if ( !printer.setup( 0, i18n("Print Note", "Print %n notes", journals.count() ) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
- QString content;
- QValueListConstIterator<KCal::Journal*> it( journals.begin() );
- QValueListConstIterator<KCal::Journal*> end( journals.end() );
+ TQString content;
+ TQValueListConstIterator<KCal::Journal*> it( journals.begin() );
+ TQValueListConstIterator<KCal::Journal*> end( journals.end() );
while ( it != end ) {
KCal::Journal *j = *it;
it++;
diff --git a/knotes/knoteprinter.h b/knotes/knoteprinter.h
index 8ce3dc763..d9b006961 100644
--- a/knotes/knoteprinter.h
+++ b/knotes/knoteprinter.h
@@ -1,9 +1,9 @@
#ifndef KNOTEPRINTER_H
#define KNOTEPRINTER_H
-#include <qfont.h>
-#include <qpalette.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqpalette.h>
+#include <tqstring.h>
class QMimeSourceFactory;
class QStyleSheet;
@@ -19,35 +19,35 @@ public:
KNotePrinter();
- void printNote( const QString& name,
- const QString& content ) const;
+ void printNote( const TQString& name,
+ const TQString& content ) const;
- void printNotes( const QValueList<KCal::Journal*>& journals ) const;
+ void printNotes( const TQValueList<KCal::Journal*>& journals ) const;
- void setFont( const QFont& font );
- QFont font() const;
+ void setFont( const TQFont& font );
+ TQFont font() const;
- void setColorGroup( const QColorGroup& colorGroup );
- QColorGroup colorGroup() const;
+ void setColorGroup( const TQColorGroup& colorGroup );
+ TQColorGroup colorGroup() const;
- void setStyleSheet( QStyleSheet* styleSheet );
- QStyleSheet* styleSheet() const;
+ void setStyleSheet( TQStyleSheet* styleSheet );
+ TQStyleSheet* styleSheet() const;
- void setContext( const QString& context );
- QString context() const;
+ void setContext( const TQString& context );
+ TQString context() const;
- void setMimeSourceFactory( QMimeSourceFactory* factory );
- QMimeSourceFactory* mimeSourceFactory() const;
+ void setMimeSourceFactory( TQMimeSourceFactory* factory );
+ TQMimeSourceFactory* mimeSourceFactory() const;
private:
- void doPrint( KPrinter& printer, QPainter& painter,
- const QString& content ) const;
-
- QColorGroup m_colorGroup;
- QFont m_font;
- QStyleSheet* m_styleSheet;
- QMimeSourceFactory* m_mimeSourceFactory;
- QString m_context;
+ void doPrint( KPrinter& printer, TQPainter& painter,
+ const TQString& content ) const;
+
+ TQColorGroup m_colorGroup;
+ TQFont m_font;
+ TQStyleSheet* m_styleSheet;
+ TQMimeSourceFactory* m_mimeSourceFactory;
+ TQString m_context;
};
#endif // KNOTEPRINTER
diff --git a/knotes/knotesalarm.cpp b/knotes/knotesalarm.cpp
index 056c448ed..c653d80ca 100644
--- a/knotes/knotesalarm.cpp
+++ b/knotes/knotesalarm.cpp
@@ -29,7 +29,7 @@
your version.
*******************************************************************/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -42,28 +42,28 @@
#include "knotesglobalconfig.h"
-KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, QObject *parent, const char *name )
- : QObject( parent, name ),
+KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_manager( manager ),
m_checkTimer( 0, "m_checkTimer" )
{
// TODO: fix timezone stuff?
- connect( &m_checkTimer, SIGNAL(timeout()), SLOT(checkAlarms()) );
+ connect( &m_checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarms()) );
m_checkTimer.start( 1000 * KNotesGlobalConfig::self()->checkInterval() ); // interval in seconds
}
void KNotesAlarm::checkAlarms()
{
- QDateTime from = KNotesGlobalConfig::self()->alarmsLastChecked().addSecs( 1 );
+ TQDateTime from = KNotesGlobalConfig::self()->alarmsLastChecked().addSecs( 1 );
if ( !from.isValid() )
from.setTime_t( 0 );
- KNotesGlobalConfig::self()->setAlarmsLastChecked( QDateTime::currentDateTime() );
- QValueList<KCal::Alarm *> alarms = m_manager->alarms( from, KNotesGlobalConfig::self()->alarmsLastChecked() );
+ KNotesGlobalConfig::self()->setAlarmsLastChecked( TQDateTime::currentDateTime() );
+ TQValueList<KCal::Alarm *> alarms = m_manager->alarms( from, KNotesGlobalConfig::self()->alarmsLastChecked() );
- QStringList notes;
- QValueList<KCal::Alarm *>::ConstIterator it;
+ TQStringList notes;
+ TQValueList<KCal::Alarm *>::ConstIterator it;
for ( it = alarms.begin(); it != alarms.end(); ++it )
{
KCal::Incidence *incidence = (*it)->parent();
diff --git a/knotes/knotesalarm.h b/knotes/knotesalarm.h
index 3845c9660..993c84905 100644
--- a/knotes/knotesalarm.h
+++ b/knotes/knotesalarm.h
@@ -32,8 +32,8 @@
#ifndef KNOTESALARM_H
#define KNOTESALARM_H
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
class KNotesResourceManager;
@@ -46,14 +46,14 @@ class KNotesAlarm : public QObject
{
Q_OBJECT
public:
- KNotesAlarm( KNotesResourceManager *manager, QObject *parent = 0, const char *name = 0 );
+ KNotesAlarm( KNotesResourceManager *manager, TQObject *parent = 0, const char *name = 0 );
private slots:
void checkAlarms();
private:
KNotesResourceManager *m_manager;
- QTimer m_checkTimer;
+ TQTimer m_checkTimer;
};
#endif
diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp
index 1a1bdde89..858cbb795 100644
--- a/knotes/knotesapp.cpp
+++ b/knotes/knotesapp.cpp
@@ -18,9 +18,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qtooltip.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kaction.h>
@@ -60,12 +60,12 @@ using namespace KNetwork;
class KNotesKeyDialog : public KDialogBase
{
public:
- KNotesKeyDialog( KGlobalAccel *globals, QWidget *parent, const char* name = 0 )
+ KNotesKeyDialog( KGlobalAccel *globals, TQWidget *parent, const char* name = 0 )
: KDialogBase( parent, name, true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
{
m_keyChooser = new KKeyChooser( globals, this );
setMainWidget( m_keyChooser );
- connect( this, SIGNAL(defaultClicked()), m_keyChooser, SLOT(allDefault()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), m_keyChooser, TQT_SLOT(allDefault()) );
}
void insert( KActionCollection *actions )
@@ -84,7 +84,7 @@ private:
};
-int KNotesApp::KNoteActionList::compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+int KNotesApp::KNoteActionList::compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
if ( ((KAction*)s1)->text() == ((KAction*)s2)->text() )
return 0;
@@ -93,39 +93,39 @@ int KNotesApp::KNoteActionList::compareItems( QPtrCollection::Item s1, QPtrColle
KNotesApp::KNotesApp()
- : DCOPObject("KNotesIface"), QLabel( 0, 0, WType_TopLevel ),
+ : DCOPObject("KNotesIface"), TQLabel( 0, 0, WType_TopLevel ),
m_alarm( 0 ), m_listener( 0 ), m_find( 0 ), m_findPos( 0 )
{
- connect( kapp, SIGNAL(lastWindowClosed()), kapp, SLOT(quit()) );
+ connect( kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit()) );
m_noteList.setAutoDelete( true );
m_noteActions.setAutoDelete( true );
// create the dock widget...
KWin::setSystemTrayWindowFor( winId(), qt_xrootwin() );
- QToolTip::add( this, i18n( "KNotes: Sticky notes for KDE" ) );
+ TQToolTip::add( this, i18n( "KNotes: Sticky notes for KDE" ) );
setBackgroundMode( X11ParentRelative );
- setPixmap( KSystemTray::loadSizedIcon( "knotes", QWidget::width() ) );
+ setPixmap( KSystemTray::loadSizedIcon( "knotes", TQWidget::width() ) );
// set the initial style
KNote::setStyle( KNotesGlobalConfig::style() );
// create the GUI...
new KAction( i18n("New Note"), "filenew", 0,
- this, SLOT(newNote()), actionCollection(), "new_note" );
+ this, TQT_SLOT(newNote()), actionCollection(), "new_note" );
new KAction( i18n("New Note From Clipboard"), "editpaste", 0,
- this, SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" );
+ this, TQT_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" );
new KAction( i18n("Show All Notes"), "knotes", 0,
- this, SLOT(showAllNotes()), actionCollection(), "show_all_notes" );
+ this, TQT_SLOT(showAllNotes()), actionCollection(), "show_all_notes" );
new KAction( i18n("Hide All Notes"), "fileclose", 0,
- this, SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" );
+ this, TQT_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" );
new KHelpMenu( this, kapp->aboutData(), false, actionCollection() );
- KStdAction::find( this, SLOT(slotOpenFindDialog()), actionCollection() );
- KStdAction::preferences( this, SLOT(slotPreferences()), actionCollection() );
- KStdAction::keyBindings( this, SLOT(slotConfigureAccels()), actionCollection() );
+ KStdAction::find( this, TQT_SLOT(slotOpenFindDialog()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(slotPreferences()), actionCollection() );
+ KStdAction::keyBindings( this, TQT_SLOT(slotConfigureAccels()), actionCollection() );
//FIXME: no shortcut removing!?
- KStdAction::quit( this, SLOT(slotQuit()), actionCollection() )->setShortcut( 0 );
+ KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 );
setXMLFile( instance()->instanceName() + "appui.rc" );
@@ -137,12 +137,12 @@ KNotesApp::KNotesApp()
m_note_menu = static_cast<KPopupMenu*>(m_guiFactory->container( "notes_menu", this ));
// get the most recent XML UI file
- QString xmlFileName = instance()->instanceName() + "ui.rc";
- QString filter = QString::fromLatin1( instance()->instanceName() + '/' ) + xmlFileName;
- QStringList fileList = instance()->dirs()->findAllResources( "data", filter ) +
+ TQString xmlFileName = instance()->instanceName() + "ui.rc";
+ TQString filter = TQString::fromLatin1( instance()->instanceName() + '/' ) + xmlFileName;
+ TQStringList fileList = instance()->dirs()->findAllResources( "data", filter ) +
instance()->dirs()->findAllResources( "data", xmlFileName );
- QString doc;
+ TQString doc;
KXMLGUIClient::findMostRecentXMLFile( fileList, doc );
m_noteGUI.setContent( doc );
@@ -150,16 +150,16 @@ KNotesApp::KNotesApp()
m_globalAccel = new KGlobalAccel( this, "global accel" );
m_globalAccel->insert( "global_new_note", i18n("New Note"), "",
ALT+SHIFT+Key_N, ALT+SHIFT+Key_N ,
- this, SLOT(newNote()), true, true );
+ this, TQT_SLOT(newNote()), true, true );
m_globalAccel->insert( "global_new_note_clipboard", i18n("New Note From Clipboard"), "",
ALT+SHIFT+Key_C, ALT+SHIFT+Key_C,
- this, SLOT(newNoteFromClipboard()), true, true );
+ this, TQT_SLOT(newNoteFromClipboard()), true, true );
m_globalAccel->insert( "global_hide_all_notes", i18n("Hide All Notes"), "",
ALT+SHIFT+Key_H, ALT+SHIFT+Key_H ,
- this, SLOT(hideAllNotes()), true, true );
+ this, TQT_SLOT(hideAllNotes()), true, true );
m_globalAccel->insert( "global_show_all_notes", i18n("Show All Notes"), "",
ALT+SHIFT+Key_S, ALT+SHIFT+Key_S,
- this, SLOT(showAllNotes()), true, true );
+ this, TQT_SLOT(showAllNotes()), true, true );
m_globalAccel->readSettings();
@@ -174,16 +174,16 @@ KNotesApp::KNotesApp()
// create the resource manager
m_manager = new KNotesResourceManager();
- connect( m_manager, SIGNAL(sigRegisteredNote( KCal::Journal * )),
- this, SLOT(createNote( KCal::Journal * )) );
- connect( m_manager, SIGNAL(sigDeregisteredNote( KCal::Journal * )),
- this, SLOT(killNote( KCal::Journal * )) );
+ connect( m_manager, TQT_SIGNAL(sigRegisteredNote( KCal::Journal * )),
+ this, TQT_SLOT(createNote( KCal::Journal * )) );
+ connect( m_manager, TQT_SIGNAL(sigDeregisteredNote( KCal::Journal * )),
+ this, TQT_SLOT(killNote( KCal::Journal * )) );
// read the notes
m_manager->load();
// read the old config files, convert and add them
- KCal::CalendarLocal calendar( QString::fromLatin1( "UTC" ) );
+ KCal::CalendarLocal calendar( TQString::fromLatin1( "UTC" ) );
if ( KNotesLegacy::convert( &calendar ) )
{
KCal::Journal::List notes = calendar.journals();
@@ -201,7 +201,7 @@ KNotesApp::KNotesApp()
// create the socket and possibly start listening for connections
m_listener = new KServerSocket();
m_listener->setResolutionEnabled( true );
- connect( m_listener, SIGNAL(readyAccept()), SLOT(acceptConnection()) );
+ connect( m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(acceptConnection()) );
updateNetworkListener();
if ( m_noteList.count() == 0 && !kapp->isRestored() )
@@ -210,15 +210,15 @@ KNotesApp::KNotesApp()
updateNoteActions();
}
-void KNotesApp::resizeEvent ( QResizeEvent * )
+void KNotesApp::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
- QPixmap origpixmap;
- QPixmap scaledpixmap;
- QImage newIcon;
- origpixmap = KSystemTray::loadSizedIcon( "knotes", QWidget::width() );
+ TQPixmap origpixmap;
+ TQPixmap scaledpixmap;
+ TQImage newIcon;
+ origpixmap = KSystemTray::loadSizedIcon( "knotes", TQWidget::width() );
newIcon = origpixmap;
- newIcon = newIcon.smoothScale(QWidget::width(), QWidget::height());
+ newIcon = newIcon.smoothScale(TQWidget::width(), TQWidget::height());
scaledpixmap = newIcon;
setPixmap(scaledpixmap);
}
@@ -244,7 +244,7 @@ bool KNotesApp::commitData( QSessionManager& )
// -------------------- public DCOP interface -------------------- //
-QString KNotesApp::newNote( const QString& name, const QString& text )
+TQString KNotesApp::newNote( const TQString& name, const TQString& text )
{
// create the new note
KCal::Journal *journal = new KCal::Journal();
@@ -253,7 +253,7 @@ QString KNotesApp::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 );
@@ -265,22 +265,22 @@ QString KNotesApp::newNote( const QString& name, const QString& text )
return journal->uid();
}
-QString KNotesApp::newNoteFromClipboard( const QString& name )
+TQString KNotesApp::newNoteFromClipboard( const TQString& name )
{
- const QString& text = KApplication::clipboard()->text();
+ const TQString& text = KApplication::clipboard()->text();
return newNote( name, text );
}
void KNotesApp::hideAllNotes() const
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
(*it)->close();
}
void KNotesApp::showAllNotes() const
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
{
(*it)->show();
@@ -288,7 +288,7 @@ void KNotesApp::showAllNotes() const
}
}
-void KNotesApp::showNote( const QString& id ) const
+void KNotesApp::showNote( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -297,7 +297,7 @@ void KNotesApp::showNote( const QString& id ) const
kdWarning(5500) << "showNote: no note with id: " << id << endl;
}
-void KNotesApp::hideNote( const QString& id ) const
+void KNotesApp::hideNote( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -306,7 +306,7 @@ void KNotesApp::hideNote( const QString& id ) const
kdWarning(5500) << "hideNote: no note with id: " << id << endl;
}
-void KNotesApp::killNote( const QString& id, bool force )
+void KNotesApp::killNote( const TQString& id, bool force )
{
KNote* note = m_noteList[id];
if ( note )
@@ -316,15 +316,15 @@ void KNotesApp::killNote( const QString& id, bool force )
}
// "bool force = false" doesn't work with dcop
-void KNotesApp::killNote( const QString& id )
+void KNotesApp::killNote( const TQString& id )
{
killNote( id, false );
}
-QMap<QString,QString> KNotesApp::notes() const
+TQMap<TQString,TQString> KNotesApp::notes() const
{
- QMap<QString,QString> notes;
- QDictIterator<KNote> it( m_noteList );
+ TQMap<TQString,TQString> notes;
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
notes.insert( it.current()->noteId(), it.current()->name() );
@@ -332,25 +332,25 @@ QMap<QString,QString> KNotesApp::notes() const
return notes;
}
-QString KNotesApp::name( const QString& id ) const
+TQString KNotesApp::name( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->name();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesApp::text( const QString& id ) const
+TQString KNotesApp::text( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->text();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesApp::setName( const QString& id, const QString& newName )
+void KNotesApp::setName( const TQString& id, const TQString& newName )
{
KNote* note = m_noteList[id];
if ( note )
@@ -359,7 +359,7 @@ void KNotesApp::setName( const QString& id, const QString& newName )
kdWarning(5500) << "setName: no note with id: " << id << endl;
}
-void KNotesApp::setText( const QString& id, const QString& newText )
+void KNotesApp::setText( const TQString& id, const TQString& newText )
{
KNote* note = m_noteList[id];
if ( note )
@@ -368,34 +368,34 @@ void KNotesApp::setText( const QString& id, const QString& newText )
kdWarning(5500) << "setText: no note with id: " << id << endl;
}
-QString KNotesApp::fgColor( const QString& id ) const
+TQString KNotesApp::fgColor( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->fgColor().name();
else
- return QString::null;
+ return TQString::null;
}
-QString KNotesApp::bgColor( const QString& id ) const
+TQString KNotesApp::bgColor( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
return note->bgColor().name();
else
- return QString::null;
+ return TQString::null;
}
-void KNotesApp::setColor( const QString& id, const QString& fgColor, const QString& bgColor )
+void KNotesApp::setColor( const TQString& id, const TQString& fgColor, const TQString& bgColor )
{
KNote* note = m_noteList[id];
if ( note )
- note->setColor( QColor( fgColor ), QColor( bgColor ) );
+ note->setColor( TQColor( fgColor ), TQColor( bgColor ) );
else
kdWarning(5500) << "setColor: no note with id: " << id << endl;
}
-int KNotesApp::width( const QString& id ) const
+int KNotesApp::width( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -404,7 +404,7 @@ int KNotesApp::width( const QString& id ) const
return 0;
}
-int KNotesApp::height( const QString& id ) const
+int KNotesApp::height( const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -413,7 +413,7 @@ int KNotesApp::height( const QString& id ) const
return 0;
}
-void KNotesApp::move( const QString& id, int x, int y ) const
+void KNotesApp::move( const TQString& id, int x, int y ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -422,7 +422,7 @@ void KNotesApp::move( const QString& id, int x, int y ) const
kdWarning(5500) << "move: no note with id: " << id << endl;
}
-void KNotesApp::resize( const QString& id, int width, int height ) const
+void KNotesApp::resize( const TQString& id, int width, int height ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -431,15 +431,15 @@ void KNotesApp::resize( const QString& id, int width, int height ) const
kdWarning(5500) << "resize: no note with id: " << id << endl;
}
-void KNotesApp::sync( const QString& app )
+void KNotesApp::sync( const TQString& app )
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
it.current()->sync( app );
}
-bool KNotesApp::isNew( const QString& app, const QString& id ) const
+bool KNotesApp::isNew( const TQString& app, const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -448,7 +448,7 @@ bool KNotesApp::isNew( const QString& app, const QString& id ) const
return false;
}
-bool KNotesApp::isModified( const QString& app, const QString& id ) const
+bool KNotesApp::isModified( const TQString& app, const TQString& id ) const
{
KNote* note = m_noteList[id];
if ( note )
@@ -460,7 +460,7 @@ bool KNotesApp::isModified( const QString& app, const QString& id ) const
// ------------------- protected methods ------------------- //
-void KNotesApp::mousePressEvent( QMouseEvent* e )
+void KNotesApp::mousePressEvent( TQMouseEvent* e )
{
if ( !rect().contains( e->pos() ) )
return;
@@ -470,7 +470,7 @@ void KNotesApp::mousePressEvent( QMouseEvent* e )
case LeftButton:
if ( m_noteList.count() == 1 )
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
showNote( it.toFirst() );
}
else if ( m_note_menu->count() > 0 )
@@ -490,13 +490,13 @@ void KNotesApp::mousePressEvent( QMouseEvent* e )
void KNotesApp::slotShowNote()
{
// tell the WM to give this note focus
- showNote( QString::fromUtf8( sender()->name() ) );
+ showNote( TQString::fromUtf8( sender()->name() ) );
}
void KNotesApp::slotWalkThroughNotes()
{
// show next note
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
KNote *first = it.toFirst();
for ( ; *it; ++it )
if ( (*it)->hasFocus() )
@@ -516,11 +516,11 @@ void KNotesApp::slotOpenFindDialog()
findDia.setHasCursor( false );
findDia.setSupportsBackwardsFind( false );
- if ( findDia.exec() != QDialog::Accepted )
+ if ( findDia.exec() != TQDialog::Accepted )
return;
delete m_findPos;
- m_findPos = new QDictIterator<KNote>( m_noteList );
+ m_findPos = new TQDictIterator<KNote>( m_noteList );
// this could be in an own method if searching without a dialog should be possible
delete m_find;
@@ -556,15 +556,15 @@ void KNotesApp::slotPreferences()
// create a new preferences dialog...
KNoteConfigDlg *dialog = new KNoteConfigDlg( 0, i18n("Settings"), this,
"KNotes Settings" );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateNetworkListener()) );
- connect( dialog, SIGNAL(settingsChanged()), this, SLOT(updateStyle()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateNetworkListener()) );
+ connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateStyle()) );
dialog->show();
}
void KNotesApp::slotConfigureAccels()
{
KNotesKeyDialog keys( m_globalAccel, this );
- QDictIterator<KNote> notes( m_noteList );
+ TQDictIterator<KNote> notes( m_noteList );
if ( !m_noteList.isEmpty() )
keys.insert( (*notes)->actionCollection() );
keys.configure();
@@ -581,8 +581,8 @@ void KNotesApp::slotConfigureAccels()
return;
notes.toFirst();
- QValueList<KAction *> list = (*notes)->actionCollection()->actions();
- for ( QValueList<KAction *>::iterator it = list.begin(); it != list.end(); ++it )
+ TQValueList<KAction *> list = (*notes)->actionCollection()->actions();
+ for ( TQValueList<KAction *>::iterator it = list.begin(); it != list.end(); ++it )
{
notes.toFirst();
for ( ++notes; *notes; ++notes )
@@ -602,7 +602,7 @@ void KNotesApp::slotNoteKilled( KCal::Journal *journal )
void KNotesApp::slotQuit()
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; *it; ++it )
if ( (*it)->isModified() )
@@ -628,14 +628,14 @@ void KNotesApp::createNote( KCal::Journal *journal )
KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() );
m_noteList.insert( newNote->noteId(), newNote );
- connect( newNote, SIGNAL(sigRequestNewNote()), SLOT(newNote()) );
- connect( newNote, SIGNAL(sigShowNextNote()), SLOT(slotWalkThroughNotes()) );
- connect( newNote, SIGNAL(sigKillNote( KCal::Journal* )),
- SLOT(slotNoteKilled( KCal::Journal* )) );
- connect( newNote, SIGNAL(sigNameChanged()), SLOT(updateNoteActions()) );
- connect( newNote, SIGNAL(sigDataChanged()), SLOT(saveNotes()) );
- connect( newNote, SIGNAL(sigColorChanged()), SLOT(updateNoteActions()) );
- connect( newNote, SIGNAL(sigFindFinished()), SLOT(slotFindNext()) );
+ connect( newNote, TQT_SIGNAL(sigRequestNewNote()), TQT_SLOT(newNote()) );
+ connect( newNote, TQT_SIGNAL(sigShowNextNote()), TQT_SLOT(slotWalkThroughNotes()) );
+ connect( newNote, TQT_SIGNAL(sigKillNote( KCal::Journal* )),
+ TQT_SLOT(slotNoteKilled( KCal::Journal* )) );
+ connect( newNote, TQT_SIGNAL(sigNameChanged()), TQT_SLOT(updateNoteActions()) );
+ connect( newNote, TQT_SIGNAL(sigDataChanged()), TQT_SLOT(saveNotes()) );
+ connect( newNote, TQT_SIGNAL(sigColorChanged()), TQT_SLOT(updateNoteActions()) );
+ connect( newNote, TQT_SIGNAL(sigFindFinished()), TQT_SLOT(slotFindNext()) );
// don't call this during startup for each and every loaded note
if ( m_alarm )
@@ -656,8 +656,8 @@ void KNotesApp::acceptConnection()
if ( s )
{
KNotesNetworkReceiver *recv = new KNotesNetworkReceiver( s );
- connect( recv, SIGNAL(sigNoteReceived( const QString &, const QString & )),
- this, SLOT(newNote( const QString &, const QString & )) );
+ connect( recv, TQT_SIGNAL(sigNoteReceived( const TQString &, const TQString & )),
+ this, TQT_SLOT(newNote( const TQString &, const TQString & )) );
}
}
@@ -669,7 +669,7 @@ void KNotesApp::saveNotes()
void KNotesApp::saveConfigs()
{
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
it.current()->saveConfig();
}
@@ -679,14 +679,14 @@ void KNotesApp::updateNoteActions()
unplugActionList( "notes" );
m_noteActions.clear();
- for ( QDictIterator<KNote> it( m_noteList ); it.current(); ++it )
+ for ( TQDictIterator<KNote> it( m_noteList ); it.current(); ++it )
{
KAction *action = new KAction( it.current()->name().replace("&", "&&"),
- KShortcut(), this, SLOT(slotShowNote()),
- (QObject *)0,
+ KShortcut(), this, TQT_SLOT(slotShowNote()),
+ (TQObject *)0,
it.current()->noteId().utf8() );
KIconEffect effect;
- QPixmap icon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1,
+ TQPixmap icon = effect.apply( kapp->miniIcon(), KIconEffect::Colorize, 1,
it.current()->paletteBackgroundColor(), false );
action->setIconSet( icon );
m_noteActions.append( action );
@@ -745,7 +745,7 @@ void KNotesApp::updateNetworkListener()
if ( KNotesGlobalConfig::receiveNotes() )
{
- m_listener->setAddress( QString::number( KNotesGlobalConfig::port() ) );
+ m_listener->setAddress( TQString::number( KNotesGlobalConfig::port() ) );
m_listener->bind();
m_listener->listen();
}
@@ -755,9 +755,9 @@ void KNotesApp::updateStyle()
{
KNote::setStyle( KNotesGlobalConfig::style() );
- QDictIterator<KNote> it( m_noteList );
+ TQDictIterator<KNote> it( m_noteList );
for ( ; it.current(); ++it )
- QApplication::postEvent( *it, new QEvent( QEvent::LayoutHint ) );
+ TQApplication::postEvent( *it, new TQEvent( TQEvent::LayoutHint ) );
}
#include "knotesapp.moc"
diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h
index 9cfa5ad31..ba156cca4 100644
--- a/knotes/knotesapp.h
+++ b/knotes/knotesapp.h
@@ -21,11 +21,11 @@
#ifndef KNOTESAPP_H
#define KNOTESAPP_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qlabel.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqlabel.h>
+#include <tqdom.h>
#include <kapplication.h>
#include <kxmlguiclient.h>
@@ -52,7 +52,7 @@ namespace KNetwork {
}
-class KNotesApp : public QLabel, public KSessionManaged, virtual public KXMLGUIClient,
+class KNotesApp : public TQLabel, public KSessionManaged, virtual public KXMLGUIClient,
virtual public KNotesAppIface
{
Q_OBJECT
@@ -60,49 +60,49 @@ public:
KNotesApp();
~KNotesApp();
- void showNote( const QString& id ) const;
- void hideNote( const QString& id ) const;
+ void showNote( const TQString& id ) const;
+ void hideNote( const TQString& id ) const;
- 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 );
- QString fgColor( const QString& id ) const;
- QString bgColor( const QString& id ) const;
+ TQString fgColor( const TQString& id ) const;
+ TQString bgColor( const TQString& id ) const;
- void setColor( const QString& id, const QString& fgColor,
- const QString& bgColor );
+ void setColor( const TQString& id, const TQString& fgColor,
+ const TQString& bgColor );
- QMap<QString,QString> notes() const;
+ TQMap<TQString,TQString> notes() const;
- int width( const QString& noteId ) const;
- int height( const QString& noteId ) const;
+ int width( const TQString& noteId ) const;
+ int height( const TQString& noteId ) const;
- void move( const QString& noteId, int x, int y ) const;
- void resize( const QString& noteId, int width, int height ) const;
+ void move( const TQString& noteId, int x, int y ) const;
+ void resize( const TQString& noteId, int width, int height ) const;
- void sync( const QString& app );
- bool isNew( const QString& app, const QString& id ) const;
- bool isModified( const QString& app, const QString& id ) const;
+ void sync( const TQString& app );
+ bool isNew( const TQString& app, const TQString& id ) const;
+ bool isModified( const TQString& app, const TQString& id ) const;
bool commitData( QSessionManager& );
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 );
void hideAllNotes() const;
void showAllNotes() const;
protected:
- void mousePressEvent( QMouseEvent* );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent* );
+ void resizeEvent ( TQResizeEvent * );
protected slots:
void slotShowNote();
@@ -134,10 +134,10 @@ private slots:
void killNote( KCal::Journal *journal );
private:
- class KNoteActionList : public QPtrList<KAction>
+ class KNoteActionList : public TQPtrList<KAction>
{
public:
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 );
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
};
KNotesResourceManager *m_manager;
@@ -145,11 +145,11 @@ private:
KNotesAlarm *m_alarm;
KNetwork::KServerSocket *m_listener;
- QDict<KNote> m_noteList;
+ TQDict<KNote> m_noteList;
KNoteActionList m_noteActions;
KFind *m_find;
- QDictIterator<KNote> *m_findPos;
+ TQDictIterator<KNote> *m_findPos;
KPopupMenu *m_note_menu;
KPopupMenu *m_context_menu;
@@ -158,7 +158,7 @@ private:
KXMLGUIFactory *m_guiFactory;
KXMLGUIBuilder *m_guiBuilder;
- QDomDocument m_noteGUI;
+ TQDomDocument m_noteGUI;
};
#endif
diff --git a/knotes/knoteslegacy.cpp b/knotes/knoteslegacy.cpp
index 1d239d2d6..8cb57d4ce 100644
--- a/knotes/knoteslegacy.cpp
+++ b/knotes/knoteslegacy.cpp
@@ -18,12 +18,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*******************************************************************/
-#include <qfile.h>
-#include <qfont.h>
-#include <qpoint.h>
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfont.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -50,8 +50,8 @@ using namespace KCal;
void KNotesLegacy::cleanUp()
{
// remove old (KDE 1.x) local config file if it still exists
- QString configfile = KGlobal::dirs()->saveLocation( "config" ) + "knotesrc";
- if ( QFile::exists( configfile ) ) {
+ TQString configfile = KGlobal::dirs()->saveLocation( "config" ) + "knotesrc";
+ if ( TQFile::exists( configfile ) ) {
KSimpleConfig *test = new KSimpleConfig( configfile );
test->setGroup( "General" );
double version = test->readDoubleNumEntry( "version", 1.0 );
@@ -59,7 +59,7 @@ void KNotesLegacy::cleanUp()
if ( version == 1.0 ) {
if ( !( checkAccess( configfile, W_OK ) &&
- QFile::remove( configfile ) ) )
+ TQFile::remove( configfile ) ) )
{
kdError(5500) << k_funcinfo << "Could not delete old config file " << configfile << endl;
}
@@ -71,11 +71,11 @@ bool KNotesLegacy::convert( CalendarLocal *calendar )
{
bool converted = false;
- QDir noteDir( KGlobal::dirs()->saveLocation( "appdata", "notes/" ) );
- QStringList notes = noteDir.entryList( QDir::Files, QDir::Name );
- for ( QStringList::Iterator note = notes.begin(); note != notes.end(); note++ )
+ TQDir noteDir( KGlobal::dirs()->saveLocation( "appdata", "notes/" ) );
+ TQStringList notes = noteDir.entryList( TQDir::Files, TQDir::Name );
+ for ( TQStringList::Iterator note = notes.begin(); note != notes.end(); note++ )
{
- QString file = noteDir.absFilePath( *note );
+ TQString file = noteDir.absFilePath( *note );
KSimpleConfig* test = new KSimpleConfig( file );
test->setGroup( "General" );
double version = test->readDoubleNumEntry( "version", 1.0 );
@@ -116,10 +116,10 @@ bool KNotesLegacy::convert( CalendarLocal *calendar )
return converted;
}
-bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
- const QString& file )
+bool KNotesLegacy::convertKNotes1Config( Journal *journal, TQDir& noteDir,
+ const TQString& file )
{
- QFile infile( noteDir.absFilePath( file ) );
+ TQFile infile( noteDir.absFilePath( file ) );
if ( !infile.open( IO_ReadOnly ) )
{
kdError(5500) << k_funcinfo << "Could not open input file: \""
@@ -127,12 +127,12 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
return false;
}
- QTextStream input( &infile );
+ TQTextStream input( &infile );
// get the name
journal->setSummary( input.readLine() );
- QStringList props = QStringList::split( '+', input.readLine() );
+ TQStringList props = TQStringList::split( '+', input.readLine() );
// robustness
if ( props.count() != 13 )
@@ -144,7 +144,7 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
}
// the new configfile's name
- QString configFile = noteDir.absFilePath( journal->uid() );
+ TQString configFile = noteDir.absFilePath( journal->uid() );
// set the defaults
KIO::NetAccess::copy(
@@ -165,23 +165,23 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
uint red = input.readLine().toUInt();
uint green = input.readLine().toUInt();
uint blue = input.readLine().toUInt();
- config.setBgColor( QColor( red, green, blue ) );
+ config.setBgColor( TQColor( red, green, blue ) );
// get the foreground color
red = input.readLine().toUInt();
green = input.readLine().toUInt();
blue = input.readLine().toUInt();
- config.setFgColor( QColor( red, green, blue ) );
+ config.setFgColor( TQColor( red, green, blue ) );
// get the font
- QString fontfamily = input.readLine();
+ TQString fontfamily = input.readLine();
if ( fontfamily.isEmpty() )
- fontfamily = QString( "Sans Serif" );
+ fontfamily = TQString( "Sans Serif" );
uint size = input.readLine().toUInt();
size = QMAX( size, 4 );
uint weight = input.readLine().toUInt();
bool italic = ( input.readLine().toUInt() == 1 );
- QFont font( fontfamily, size, weight, italic );
+ TQFont font( fontfamily, size, weight, italic );
config.setTitleFont( font );
config.setFont( font );
@@ -204,13 +204,13 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
note_desktop = NETWinInfo::OnAllDesktops;
config.setDesktop( note_desktop );
- config.setPosition( QPoint( props[1].toUInt(), props[2].toUInt() ) );
+ config.setPosition( TQPoint( props[1].toUInt(), props[2].toUInt() ) );
config.setKeepAbove( props[12].toUInt() & 2048 );
config.writeConfig();
// get the text
- QString text;
+ TQString text;
while ( !input.atEnd() )
{
text.append( input.readLine() );
@@ -226,10 +226,10 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, QDir& noteDir,
return true;
}
-bool KNotesLegacy::convertKNotes2Config( Journal *journal, QDir& noteDir,
- const QString& file )
+bool KNotesLegacy::convertKNotes2Config( Journal *journal, TQDir& noteDir,
+ const TQString& file )
{
- QString configFile = noteDir.absFilePath( journal->uid() );
+ TQString configFile = noteDir.absFilePath( journal->uid() );
// new name for config file
if ( !noteDir.rename( file, journal->uid() ) )
@@ -254,11 +254,11 @@ bool KNotesLegacy::convertKNotes2Config( Journal *journal, QDir& noteDir,
config.deleteEntry( "state" );
// load the saved text and put it in the journal
- QFile infile( noteDir.absFilePath( "." + file + "_data" ) );
+ TQFile infile( noteDir.absFilePath( "." + file + "_data" ) );
if ( infile.open( IO_ReadOnly ) )
{
- QTextStream input( &infile );
- input.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream input( &infile );
+ input.setEncoding( TQTextStream::UnicodeUTF8 );
journal->setDescription( input.read() );
if ( !infile.remove() )
kdWarning(5500) << k_funcinfo << "Could not delete data file: \"" << infile.name() << "\"" << endl;
diff --git a/knotes/knoteslegacy.h b/knotes/knoteslegacy.h
index 84ee0fc80..70392dd6a 100644
--- a/knotes/knoteslegacy.h
+++ b/knotes/knoteslegacy.h
@@ -21,8 +21,8 @@
#ifndef KNOTESLEGACY_H
#define KNOTESLEGACY_H
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
namespace KCal {
class CalendarLocal;
@@ -39,8 +39,8 @@ public:
static void cleanUp();
static bool convert( KCal::CalendarLocal *calendar );
private:
- static bool convertKNotes1Config( KCal::Journal *j, QDir& dir, const QString& file );
- static bool convertKNotes2Config( KCal::Journal *j, QDir& dir, const QString& file );
+ static bool convertKNotes1Config( KCal::Journal *j, TQDir& dir, const TQString& file );
+ static bool convertKNotes2Config( KCal::Journal *j, TQDir& dir, const TQString& file );
};
#endif
diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp
index 65edb2cb5..0a261252b 100644
--- a/knotes/knotesnetrecv.cpp
+++ b/knotes/knotesnetrecv.cpp
@@ -30,10 +30,10 @@
your version.
*******************************************************************/
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qcstring.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <kbufferedsocket.h>
@@ -58,27 +58,27 @@ using namespace KNetwork;
KNotesNetworkReceiver::KNotesNetworkReceiver( KBufferedSocket *s )
- : QObject(),
- m_buffer( new QByteArray() ), m_sock( s )
+ : TQObject(),
+ m_buffer( new TQByteArray() ), m_sock( s )
{
- QString date = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, false );
+ TQString date = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, false );
// Add the remote IP or hostname and the date to the title, to help the
// user guess who wrote it.
- m_titleAddon = QString(" [%1, %2]")
+ m_titleAddon = TQString(" [%1, %2]")
.arg( m_sock->peerAddress().nodeName() )
.arg( date );
// Setup the communications
- connect( m_sock, SIGNAL(readyRead()), SLOT(slotDataAvailable()) );
- connect( m_sock, SIGNAL(closed()), SLOT(slotConnectionClosed()) );
- connect( m_sock, SIGNAL(gotError( int )), SLOT(slotError( int )) );
+ connect( m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotDataAvailable()) );
+ connect( m_sock, TQT_SIGNAL(closed()), TQT_SLOT(slotConnectionClosed()) );
+ connect( m_sock, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) );
m_sock->enableRead( true );
// Setup the timer
- m_timer = new QTimer( this, "m_timer" );
- connect( m_timer, SIGNAL(timeout()), SLOT(slotReceptionTimeout()) );
+ m_timer = new TQTimer( this, "m_timer" );
+ connect( m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotReceptionTimeout()) );
m_timer->start( MAXTIME, true );
}
@@ -127,11 +127,11 @@ void KNotesNetworkReceiver::slotConnectionClosed()
{
if ( m_timer->isActive() )
{
- QString noteText = QString( *m_buffer ).stripWhiteSpace();
+ TQString noteText = TQString( *m_buffer ).stripWhiteSpace();
// First line is the note title or, in case of ATnotes, the id
- int pos = noteText.find( QRegExp("[\r\n]") );
- QString noteTitle = noteText.left( pos ).stripWhiteSpace() + m_titleAddon;
+ int pos = noteText.find( TQRegExp("[\r\n]") );
+ TQString noteTitle = noteText.left( pos ).stripWhiteSpace() + m_titleAddon;
noteText = noteText.mid( pos ).stripWhiteSpace();
diff --git a/knotes/knotesnetrecv.h b/knotes/knotesnetrecv.h
index 105aa6461..b0e1f4b44 100644
--- a/knotes/knotesnetrecv.h
+++ b/knotes/knotesnetrecv.h
@@ -32,7 +32,7 @@
#ifndef KNOTESNETRECV_H
#define KNOTESNETRECV_H
-#include <qobject.h>
+#include <tqobject.h>
class QTimer;
@@ -49,7 +49,7 @@ public:
~KNotesNetworkReceiver();
signals:
- void sigNoteReceived( const QString &, const QString & );
+ void sigNoteReceived( const TQString &, const TQString & );
private slots:
void slotDataAvailable();
@@ -58,12 +58,12 @@ private slots:
void slotError( int err );
private:
- QTimer *m_timer; // to avoid memory and connection floods
+ TQTimer *m_timer; // to avoid memory and connection floods
- QByteArray *m_buffer;
+ TQByteArray *m_buffer;
KNetwork::KBufferedSocket *m_sock;
- QString m_titleAddon;
+ TQString m_titleAddon;
};
#endif
diff --git a/knotes/knotesnetsend.cpp b/knotes/knotesnetsend.cpp
index 7cf7567e4..86246407b 100644
--- a/knotes/knotesnetsend.cpp
+++ b/knotes/knotesnetsend.cpp
@@ -38,29 +38,29 @@
#define CONNECT_TIMEOUT 10000
-KNotesNetworkSender::KNotesNetworkSender( const QString& hostname, int port )
- : KBufferedSocket( hostname, QString::number( port ) ),
+KNotesNetworkSender::KNotesNetworkSender( const TQString& hostname, int port )
+ : KBufferedSocket( hostname, TQString::number( port ) ),
m_note( 0 ), m_title( 0 ), m_sender( 0 ), m_index( 0 )
{
enableRead( false );
enableWrite( false );
setTimeout( CONNECT_TIMEOUT );
- // QObject:: prefix needed, otherwise the KStreamSocket::connect()
+ // TQObject:: prefix needed, otherwise the KStreamSocket::connect()
// mehtod is called!!!
- QObject::connect( this, SIGNAL(connected( const KResolverEntry& )),
- SLOT(slotConnected( const KResolverEntry& )) );
- QObject::connect( this, SIGNAL(gotError( int )), SLOT(slotError( int )) );
- QObject::connect( this, SIGNAL(closed()), SLOT(slotClosed()) );
- QObject::connect( this, SIGNAL(readyWrite()), SLOT(slotReadyWrite()) );
+ TQObject::connect( this, TQT_SIGNAL(connected( const KResolverEntry& )),
+ TQT_SLOT(slotConnected( const KResolverEntry& )) );
+ TQObject::connect( this, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) );
+ TQObject::connect( this, TQT_SIGNAL(closed()), TQT_SLOT(slotClosed()) );
+ TQObject::connect( this, TQT_SIGNAL(readyWrite()), TQT_SLOT(slotReadyWrite()) );
}
-void KNotesNetworkSender::setSenderId( const QString& sender )
+void KNotesNetworkSender::setSenderId( const TQString& sender )
{
m_sender = sender.ascii();
}
-void KNotesNetworkSender::setNote( const QString& title, const QString& text )
+void KNotesNetworkSender::setNote( const TQString& title, const TQString& text )
{
// TODO: support for unicode and rich text.
// Mmmmmm... how to behave with such heterogeneous environment?
diff --git a/knotes/knotesnetsend.h b/knotes/knotesnetsend.h
index 1c3e42b29..37a5233ba 100644
--- a/knotes/knotesnetsend.h
+++ b/knotes/knotesnetsend.h
@@ -33,7 +33,7 @@
#ifndef KNOTESNETSEND_H
#define KNOTESNETSEND_H
-#include <qcstring.h>
+#include <tqcstring.h>
#include <kbufferedsocket.h>
#include <ksocketaddress.h>
@@ -44,10 +44,10 @@ class KNotesNetworkSender : public KNetwork::KBufferedSocket
{
Q_OBJECT
public:
- KNotesNetworkSender( const QString& host, int port );
+ KNotesNetworkSender( const TQString& host, int port );
- void setSenderId( const QString& sender );
- void setNote( const QString& title, const QString& text );
+ void setSenderId( const TQString& sender );
+ void setNote( const TQString& title, const TQString& text );
protected slots:
void slotConnected( const KResolverEntry& );
@@ -57,9 +57,9 @@ protected slots:
void slotReadyWrite();
private:
- QCString m_note;
- QCString m_title;
- QCString m_sender;
+ TQCString m_note;
+ TQCString m_title;
+ TQCString m_sender;
uint m_index;
};
diff --git a/knotes/main.cpp b/knotes/main.cpp
index 682bbb792..bf38e4c71 100644
--- a/knotes/main.cpp
+++ b/knotes/main.cpp
@@ -45,7 +45,7 @@ void remove_sm_from_client_leader()
XInternAtoms( qt_xdisplay(), atom_names, 2, False, atoms );
- QWidget w;
+ TQWidget w;
KXErrorHandler handler; // ignore X errors
status = XGetWindowProperty( qt_xdisplay(), w.winId(), atoms[ 0 ], 0, 10000,
FALSE, XA_WINDOW, &type, &format,
@@ -88,7 +88,7 @@ int Application::newInstance()
int main( int argc, char* argv[] )
{
- QString version = QString::number( KNOTES_VERSION );
+ TQString version = TQString::number( KNOTES_VERSION );
KAboutData aboutData(
"knotes",
@@ -122,7 +122,7 @@ int main( int argc, char* argv[] )
KUniqueApplication::addCmdLineOptions();
Application app;
- app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
+ app.connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) );
remove_sm_from_client_leader();
diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp
index 194afb6f0..a6e4b9a3f 100644
--- a/knotes/resourcelocal.cpp
+++ b/knotes/resourcelocal.cpp
@@ -45,7 +45,7 @@
ResourceLocal::ResourceLocal( const KConfig *config )
- : ResourceNotes( config ), mCalendar( QString::fromLatin1( "UTC" ) )
+ : ResourceNotes( config ), mCalendar( TQString::fromLatin1( "UTC" ) )
{
kdDebug(5500) << "ResourceLocal::ResourceLocal()" << endl;
setType( "file" );
@@ -108,20 +108,20 @@ bool ResourceLocal::deleteNote( KCal::Journal *journal )
return true;
}
-KCal::Alarm::List ResourceLocal::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List ResourceLocal::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List alarms;
KCal::Journal::List notes = mCalendar.journals();
KCal::Journal::List::ConstIterator note;
for ( note = notes.begin(); note != notes.end(); ++note )
{
- QDateTime preTime = from.addSecs( -1 );
+ TQDateTime preTime = from.addSecs( -1 );
KCal::Alarm::List::ConstIterator it;
for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it )
{
if ( (*it)->enabled() )
{
- QDateTime dt = (*it)->nextRepetition( preTime );
+ TQDateTime dt = (*it)->nextRepetition( preTime );
if ( dt.isValid() && dt <= to )
alarms.append( *it );
}
diff --git a/knotes/resourcelocal.h b/knotes/resourcelocal.h
index da318727a..0262674bd 100644
--- a/knotes/resourcelocal.h
+++ b/knotes/resourcelocal.h
@@ -64,7 +64,7 @@ public:
virtual bool addNote( KCal::Journal* );
virtual bool deleteNote( KCal::Journal* );
- virtual KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ virtual KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
protected:
KCal::CalendarLocal mCalendar;
diff --git a/knotes/resourcelocal_plugin.cpp b/knotes/resourcelocal_plugin.cpp
index 352a4c68e..0670956bb 100644
--- a/knotes/resourcelocal_plugin.cpp
+++ b/knotes/resourcelocal_plugin.cpp
@@ -43,7 +43,7 @@ public:
return new ResourceLocal( config );
}
- KRES::ConfigWidget *configWidget( QWidget *parent )
+ KRES::ConfigWidget *configWidget( TQWidget *parent )
{
return new ResourceLocalConfig(parent);
}
@@ -56,7 +56,7 @@ extern "C"
return new LocalNotesFactory();
}
- KRES::ConfigWidget *config_widget( QWidget* parent )
+ KRES::ConfigWidget *config_widget( TQWidget* parent )
{
return new ResourceLocalConfig( parent, "Configure Local Resource" );
}
diff --git a/knotes/resourcelocalconfig.cpp b/knotes/resourcelocalconfig.cpp
index 18e72c053..417f81a05 100644
--- a/knotes/resourcelocalconfig.cpp
+++ b/knotes/resourcelocalconfig.cpp
@@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*******************************************************************/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -29,12 +29,12 @@
#include "resourcelocal.h"
#include "resourcelocalconfig.h"
-ResourceLocalConfig::ResourceLocalConfig( QWidget *parent, const char *name )
+ResourceLocalConfig::ResourceLocalConfig( TQWidget *parent, const char *name )
: KRES::ConfigWidget( parent, name )
{
- QHBoxLayout *layout = new QHBoxLayout( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this );
- QLabel *label = new QLabel( i18n( "Location:" ), this );
+ TQLabel *label = new TQLabel( i18n( "Location:" ), this );
mURL = new KURLRequester( this );
KFile::Mode mode = static_cast<KFile::Mode>( KFile::File |
KFile::LocalOnly );
diff --git a/knotes/resourcelocalconfig.h b/knotes/resourcelocalconfig.h
index 9a691853b..242b34a46 100644
--- a/knotes/resourcelocalconfig.h
+++ b/knotes/resourcelocalconfig.h
@@ -29,7 +29,7 @@ class ResourceLocalConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- ResourceLocalConfig( QWidget *parent = 0, const char *name = 0 );
+ ResourceLocalConfig( TQWidget *parent = 0, const char *name = 0 );
virtual ~ResourceLocalConfig();
public slots:
diff --git a/knotes/resourcemanager.cpp b/knotes/resourcemanager.cpp
index aa73fc06c..112ec03f8 100644
--- a/knotes/resourcemanager.cpp
+++ b/knotes/resourcemanager.cpp
@@ -38,7 +38,7 @@
KNotesResourceManager::KNotesResourceManager()
- : QObject( 0, "KNotes Resource Manager" )
+ : TQObject( 0, "KNotes Resource Manager" )
{
m_manager = new KRES::Manager<ResourceNotes>( "notes" );
m_manager->addObserver( this );
@@ -103,7 +103,7 @@ void KNotesResourceManager::registerNote( ResourceNotes *resource,
void KNotesResourceManager::deleteNote( KCal::Journal *journal )
{
- QString uid = journal->uid();
+ TQString uid = journal->uid();
// Remove the journal from the resource it came from
m_resourceMap[ uid ]->deleteNote( journal );
@@ -114,7 +114,7 @@ void KNotesResourceManager::deleteNote( KCal::Journal *journal )
emit sigDeregisteredNote( journal );
}
-KCal::Alarm::List KNotesResourceManager::alarms( const QDateTime& from, const QDateTime& to )
+KCal::Alarm::List KNotesResourceManager::alarms( const TQDateTime& from, const TQDateTime& to )
{
KCal::Alarm::List result;
diff --git a/knotes/resourcemanager.h b/knotes/resourcemanager.h
index b32e0f52a..0ba70b4b5 100644
--- a/knotes/resourcemanager.h
+++ b/knotes/resourcemanager.h
@@ -47,7 +47,7 @@ namespace KCal {
}
-class KNotesResourceManager : public QObject, public KRES::ManagerObserver<ResourceNotes>
+class KNotesResourceManager : public TQObject, public KRES::ManagerObserver<ResourceNotes>
{
Q_OBJECT
public:
@@ -62,7 +62,7 @@ public:
void deleteNote( KCal::Journal *journal );
- KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to );
+ KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to );
// from the ManagerObserver interface
virtual void resourceAdded( ResourceNotes *resource );
@@ -75,7 +75,7 @@ signals:
private:
KRES::Manager<ResourceNotes> *m_manager;
- QDict<ResourceNotes> m_resourceMap;
+ TQDict<ResourceNotes> m_resourceMap;
};
diff --git a/knotes/resourcenotes.h b/knotes/resourcenotes.h
index a1c2f67b8..988c8dde3 100644
--- a/knotes/resourcenotes.h
+++ b/knotes/resourcenotes.h
@@ -71,7 +71,7 @@ public:
virtual bool addNote( KCal::Journal * ) = 0;
virtual bool deleteNote( KCal::Journal * ) = 0;
- virtual KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to ) = 0;
+ virtual KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ) = 0;
void setManager( KNotesResourceManager *manager ) { mManager = manager; }
KNotesResourceManager *manager() const { return mManager; }