summaryrefslogtreecommitdiffstats
path: root/knotes/knote.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /knotes/knote.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knotes/knote.cpp')
-rw-r--r--knotes/knote.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/knotes/knote.cpp b/knotes/knote.cpp
index d4ce67b50..0f0ec426c 100644
--- a/knotes/knote.cpp
+++ b/knotes/knote.cpp
@@ -81,10 +81,10 @@ extern Time qt_x_time;
int KNote::s_ppOffset = 0;
-KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *name )
- : TQFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
+KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char *name )
+ : TQFrame( tqparent, 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_config( 0 ), m_journal( j ), m_tqfind( 0 ),
m_kwinConf( KSharedConfig::openConfig( "kwinrc", true ) ),
m_busy( 0 ), m_deleteWhenIdle( false ), m_blockEmitDataChanged( false )
{
@@ -266,7 +266,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *
bool closeLeft = false;
m_kwinConf->setGroup( "Style" );
if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) )
- closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1;
+ closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).tqfind( 'X' ) > -1;
TQPixmap pushpin_pix;
if ( closeLeft )
@@ -564,7 +564,7 @@ void KNote::setColor( const TQColor& fg, const TQColor& bg )
// set the color for the selection used to highlight the find stuff
TQColor sel = palette().color( TQPalette::Active, TQColorGroup::Base ).dark();
- if ( sel == Qt::black )
+ if ( sel == TQt::black )
sel = palette().color( TQPalette::Active, TQColorGroup::Base ).light();
m_editor->setSelectionAttributes( 1, sel, true );
@@ -577,33 +577,33 @@ void KNote::setColor( const TQColor& fg, const TQColor& bg )
emit sigColorChanged();
}
-void KNote::find( const TQString& pattern, long options )
+void KNote::tqfind( const TQString& pattern, long options )
{
- delete m_find;
- m_find = new KFind( pattern, options, this );
+ delete m_tqfind;
+ m_tqfind = new KFind( pattern, options, this );
- connect( m_find, TQT_SIGNAL(highlight( const TQString &, int, int )),
+ connect( m_tqfind, 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()) );
+ connect( m_tqfind, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()) );
- m_find->setData( plainText() );
+ m_tqfind->setData( plainText() );
slotFindNext();
}
void KNote::slotFindNext()
{
// TODO: honor FindBackwards
- // TODO: dialogClosed() -> delete m_find
+ // TODO: dialogClosed() -> delete m_tqfind
// Let KFind inspect the text fragment, and display a dialog if a match is found
- KFind::Result res = m_find->find();
+ KFind::Result res = m_tqfind->tqfind();
if ( res == KFind::NoMatch ) // i.e. at end-pos
{
m_editor->removeSelection( 1 );
emit sigFindFinished();
- delete m_find;
- m_find = 0;
+ delete m_tqfind;
+ m_tqfind = 0;
}
else
{
@@ -712,7 +712,7 @@ void KNote::slotRename()
bool ok;
aboutToEnterEventLoop();
TQString oldName = m_label->text();
- TQString newName = KInputDialog::getText( TQString::null,
+ TQString newName = KInputDialog::getText( TQString(),
i18n("Please enter the new name:"), m_label->text(), &ok, this );
eventLoopLeft();
m_blockEmitDataChanged = false;
@@ -876,7 +876,7 @@ void KNote::slotSaveAs()
convert->setText( i18n("Save note as plain text") );
}
- KFileDialog dlg( TQString::null, TQString::null, this, "filedialog", true, convert );
+ KFileDialog dlg( TQString(), TQString(), this, "filedialog", true, convert );
dlg.setOperationMode( KFileDialog::Saving );
dlg.setCaption( i18n("Save As") );
aboutToEnterEventLoop();
@@ -984,7 +984,7 @@ void KNote::slotUpdateDesktopActions()
TQStringList desktops;
desktops.append( i18n("&All Desktops") );
- desktops.append( TQString::null ); // Separator
+ desktops.append( TQString() ); // Separator
int count = wm_root.numberOfDesktops();
for ( int n = 1; n <= count; n++ )
@@ -1021,7 +1021,7 @@ void KNote::createFold()
{
TQPixmap fold( 15, 15 );
TQPainter foldp( &fold );
- foldp.setPen( Qt::NoPen );
+ foldp.setPen( TQt::NoPen );
foldp.setBrush( palette().active().dark() );
TQPointArray foldpoints( 3 );
foldpoints.putPoints( 0, 3, 0, 0, 14, 0, 0, 14 );
@@ -1136,7 +1136,7 @@ void KNote::updateBackground( int y_offset )
y_offset = y_offset % h;
TQImage grad_img( w, h, 32 );
- QRgb rgbcol;
+ TQRgb rgbcol;
TQColor bg = palette().active().background();
for ( int i = 0; i < h; ++i )
@@ -1155,7 +1155,7 @@ void KNote::updateBackground( int y_offset )
}
// setPaletteBackgroundPixmap makes TQTextEdit::color() stop working!!
- m_editor->setPaper( TQBrush( Qt::black, TQPixmap( grad_img ) ) );
+ m_editor->setPaper( TQBrush( TQt::black, TQPixmap( grad_img ) ) );
}
void KNote::updateLayout()
@@ -1166,7 +1166,7 @@ void KNote::updateLayout()
m_kwinConf->setGroup( "Style" );
if ( m_kwinConf->readBoolEntry( "CustomButtonPositions" ) )
- closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).find( 'X' ) > -1;
+ closeLeft = m_kwinConf->readEntry( "ButtonsOnLeft" ).tqfind( 'X' ) > -1;
if ( s_ppOffset )
{