summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details/look_details.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/details/look_details.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/details/look_details.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/details/look_details.cpp12
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
@@ -168,52 +168,52 @@ 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 );
@@ -393,27 +393,27 @@ void KABDetailedView::restoreSettings( KConfig *config )
<< 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