summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Side-by-side diff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.cpp1
-rw-r--r--kaddressbook/mainembedded.cpp7
2 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp
index f84b2ba..eb5bdd9 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.cpp
+++ b/kaddressbook/kcmconfigs/addresseewidget.cpp
@@ -1,76 +1,77 @@
/*
This file is part of KAddressBook.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 <qgroupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlistbox.h>
#include <qpushbutton.h>
+#include <qapplication.h>
#include <kbuttonbox.h>
#include <kcombobox.h>
#include <kconfig.h>
#include <kdialog.h>
#include <klocale.h>
#include <kglobal.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include "addresseewidget.h"
NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
const char *name )
: QWidget( parent, name )
{
if (KGlobal::getOrientation() == KGlobal::Portrait)
{
QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(),
KDialog::spacingHintSmall() );
QLabel *label = new QLabel( i18n( title ), this );
layout->addWidget( label, 0, 1 );
mBox = new QListBox( this );
mBox->setMaximumSize(70, 70);
layout->addMultiCellWidget( mBox, 0, 1, 0, 0 );
KButtonBox *bbox = new KButtonBox( this, Qt::Vertical );
mAddButton = bbox->addButton( i18n( "Add" ), this, SLOT( add() ) );
mRemoveButton = bbox->addButton( i18n( "Rem" ), this, SLOT( remove() ) );
bbox->layout();
layout->addMultiCellWidget( bbox, 0, 1, 2,2);
mEdit = new KLineEdit( this );
layout->addWidget( mEdit, 1, 1 );
//mEdit->setMinimumWidth(50);
// layout->addWidget( group );
}
else
{
QHBoxLayout *layout = new QHBoxLayout( this );
QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this );
QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2,
KDialog::spacingHint() );
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index dce6a88..cf1fd3e 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -1,109 +1,110 @@
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#include <stdlib.h>
#else
#include <qapplication.h>
#include <qwindowsstyle.h>
#include <qplatinumstyle.h>
#include <qmainwindow.h>
#endif
#include <kstandarddirs.h>
#include <kglobal.h>
#include <stdio.h>
#include <qdir.h>
#include "kaddressbookmain.h"
int main( int argc, char **argv )
{
#ifndef DESKTOP_VERSION
QPEApplication a( argc, argv );
a.setKeepRunning ();
#else
QApplication a( argc, argv );
QApplication::setStyle( new QPlatinumStyle ());
#endif
bool exitHelp = false;
if ( argc > 1 ) {
QString command = argv[1];
if ( command == "-help" ){
printf("KA/E command line commands:\n");
printf(" no command: Start KA/E in usual way\n");
printf(" -help: This output\n");
printf(" KA/E is exiting now. Bye!\n");
exitHelp = true;
}
}
if ( ! exitHelp ) {
KGlobal::setAppName( "kaddressbook" );
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->width() > 320 )
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
else
KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
#else
QString fileName ;
- fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/";
+ fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
+ QApplication::addLibraryPath ( qApp->applicationDirPath () );
#endif
KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
KAddressBookMain m ;
//US MainWindow m;
//US QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
#ifndef DESKTOP_VERSION
a.showMainWidget( &m );
#else
- a.setMainWidget(m );
- m->show();
+ a.setMainWidget( &m );
+ m.show();
#endif
a.exec();
}
qDebug("KA: Bye! ");
}
/*
#include <stdlib.h>
#include <qstring.h>
#include <kabc/stdaddressbook.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kcrash.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstartupinfo.h>
#include <kuniqueapplication.h>
#include <kwin.h>
#include "kaddressbookmain.h"
#include "kabcore.h"
extern "C" {
void crashHandler( int )
{
KABC::StdAddressBook::handleCrash();
::exit( 0 );
}
}
class KAddressBookApp : public KUniqueApplication {
public:
KAddressBookApp() : mMainWin( 0 ) {}
~KAddressBookApp() {}
int newInstance();
private:
KAddressBookMain *mMainWin;
};
int KAddressBookApp::newInstance()
{