From eeb28ead6d3050d662783696661d9360a049104f Mon Sep 17 00:00:00 2001 From: eilers Date: Fri, 07 Mar 2003 14:33:36 +0000 Subject: Removed unused files and starting with WhatsThis.. --- (limited to 'core/pim/addressbook') diff --git a/core/pim/addressbook/addresssettings.cpp b/core/pim/addressbook/addresssettings.cpp deleted file mode 100644 index 2a9413c..0000000 --- a/core/pim/addressbook/addresssettings.cpp +++ b/dev/null @@ -1,136 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Palmtop Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - - -#include "addresssettings.h" - -#include -#include - -#include -#include - -#include - -AddressSettings::AddressSettings( QWidget *parent, const char *name ) - : AddressSettingsBase( parent, name, TRUE ) -{ - init(); -} - -AddressSettings::~AddressSettings() -{ -} - -void AddressSettings::init() -{ - QStringList slFields = OContact::trfields(); - // Make this match what is in initFields - slFields.remove( tr("Name Title") ); - slFields.remove( tr("First Name") ); - slFields.remove( tr("Last Name") ); - slFields.remove( tr("File As") ); - slFields.remove( tr("Default Email") ); - slFields.remove( tr("Notes") ); - slFields.remove( tr("Gender") ); - - - for( QStringList::Iterator it = slFields.begin(); - it != slFields.end(); ++it ) { - fieldListBox->insertItem( *it ); - } - - Config cfg( "AddressBook" ); - - cfg.setGroup( "Version" ); - int version; - version = cfg.readNumEntry( "version" ); - if ( version >= ADDRESSVERSION ) { - int i = 0; - int p = 0; - cfg.setGroup( "ImportantCategory" ); - QString zn = cfg.readEntry( "Category" + QString::number(i), - QString::null ); - while ( !zn.isNull() ) { - for ( int m = i; m < (int)fieldListBox->count(); m++ ) { - if ( fieldListBox->text( m ) == zn ) { - if ( m != p ) { - fieldListBox->removeItem( m ); - fieldListBox->insertItem( zn, p ); - } - p++; - break; - } - } - zn = cfg.readEntry( "Category" + QString::number(++i), - QString::null ); - } - - fieldListBox->setCurrentItem( 0 ); - } else { - QString str; - str = getenv("HOME"); - - str += "/Settings/AddressBook.conf"; - QFile::remove( str ); - } -} - -void AddressSettings::itemUp() -{ - int i = fieldListBox->currentItem(); - if ( i > 0 ) { - QString item = fieldListBox->currentText(); - fieldListBox->removeItem( i ); - fieldListBox->insertItem( item, i-1 ); - fieldListBox->setCurrentItem( i-1 ); - } -} - -void AddressSettings::itemDown() -{ - int i = fieldListBox->currentItem(); - if ( i < (int)fieldListBox->count() - 1 ) { - QString item = fieldListBox->currentText(); - fieldListBox->removeItem( i ); - fieldListBox->insertItem( item, i+1 ); - fieldListBox->setCurrentItem( i+1 ); - } -} - -void AddressSettings::accept() -{ - save(); - QDialog::accept(); -} - - -void AddressSettings::save() -{ - Config cfg( "AddressBook" ); - cfg.setGroup( "Version" ); - // *** To change the version change it here... - cfg.writeEntry( "version", QString::number(ADDRESSVERSION) ); - cfg.setGroup( "ImportantCategory" ); - - for ( int i = 0; i < (int)fieldListBox->count(); i++ ) { - cfg.writeEntry( "Category"+QString::number(i), fieldListBox->text(i) ); - } -} diff --git a/core/pim/addressbook/addresssettings.h b/core/pim/addressbook/addresssettings.h deleted file mode 100644 index 0fdfa77..0000000 --- a/core/pim/addressbook/addresssettings.h +++ b/dev/null @@ -1,47 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qt Palmtop Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef _ADDRESSSETTINGS_H_ -#define _ADDRESSSETTINGS_H_ - -#include -#include -#include "addresssettingsbase.h" - -const int ADDRESSVERSION = 3; - -class AddressSettings : public AddressSettingsBase -{ - Q_OBJECT -public: - AddressSettings( QWidget *parent = 0, const char *name = 0 ); - ~AddressSettings(); - -protected: - void accept(); - virtual void itemUp(); - virtual void itemDown(); - -private: - void init(); - void save(); -}; - -#endif // _ADDRESSSETTINGS_H_ diff --git a/core/pim/addressbook/addresssettingsbase.ui b/core/pim/addressbook/addresssettingsbase.ui deleted file mode 100644 index f0eb7e8..0000000 --- a/core/pim/addressbook/addresssettingsbase.ui +++ b/dev/null @@ -1,170 +0,0 @@ - -AddressSettingsBase -/********************************************************************** -** Copyright (C) 2001 Trolltech AS. All rights reserved. -** -** This file is part of Qt Palmtop Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -** $Id$ -** -**********************************************************************/ - - QDialog - - name - AddressSettingsBase - - - geometry - - 0 - 0 - 240 - 207 - - - - caption - Arrange Edit Fields - - - layoutMargin - - - layoutSpacing - - - - margin - 6 - - - spacing - 6 - - - QListBox - - name - fieldListBox - - - - QLabel - - name - lblExplain - - - sizePolicy - - 1 - 1 - - - - frameShape - MShape - - - frameShadow - MShadow - - - text - Select the field order: - - - alignment - AlignTop|AlignLeft - - - hAlign - - - vAlign - - - - QPushButton - - name - upButton - - - text - Up - - - autoRepeat - true - - - - QPushButton - - name - downButton - - - text - Down - - - autoRepeat - true - - - - - name - Spacer2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - upButton - clicked() - AddressSettingsBase - itemUp() - - - downButton - clicked() - AddressSettingsBase - itemDown() - - itemUp() - itemDown() - - diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index f5c0c5b..f2f4141 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp @@ -21,6 +21,9 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): allFieldListBox->insertItem( contFields[i] ); } + // Reset Widget Flags: This was not changeable by designer :( + setWFlags ( WStyle_ContextHelp ); + // Set Pics to Buttons and Tabs m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui index 8ae2578..308e138 100644 --- a/core/pim/addressbook/configdlg_base.ui +++ b/core/pim/addressbook/configdlg_base.ui @@ -1,6 +1,7 @@ ConfigDlg_Base Stefan Eilers +qwhatsthis.h QDialog @@ -12,7 +13,7 @@ 0 0 - 282 + 284 327 @@ -62,6 +63,10 @@ layoutSpacing + + whatsThis + Click on tab to select one + QWidget @@ -110,6 +115,10 @@ title Query Style + + whatsThis + Settings for the search query style + margin @@ -129,6 +138,10 @@ text Use Regular Expressions + + whatsThis + Search widget expects regular expressions if selected + QRadioButton @@ -144,6 +157,10 @@ checked true + + whatsThis + Search widget just expects simple wildcards + @@ -157,6 +174,10 @@ text Case Sensitive + + whatsThis + If selected, search differs between upper and lower chars + @@ -170,6 +191,10 @@ title Font + + whatsThis + + margin @@ -189,6 +214,10 @@ text Small + + whatsThis + Font size for list- and card view + QRadioButton @@ -204,6 +233,10 @@ checked true + + whatsThis + Font size for list- and card view + QRadioButton @@ -215,6 +248,10 @@ text Large + + whatsThis + Font size for list- and card view + @@ -270,6 +307,10 @@ title Mail + + whatsThis + Fontsettings for list and card view + margin @@ -293,6 +334,10 @@ checked true + + whatsThis + Use Sharp's mail application if available + QRadioButton @@ -304,6 +349,10 @@ text Prefer Opie-Mail + + whatsThis + Use OPIE mail if installed + QLabel @@ -403,6 +452,10 @@ is provided free ! autoRepeat true + + whatsThis + Move selected attribute one line up + QPushButton @@ -425,6 +478,10 @@ is provided free ! autoRepeat true + + whatsThis + Move selected attribute one line down + QListBox @@ -439,6 +496,10 @@ is provided free ! 7 + + whatsThis + List of all available attributes + QPushButton @@ -457,6 +518,10 @@ is provided free ! text Add + + whatsThis + Add selected attribute from list below to the upper list + QPushButton @@ -475,6 +540,10 @@ is provided free ! text Remove + + whatsThis + Remove the selected attribute from the upper list + @@ -531,6 +600,10 @@ is provided free ! 7 + + whatsThis + Order (up -> down) defines the primary contact shown in the second column of the list view + diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 0b65a10..df97b85 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include @@ -65,8 +66,8 @@ void parseEmailTo( const QString &strDefaultEmail, ContactEditor::ContactEditor( const OContact &entry, QWidget *parent, const char *name, - WFlags fl ) - : QDialog( parent, name, TRUE, fl ), + WFlags ) + : QDialog( parent, name, TRUE, WStyle_ContextHelp ), defaultEmailChooserPosition( -1 ), m_personalView ( false ), cmbDefaultEmail( 0 ), @@ -148,27 +149,36 @@ void ContactEditor::init() { gl->setResizeMode( QLayout::FreeResize ); btnFullName = new QPushButton( tr( "Full Name..." ), container ); + QWhatsThis::add( btnFullName, tr( "Press to enter last- middle and firstname" ) ); gl->addWidget( btnFullName, 0, 0 ); txtFullName = new QLineEdit( container ); + QWhatsThis::add( txtFullName, tr( "Enter fullname directly ! If you have a lastname with multiple words ( for instance \"de la Guerra\"), please write , like this: \"de la Guerra, Carlos Pedro\"" ) ); gl->addWidget( txtFullName, 0, 1 ); QLabel *l = new QLabel( tr( "Job Title" ), container ); + QWhatsThis::add( l, tr( "The jobtitle.." ) ); gl->addWidget( l, 1, 0 ); txtJobTitle = new QLineEdit( container ); + QWhatsThis::add( txtJobTitle, tr( "The jobtitle.." ) ); gl->addWidget( txtJobTitle, 1, 1 ); l = new QLabel( tr("Suffix"), container ); + QWhatsThis::add( l, tr( "Something like \"jr.\".." ) ); gl->addWidget( l, 2, 0 ); txtSuffix = new QLineEdit( container ); + QWhatsThis::add( txtSuffix, tr( "Something like \"jr.\".." ) ); gl->addWidget( txtSuffix, 2, 1 ); l = new QLabel( tr( "Organization" ), container ); + QWhatsThis::add( l, tr( "The working place of the contact" ) ); gl->addWidget( l, 3, 0 ); txtOrganization = new QLineEdit( container ); + QWhatsThis::add( txtOrganization, tr( "The working place of the contact" ) ); gl->addWidget( txtOrganization, 3, 1 ); // Chooser 1 cmbChooserField1 = new QComboBox( FALSE, container ); + QWhatsThis::add( cmbChooserField1, tr( "Press to select attribute to change" ) ); cmbChooserField1->setMaximumWidth( 90 ); gl->addWidget( cmbChooserField1, 4, 0 ); // Textfield for chooser 1. @@ -181,6 +191,7 @@ void ContactEditor::init() { // Chooser 2 cmbChooserField2 = new QComboBox( FALSE, container ); + QWhatsThis::add( cmbChooserField2, tr( "Press to select attribute to change" ) ); cmbChooserField2->setMaximumWidth( 90 ); gl->addWidget( cmbChooserField2, 5, 0 ); // Textfield for chooser 2 @@ -193,6 +204,7 @@ void ContactEditor::init() { // Chooser 3 cmbChooserField3 = new QComboBox( FALSE, container ); + QWhatsThis::add( cmbChooserField3, tr( "Press to select attribute to change" ) ); cmbChooserField3->setMaximumWidth( 90 ); gl->addWidget( cmbChooserField3, 6, 0 ); // Textfield for chooser 2 @@ -204,6 +216,7 @@ void ContactEditor::init() { m_widgetStack3 -> raiseWidget( TextField ); l = new QLabel( tr( "File As" ), container ); + QWhatsThis::add( l, tr( "Press to select how to store the name (and howto show it in the listview)" ) ); gl->addWidget( l, 7, 0 ); cmbFileAs = new QComboBox( TRUE, container ); gl->addWidget( cmbFileAs, 7, 1 ); -- cgit v0.9.0.2