summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details
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
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/details') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp19
-rw-r--r--kaddressbook/details/detailsviewcontainer.h8
-rw-r--r--kaddressbook/details/look_basic.cpp6
-rw-r--r--kaddressbook/details/look_basic.h4
-rw-r--r--kaddressbook/details/look_details.cpp12
-rw-r--r--kaddressbook/details/look_details.h4
-rw-r--r--kaddressbook/details/look_html.cpp6
7 files changed, 31 insertions, 28 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index cee5886..4a86aca 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -13,67 +13,70 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qcombobox.h>
-#include <qframe.h>
+#include <q3frame.h>
#include <qlabel.h>
#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <q3widgetstack.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3VBoxLayout>
#include <kapplication.h>
#include <kdebug.h>
#include <kdialog.h>
#include "look_basic.h"
//#include "look_details.h"
#include "look_html.h"
#ifdef KAB_EMBEDDED
#include "kabprefs.h"
#endif //KAB_EMBEDDED
#include "detailsviewcontainer.h"
ViewContainer::ViewContainer( QWidget *parent, const char* name )
: QWidget( parent, name ), mCurrentLook( 0 )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
//topLayout->setMargin( KDialog::marginHint() );
//topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( 0 );
topLayout->setSpacing( 0 );
- QBoxLayout *styleLayout = new QHBoxLayout( topLayout );
+ Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout );
QLabel *label = new QLabel( i18n("Style:"), this );
styleLayout->addWidget( label );
mStyleCombo = new QComboBox( this );
styleLayout->addWidget( mStyleCombo );
- QFrame *frameRuler = new QFrame( this );
+ Q3Frame *frameRuler = new Q3Frame( this );
//US frameRuler->setFrameShape( QFrame::HLine );
//US frameRuler->setFrameShadow( QFrame::Sunken );
//US topLayout->addWidget( frameRuler );
- mDetailsStack = new QWidgetStack( this );
+ mDetailsStack = new Q3WidgetStack( this );
topLayout->addWidget( mDetailsStack, 1 );
registerLooks();
#if 1
// Hide detailed view selection combo box, because we currently have
// only one. Reenable it when there are more detailed views.
label->hide();
mStyleCombo->hide();
frameRuler->hide();
#endif
}
@@ -150,15 +153,15 @@ KABC::Addressee ViewContainer::addressee()
if ( !mCurrentLook )
return empty;
else
return mCurrentLook->addressee();
}
void ViewContainer::setReadOnly( bool state )
{
if ( mCurrentLook )
mCurrentLook->setReadOnly( state );
}
-#ifndef KAB_EMBEDDED
-#include "detailsviewcontainer.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_detailsviewcontainer.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h
index 9684736..f310a30 100644
--- a/kaddressbook/details/detailsviewcontainer.h
+++ b/kaddressbook/details/detailsviewcontainer.h
@@ -15,30 +15,30 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef DETAILSVIEWCONTAINER_H
#define DETAILSVIEWCONTAINER_H
-#include <qptrlist.h>
+#include <q3ptrlist.h>
#include "look_basic.h"
class QComboBox;
-class QWidgetStack;
+class Q3WidgetStack;
class ViewContainer : public QWidget
{
Q_OBJECT
public:
ViewContainer( QWidget *parent = 0, const char* name = 0 );
/**
Return the look currently selected. If there is none, it
returns zero. Do not use this pointer to store a reference
to a look, the user might select another one (e.g., create
@@ -85,19 +85,19 @@ class ViewContainer : public QWidget
A style has been selected. Overloaded from base class.
*/
void slotStyleSelected( int );
/**
Register the available looks.
*/
void registerLooks();
private:
KABC::Addressee mCurrentAddressee;
KABBasicLook *mCurrentLook;
- QPtrList<KABLookFactory> mLookFactories;
+ Q3PtrList<KABLookFactory> mLookFactories;
QComboBox *mStyleCombo;
- QWidgetStack *mDetailsStack;
+ Q3WidgetStack *mDetailsStack;
};
#endif
diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp
index 0245686..48cc42a 100644
--- a/kaddressbook/details/look_basic.cpp
+++ b/kaddressbook/details/look_basic.cpp
@@ -17,25 +17,25 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <kdebug.h>
#include "look_basic.h"
KABBasicLook::KABBasicLook( QWidget *parent, const char *name )
- : QVBox( parent, name ), mReadOnly( false )
+ : Q3VBox( parent, name ), mReadOnly( false )
{
}
void KABBasicLook::setReadOnly( bool state )
{
mReadOnly = state;
}
bool KABBasicLook::isReadOnly() const
{
return mReadOnly;
}
@@ -61,15 +61,15 @@ void KABBasicLook::restoreSettings( KConfig* )
void KABBasicLook::saveSettings( KConfig* )
{
}
KABLookFactory::KABLookFactory( QWidget *parent, const char *name )
: mParent( parent ), mName( name )
{
}
KABLookFactory::~KABLookFactory()
{
}
-#ifndef KAB_EMBEDDED
-#include "look_basic.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_look_basic.cpp"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h
index a65c99c..a70e7f7 100644
--- a/kaddressbook/details/look_basic.h
+++ b/kaddressbook/details/look_basic.h
@@ -16,41 +16,41 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef LOOK_KABBASIC_H
#define LOOK_KABBASIC_H
#include <kabc/addressbook.h>
-#include <qvbox.h>
+#include <q3vbox.h>
class KConfig;
/**
This is a pure virtual base class that defines the
interface for how to display and change entries of
the KDE addressbook.
This basic widget does not show anything in its client space.
Derive it and implement its look and how the user may edit the
entry.
The paintEvent() has to paint the whole widget, since repaint()
calls will not delete the widgets background.
*/
-class KABBasicLook : public QVBox
+class KABBasicLook : public Q3VBox
{
Q_OBJECT
public:
/**
The constructor.
*/
KABBasicLook( QWidget *parent = 0, const char *name = 0 );
/**
Set the entry. It will be displayed automatically.
*/
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
@@ -180,28 +180,28 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e )
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() ) {
@@ -405,15 +405,15 @@ void KABDetailedView::restoreSettings( KConfig *config )
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
diff --git a/kaddressbook/details/look_details.h b/kaddressbook/details/look_details.h
index e8d50a9..b59d3a7 100644
--- a/kaddressbook/details/look_details.h
+++ b/kaddressbook/details/look_details.h
@@ -121,26 +121,26 @@ class KABDetailedView : public KABBasicLook
QPixmap mDefaultBGImage;
KToggleAction *mActionShowAddresses;
KToggleAction *mActionShowEmails;
KToggleAction *mActionShowPhones;
KToggleAction *mActionShowURLs;
const int mGrid;
QStringList mBorders;
QStringList mTiles;
- QPopupMenu *mMenuBorderedBG;
- QPopupMenu *mMenuTiledBG;
+ Q3PopupMenu *mMenuBorderedBG;
+ Q3PopupMenu *mMenuTiledBG;
static const QString mBorderedBGDir;
static const QString mTiledBGDir;
};
class KABDetailedViewFactory : public KABLookFactory
{
public:
KABDetailedViewFactory( QWidget *parent = 0, const char *name = 0 )
: KABLookFactory( parent, name ) {}
KABBasicLook *create()
diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp
index bb30650..4ec1c7d 100644
--- a/kaddressbook/details/look_html.cpp
+++ b/kaddressbook/details/look_html.cpp
@@ -15,25 +15,25 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <addresseeview.h>
#include "look_html.h"
-#include <qscrollview.h>
+#include <q3scrollview.h>
#include "kabprefs.h"
#include <kabc/addresseeview.h>
KABHtmlView::KABHtmlView( QWidget *parent, const char *name )
: KABBasicLook( parent, name )
{
mView = new KABC::AddresseeView( this );
mView->setFont( KABPrefs::instance()->mDetailsFont );
connect(this, SIGNAL(printMyView()),
this , SLOT(printMe()));
}
KABHtmlView::~KABHtmlView()
@@ -42,15 +42,15 @@ KABHtmlView::~KABHtmlView()
void KABHtmlView::printMe()
{
mView->printMe();
}
void KABHtmlView::setAddressee( const KABC::Addressee &addr )
{
mView->setFont( KABPrefs::instance()->mDetailsFont );
mView->setAddressee( addr );
}
-#ifndef KAB_EMBEDDED
-#include "look_html.moc"
+#ifndef KAB_EMBEDDED_
+#include "moc_look_html.cpp"
#endif //KAB_EMBEDDED