summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/knotes/knotetip.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kontact/plugins/knotes/knotetip.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/plugins/knotes/knotetip.cpp')
-rw-r--r--kontact/plugins/knotes/knotetip.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kontact/plugins/knotes/knotetip.cpp b/kontact/plugins/knotes/knotetip.cpp
index 6e2c998d7..64db3a336 100644
--- a/kontact/plugins/knotes/knotetip.cpp
+++ b/kontact/plugins/knotes/knotetip.cpp
@@ -29,9 +29,9 @@
your version.
*/
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -41,23 +41,23 @@
KNoteTip::KNoteTip( KIconView *parent )
- : QFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
+ : TQFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop ),
mFilter( false ),
mView( parent ),
mNoteIVI( 0 ),
- mPreview( new QTextEdit( this ) )
+ mPreview( new TQTextEdit( this ) )
{
mPreview->setReadOnly( true );
- mPreview->setHScrollBarMode( QScrollView::AlwaysOff );
- mPreview->setVScrollBarMode( QScrollView::AlwaysOff );
+ mPreview->setHScrollBarMode( TQScrollView::AlwaysOff );
+ mPreview->setVScrollBarMode( TQScrollView::AlwaysOff );
- QBoxLayout *layout = new QVBoxLayout( this );
+ TQBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( mPreview );
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setMargin( 1 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
hide();
}
@@ -87,8 +87,8 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
else
mPreview->setTextFormat( Qt::PlainText );
- QColor fg( journal->customProperty( "KNotes", "FgColor" ) );
- QColor bg( journal->customProperty( "KNotes", "BgColor" ) );
+ TQColor fg( journal->customProperty( "KNotes", "FgColor" ) );
+ TQColor bg( journal->customProperty( "KNotes", "BgColor" ) );
setColor( fg, bg );
mPreview->setText( journal->description() );
@@ -100,7 +100,7 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
while ( w > 60 && h == mPreview->heightForWidth( w - 20 ) )
w -= 20;
- QRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
+ TQRect desk = KGlobalSettings::desktopGeometry( mNoteIVI->rect().center() );
resize( w, QMIN( h, desk.height() / 2 - 20 ) );
hide();
@@ -113,13 +113,13 @@ void KNoteTip::setNote( KNotesIconViewItem *item )
// protected, virtual methods
-void KNoteTip::resizeEvent( QResizeEvent *ev )
+void KNoteTip::resizeEvent( TQResizeEvent *ev )
{
- QFrame::resizeEvent( ev );
+ TQFrame::resizeEvent( ev );
reposition();
}
-void KNoteTip::timerEvent( QTimerEvent * )
+void KNoteTip::timerEvent( TQTimerEvent * )
{
killTimers();
@@ -133,17 +133,17 @@ void KNoteTip::timerEvent( QTimerEvent * )
}
}
-bool KNoteTip::eventFilter( QObject *, QEvent *e )
+bool KNoteTip::eventFilter( TQObject *, TQEvent *e )
{
switch ( e->type() ) {
- case QEvent::Leave:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- case QEvent::Wheel:
+ case TQEvent::Leave:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ case TQEvent::Wheel:
killTimers();
setFilter( false );
hide();
@@ -157,20 +157,20 @@ bool KNoteTip::eventFilter( QObject *, QEvent *e )
// private stuff
-void KNoteTip::setColor( const QColor &fg, const QColor &bg )
+void KNoteTip::setColor( const TQColor &fg, const TQColor &bg )
{
- QPalette newpalette = palette();
- newpalette.setColor( QColorGroup::Background, bg );
- newpalette.setColor( QColorGroup::Foreground, fg );
- newpalette.setColor( QColorGroup::Base, bg ); // text background
- newpalette.setColor( QColorGroup::Text, fg ); // text color
- newpalette.setColor( QColorGroup::Button, bg );
+ TQPalette newpalette = palette();
+ newpalette.setColor( TQColorGroup::Background, bg );
+ newpalette.setColor( TQColorGroup::Foreground, fg );
+ newpalette.setColor( TQColorGroup::Base, bg ); // text background
+ newpalette.setColor( TQColorGroup::Text, fg ); // text color
+ newpalette.setColor( TQColorGroup::Button, bg );
// the shadow
- newpalette.setColor( QColorGroup::Midlight, bg.light(110) );
- newpalette.setColor( QColorGroup::Shadow, bg.dark(116) );
- newpalette.setColor( QColorGroup::Light, bg.light(180) );
- newpalette.setColor( QColorGroup::Dark, bg.dark(108) );
+ newpalette.setColor( TQColorGroup::Midlight, bg.light(110) );
+ newpalette.setColor( TQColorGroup::Shadow, bg.dark(116) );
+ newpalette.setColor( TQColorGroup::Light, bg.light(180) );
+ newpalette.setColor( TQColorGroup::Dark, bg.dark(108) );
setPalette( newpalette );
// set the text color
@@ -185,9 +185,9 @@ void KNoteTip::setFilter( bool enable )
if ( enable ) {
kapp->installEventFilter( this );
- QApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
} else {
- QApplication::setGlobalMouseTracking( false );
+ TQApplication::setGlobalMouseTracking( false );
kapp->removeEventFilter( this );
}
@@ -199,14 +199,14 @@ void KNoteTip::reposition()
if ( !mNoteIVI )
return;
- QRect rect = mNoteIVI->rect();
- QPoint off = mView->mapToGlobal( mView->contentsToViewport( QPoint( 0, 0 ) ) );
+ TQRect rect = mNoteIVI->rect();
+ TQPoint off = mView->mapToGlobal( mView->contentsToViewport( TQPoint( 0, 0 ) ) );
rect.moveBy( off.x(), off.y() );
- QPoint pos = rect.center();
+ TQPoint pos = rect.center();
// should the tooltip be shown to the left or to the right of the ivi?
- QRect desk = KGlobalSettings::desktopGeometry( pos );
+ TQRect desk = KGlobalSettings::desktopGeometry( pos );
if ( rect.center().x() + width() > desk.right() ) {
// to the left
if ( pos.x() - width() < 0 )