author | tux_mike <tux_mike> | 2002-03-26 17:39:54 (UTC) |
---|---|---|
committer | tux_mike <tux_mike> | 2002-03-26 17:39:54 (UTC) |
commit | e91f77a9ebf359c0fbf4f8d1a0de50bf0dcf81d8 (patch) (side-by-side diff) | |
tree | f3214c3c9dac147f43e127371e3f547f30c97dbf | |
parent | 7c55845eb070ce39eb0673be191130be64e96cfb (diff) | |
download | opie-e91f77a9ebf359c0fbf4f8d1a0de50bf0dcf81d8.zip opie-e91f77a9ebf359c0fbf4f8d1a0de50bf0dcf81d8.tar.gz opie-e91f77a9ebf359c0fbf4f8d1a0de50bf0dcf81d8.tar.bz2 |
Mike Crawford <mike@tuxnami.org>
Changed addressbook input screen to be a little more user friendly,
divided all the options into 3 tabs.
-rw-r--r-- | core/pim/addressbook/abeditor.cpp | 2 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 8 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.h | 4 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.pro | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/core/pim/addressbook/abeditor.cpp b/core/pim/addressbook/abeditor.cpp index 94baa71..6354db9 100644 --- a/core/pim/addressbook/abeditor.cpp +++ b/core/pim/addressbook/abeditor.cpp @@ -40,33 +40,33 @@ static inline bool containsAlphaNum( const QString &str ); static inline bool constainsWhiteSpace( const QString &str ); // helper functions, convert our comma delimited list to proper // file format... void parseEmailFrom( const QString &txt, QString &strDefaultEmail, QString &strAll ); // helper convert from file format to comma delimited... void parseEmailTo( const QString &strDefaultEmail, const QString &strOtherEmail, QString &strBack ); AbEditor::AbEditor( const Contact &entry, const QValueList<int> *newOrdered, QStringList *slNewOrdered, - QWidget *parent, const char *name, WFlags fl ) + QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ) : QDialog( parent, name, TRUE, fl ), orderedValues( newOrdered ), slOrdered( slNewOrdered ) { init(); initMap(); setEntry( entry ); } AbEditor::~AbEditor() { } void AbEditor::init() { middleEdit = 0; diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index a2b8276..e8fa37c 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -7,33 +7,33 @@ ** 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. ** **********************************************************************/ #define QTOPIA_INTERNAL_FD -#include "abeditor.h" +#include "contacteditor.h" #include "ablabel.h" #include "abtable.h" #include "addresssettings.h" #include "addressbook.h" #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/contact.h> #include <qpe/finddialog.h> #include <qpe/global.h> #include <qpe/resource.h> #include <qpe/ir.h> #include <qpe/qpemessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <qaction.h> @@ -416,33 +416,33 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) QDataStream stream(data,IO_ReadOnly); QString name, email; stream >> name >> email; Contact cnt; QString fn, mn, ln; parseName( name, &fn, &mn, &ln ); // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); cnt.setFirstName( fn ); cnt.setMiddleName( mn ); cnt.setLastName( ln ); cnt.setEmails( email ); cnt.setDefaultEmail( email ); cnt.setFileAs(); if ( bAbEditFirstTime ) { - abEditor = new AbEditor( cnt, &orderedFields, &slOrderedFields, + abEditor = new ContactEditor( cnt, &orderedFields, &slOrderedFields, this, "editor" ); bAbEditFirstTime = FALSE; } else { abEditor->setEntry( cnt ); } abView()->init( cnt ); editEntry( NewEntry ); } #if 0 else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) { QDataStream stream(data,IO_ReadOnly); QCString ch,m; QStringList types; @@ -467,33 +467,33 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { QStringList sel = picker.selection(i++); e << sel; } } #endif } void AddressbookWindow::editPersonal() { QString filename = addressbookPersonalVCardName(); Contact me; if (QFile::exists(filename)) me = Contact::readVCard( filename )[0]; if (bAbEditFirstTime) { - abEditor = new AbEditor( me, &orderedFields, &slOrderedFields, + abEditor = new ContactEditor( me, &orderedFields, &slOrderedFields, this, "editor" ); // don't create a new editor every time bAbEditFirstTime = FALSE; } else abEditor->setEntry( me ); abEditor->setCaption(tr("Edit My Personal Details")); abEditor->showMaximized(); // fix the foxus... abEditor->setNameFocus(); if ( abEditor->exec() ) { setFocus(); Contact new_personal = abEditor->entry(); QString fname = addressbookPersonalVCardName(); Contact::writeVCard( fname, new_personal ); @@ -527,33 +527,33 @@ void AddressbookWindow::slotPersonalView() Contact me; if (QFile::exists(filename)) me = Contact::readVCard( filename )[0]; abView()->init( me ); abView()->sync(); abList->hide(); setCentralWidget( abView() ); mView->show(); mView->setFocus(); } void AddressbookWindow::editEntry( EntryMode entryMode ) { Contact entry; if ( bAbEditFirstTime ) { - abEditor = new AbEditor( entry, &orderedFields, &slOrderedFields, + abEditor = new ContactEditor( entry, &orderedFields, &slOrderedFields, this, "editor" ); bAbEditFirstTime = FALSE; if ( entryMode == EditEntry ) abEditor->setEntry( abList->currentEntry() ); } // other things may chane the caption. abEditor->setCaption( tr("Edit Address") ); #if defined(Q_WS_QWS) || defined(_WS_QWS_) abEditor->showMaximized(); #endif // fix the foxus... abEditor->setNameFocus(); if ( abEditor->exec() ) { setFocus(); if ( entryMode == NewEntry ) { diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 9694465..342077f 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h @@ -9,33 +9,33 @@ ** 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 Addressbook_H #define Addressbook_H #include <qmainwindow.h> -class AbEditor; +class ContactEditor; class AbLabel; class AbTable; class QPEToolBar; class QPopupMenu; class QToolButton; class QDialog; class Ir; class QAction; class AddressbookWindow: public QMainWindow { Q_OBJECT public: AddressbookWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); ~AddressbookWindow(); @@ -70,30 +70,30 @@ private slots: void slotFind(); void slotSetCategory( int ); void slotUpdateToolbar(); private: void initFields(); // inititialize our fields... AbLabel *abView(); void populateCategories(); QPopupMenu *catMenu; QPEToolBar *listTools; QToolButton *deleteButton; QValueList<int> allFields, orderedFields; QStringList slOrderedFields; enum Panes { paneList=0, paneView, paneEdit }; - AbEditor *abEditor; + ContactEditor *abEditor; AbLabel *mView; AbTable *abList; QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; bool bAbEditFirstTime; int viewMargin; bool syncing; }; #endif diff --git a/core/pim/addressbook/addressbook.pro b/core/pim/addressbook/addressbook.pro index 31de2a3..180b401 100644 --- a/core/pim/addressbook/addressbook.pro +++ b/core/pim/addressbook/addressbook.pro @@ -1,23 +1,23 @@ TEMPLATE = app CONFIG = qt warn_on release DESTDIR = $(OPIEDIR)/bin HEADERS = addressbook.h \ - abeditor.h \ + contacteditor.h \ ablabel.h \ abtable.h \ addresssettings.h SOURCES = main.cpp \ addressbook.cpp \ - abeditor.cpp \ + contacteditor.cpp \ ablabel.cpp \ abtable.cpp \ addresssettings.cpp INTERFACES = addresssettingsbase.ui TARGET = addressbook INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe TRANSLATIONS = ../i18n/de/addressbook.ts TRANSLATIONS += ../i18n/pt_BR/addressbook.ts |