author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/details/look_details.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/details/look_details.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/details/look_details.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kaddressbook/details/look_details.cpp b/kaddressbook/details/look_details.cpp index 11d06e9..2c3a79d 100644 --- a/kaddressbook/details/look_details.cpp +++ b/kaddressbook/details/look_details.cpp @@ -160,68 +160,68 @@ void KABDetailedView::paintEvent( QPaintEvent* ) mPainter->setShowURLs( mActionShowURLs->isChecked() ); mPainter->printAddressee( addressee(), QRect( 0, 0, entryArea.width(), entryArea.height() ), &p ); p.end(); bitBlt( this, 0, 0, &pm ); } void KABDetailedView::mouseMoveEvent( QMouseEvent *e ) { QPoint bias( mGrid, mGrid ); int rc; bool hit = false; if ( ( rc = mPainter->hitsEmail( e->pos() - bias ) ) != -1 ) hit = true; else if ( ( rc = mPainter->hitsURL( e->pos() - bias ) ) != -1 ) hit = true; else if ( ( rc = mPainter->hitsPhone( e->pos() - bias ) ) != -1 ) hit = true; else if ( ( rc = mPainter->hitsTalk( e->pos() - bias ) ) != -1 ) hit = true; if ( hit ) { if ( cursor().shape() != PointingHandCursor ) setCursor( PointingHandCursor ); else if( cursor().shape() != ArrowCursor ) setCursor(ArrowCursor); } } void KABDetailedView::mousePressEvent( QMouseEvent *e ) { - QPopupMenu menu( this ); - QPopupMenu *menuBG = new QPopupMenu( &menu ); - mMenuBorderedBG = new QPopupMenu( &menu ); - mMenuTiledBG = new QPopupMenu( &menu ); + Q3PopupMenu menu( this ); + Q3PopupMenu *menuBG = new Q3PopupMenu( &menu ); + mMenuBorderedBG = new Q3PopupMenu( &menu ); + mMenuTiledBG = new Q3PopupMenu( &menu ); menu.insertItem( i18n( "Select Background" ), menuBG ); menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG ); menuBG->insertItem( i18n( "Tiled Backgrounds" ), mMenuTiledBG ); menu.insertSeparator(); QPoint point = e->pos() - QPoint( mGrid, mGrid ); int rc; QStringList dirsBorderedBG, dirsTiledBG; QDir dir; switch( e->button() ) { case QMouseEvent::RightButton: if ( isReadOnly() ) menu.setItemEnabled( menu.idAt( 0 ), false ); else { // TODO: settings need to be saved in view options dirsBorderedBG = KGlobal::instance()->dirs()->findDirs( "data", mBorderedBGDir ); if ( dirsBorderedBG.count() > 0 ) { dir.setPath( dirsBorderedBG[ 0 ] ); mBorders = dir.entryList( QDir::Files ); for ( uint count = 0; count < mBorders.count(); ++count ) mMenuBorderedBG->insertItem( mBorders[ count ], count ); connect( mMenuBorderedBG, SIGNAL( activated( int ) ), SLOT( slotBorderedBGSelected( int ) ) ); } else menuBG->setItemEnabled( menuBG->idAt( 0 ), false ); dirsTiledBG = KGlobal::instance()->dirs()->findDirs( "data", mTiledBGDir ); if ( dirsTiledBG.count() > 0 ) { dir.setPath( dirsTiledBG[ 0 ] ); @@ -385,35 +385,35 @@ void KABDetailedView::restoreSettings( KConfig *config ) } } if ( count == dirs.count() ) { mUseDefaultBGImage = getBackground( bgImage, mDefaultBGImage ); if ( !mUseDefaultBGImage ) kdDebug(5720) << "KABDetailedView::configure: " << "default BG image selected, but could not be loaded." << endl; } } mDefaultBGColor = config->readColorEntry( ConfigView_DefaultBackgroundColor, &white ); mHeadLineBGColor = config->readColorEntry( ConfigView_HeadlineBGColor, &darkBlue ); mHeadLineTextColor = config->readColorEntry( ConfigView_HeadlineTextColor, &yellow ); mUseHeadLineBGColor = config->readBoolEntry( ConfigView_UseHeadlineBGColor, true ); if ( !mPainter ) mPainter = new KABEntryPainter; mPainter->setForegroundColor( black ); mPainter->setHeaderColor( mHeadLineTextColor ); mPainter->setUseHeaderColor( mUseHeadLineBGColor ); mPainter->setBackgroundColor( mHeadLineBGColor ); mPainter->setHeaderFont( QFont( gfont, gpointsize + 4, QFont::Bold, true ) ); mPainter->setHeadLineFont( QFont( gfont, gpointsize + 2, QFont::Bold, true ) ); mPainter->setBodyFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); mPainter->setFixedFont( QFont( ffont, fpointsize, QFont::Normal, false ) ); mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); } -#ifndef KAB_EMBEDDED -#include "look_details.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_details.cpp" #endif //KAB_EMBEDDED |