summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp4
-rw-r--r--microkde/kresources/configpage.cpp6
2 files changed, 9 insertions, 1 deletions
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 1093f9c..cc55a24 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -1,129 +1,133 @@
/*
This file is part of KAddressBook.
Copyright (C) 2003 Tobias Koenig <tokoe@kde.org>
based on the code of KSpread's CSV Import Dialog
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
+#ifdef DESKTOP_VERSION
#include <qinputdialog.h>
+#else
+#include <qtcompat/qinputdialog.h>
+#endif
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qtable.h>
#include <qlayout.h>
#include <qtextstream.h>
#include <qfile.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdialogbase.h>
#include <kfiledialog.h>
#include <klineedit.h>
#include <klocale.h>
#include <kglobal.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#ifdef DESKTOP_VERSION
#include "qtable.h"
#else
#include "qcombotableitem.h"
#endif
#include "csvimportdialog.h"
CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
const char * name )
: KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 |
User2, Ok, parent, name, true, true ),
mAdjustRows( false ),
mStartLine( 0 ),
mTextQuote( '"' ),
mDelimiter( "," ),
mAddressBook( ab )
{
initGUI();
mTypeMap.insert( i18n( "Undefined" ), Undefined );
mTypeMap.insert( KABC::Addressee::formattedNameLabel(), FormattedName );
mTypeMap.insert( KABC::Addressee::familyNameLabel(), FamilyName );
mTypeMap.insert( KABC::Addressee::givenNameLabel(), GivenName );
mTypeMap.insert( KABC::Addressee::additionalNameLabel(), AdditionalName );
mTypeMap.insert( KABC::Addressee::prefixLabel(), Prefix );
mTypeMap.insert( KABC::Addressee::suffixLabel(), Suffix );
mTypeMap.insert( KABC::Addressee::nickNameLabel(), NickName );
mTypeMap.insert( KABC::Addressee::birthdayLabel(), Birthday );
mTypeMap.insert( KABC::Addressee::homeAddressStreetLabel(), HomeAddressStreet );
mTypeMap.insert( KABC::Addressee::homeAddressLocalityLabel(),
HomeAddressLocality );
mTypeMap.insert( KABC::Addressee::homeAddressRegionLabel(), HomeAddressRegion );
mTypeMap.insert( KABC::Addressee::homeAddressPostalCodeLabel(),
HomeAddressPostalCode );
mTypeMap.insert( KABC::Addressee::homeAddressCountryLabel(),
HomeAddressCountry );
mTypeMap.insert( KABC::Addressee::homeAddressLabelLabel(), HomeAddressLabel );
mTypeMap.insert( KABC::Addressee::businessAddressStreetLabel(),
BusinessAddressStreet );
mTypeMap.insert( KABC::Addressee::businessAddressLocalityLabel(),
BusinessAddressLocality );
mTypeMap.insert( KABC::Addressee::businessAddressRegionLabel(),
BusinessAddressRegion );
mTypeMap.insert( KABC::Addressee::businessAddressPostalCodeLabel(),
BusinessAddressPostalCode );
mTypeMap.insert( KABC::Addressee::businessAddressCountryLabel(),
BusinessAddressCountry );
mTypeMap.insert( KABC::Addressee::businessAddressLabelLabel(),
BusinessAddressLabel );
mTypeMap.insert( KABC::Addressee::homePhoneLabel(), HomePhone );
mTypeMap.insert( KABC::Addressee::businessPhoneLabel(), BusinessPhone );
mTypeMap.insert( KABC::Addressee::mobilePhoneLabel(), MobilePhone );
mTypeMap.insert( KABC::Addressee::homeFaxLabel(), HomeFax );
mTypeMap.insert( KABC::Addressee::businessFaxLabel(), BusinessFax );
mTypeMap.insert( KABC::Addressee::carPhoneLabel(), CarPhone );
mTypeMap.insert( KABC::Addressee::isdnLabel(), Isdn );
mTypeMap.insert( KABC::Addressee::pagerLabel(), Pager );
mTypeMap.insert( KABC::Addressee::emailLabel(), Email );
mTypeMap.insert( KABC::Addressee::mailerLabel(), Mailer );
mTypeMap.insert( KABC::Addressee::titleLabel(), Title );
mTypeMap.insert( KABC::Addressee::roleLabel(), Role );
mTypeMap.insert( KABC::Addressee::organizationLabel(), Organization );
mTypeMap.insert( KABC::Addressee::noteLabel(), Note );
mTypeMap.insert( KABC::Addressee::urlLabel(), URL );
mCustomCounter = mTypeMap.count();
int count = mCustomCounter;
KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory );
KABC::Field::List::Iterator it;
for ( it = fields.begin(); it != fields.end(); ++it, ++count )
mTypeMap.insert( (*it)->label(), count );
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp
index 011e47e..fc7a42e 100644
--- a/microkde/kresources/configpage.cpp
+++ b/microkde/kresources/configpage.cpp
@@ -1,131 +1,135 @@
/*
This file is part of libkresources.
Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
Copyright (c) 2002 Jan-Pascal van Best <janpascal@vanbest.org>
Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qgroupbox.h>
+
+#ifdef DESKTOP_VERSION
#include <qinputdialog.h>
+#else
+#include <qtcompat/qinputdialog.h>
+#endif
#include <qlabel.h>
#include <qlayout.h>
-
#include <kapplication.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kurlrequester.h>
#include <klistview.h>
#include <kbuttonbox.h>
//US #include <ktrader.h>
#include "resource.h"
#include "configdialog.h"
#include "configpage.h"
//US
#include <qpushbutton.h>
#include <qfile.h>
#include <kglobal.h>
using namespace KRES;
class ConfigViewItem : public QCheckListItem
{
public:
ConfigViewItem( QListView *parent, Resource* resource ) :
QCheckListItem( parent, resource->resourceName(), CheckBox ),
mResource( resource ),
mIsStandard( false )
{
setText( 1, mResource->type() );
setOn( mResource->isActive() );
}
void setStandard( bool value )
{
setText( 2, ( value ? i18n( "Yes" ) : QString::null ) );
mIsStandard = value;
}
bool standard() const { return mIsStandard; }
bool readOnly() const { return mResource->readOnly(); }
Resource *resource() { return mResource; }
private:
Resource* mResource;
bool mIsStandard;
};
ConfigPage::ConfigPage( QWidget *parent, const char *name )
: QWidget( parent, name ),
mCurrentManager( 0 ),
mCurrentConfig( 0 )
{
setCaption( i18n( "Resource Configuration" ) );
QVBoxLayout *mainLayout = new QVBoxLayout( this );
QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->layout()->setSpacing( 3 );
groupBox->layout()->setMargin( 5 );
QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 );
//US mFamilyCombo = new KComboBox( false, groupBox );
mFamilyCombo = new KComboBox( groupBox );
groupBoxLayout->addMultiCellWidget( mFamilyCombo, 0, 0, 0, 1 );
mListView = new KListView( groupBox );
mListView->setAllColumnsShowFocus( true );
mListView->addColumn( i18n( "Name" ) );
mListView->addColumn( i18n( "Type" ) );
mListView->addColumn( i18n( "Standard" ) );
//US groupBoxLayout->addWidget( mListView, 1, 0 );
groupBoxLayout->addMultiCellWidget( mListView, 1, 1, 0, 1 );
mAddButton = new QPushButton( i18n( "&Add..." ), groupBox );
groupBoxLayout->addWidget( mAddButton, 2, 0 );
mRemoveButton = new QPushButton( i18n( "&Remove" ), groupBox );
groupBoxLayout->addWidget( mRemoveButton, 2, 1 );
mEditButton = new QPushButton( i18n( "&Edit..." ), groupBox );
groupBoxLayout->addWidget( mEditButton, 3, 0 );
mStandardButton = new QPushButton( i18n( "&Use as Standard" ), groupBox );
groupBoxLayout->addWidget( mStandardButton, 3, 1 );
mRemoveButton->setEnabled( false );
mEditButton->setEnabled( false );
mStandardButton->setEnabled( false );