summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp4
-rw-r--r--core/pim/addressbook/abview.cpp3
-rw-r--r--core/pim/addressbook/addressbook.pro2
-rw-r--r--core/pim/addressbook/configdlg.cpp2
-rw-r--r--core/pim/addressbook/contacteditor.cpp1
-rw-r--r--core/pim/addressbook/contacteditor.h3
6 files changed, 6 insertions, 9 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 4705c78..70330c7 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -462,50 +462,50 @@ void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch )
462} 462}
463#endif 463#endif
464#endif 464#endif
465 465
466 466
467// int AbTable::rowHeight( int ) const 467// int AbTable::rowHeight( int ) const
468// { 468// {
469// return 18; 469// return 18;
470// } 470// }
471 471
472// int AbTable::rowPos( int row ) const 472// int AbTable::rowPos( int row ) const
473// { 473// {
474// return 18*row; 474// return 18*row;
475// } 475// }
476 476
477// int AbTable::rowAt( int pos ) const 477// int AbTable::rowAt( int pos ) const
478// { 478// {
479// return QMIN( pos/18, numRows()-1 ); 479// return QMIN( pos/18, numRows()-1 );
480// } 480// }
481 481
482 482
483 483
484void AbTable::fitColumns() 484void AbTable::fitColumns()
485{ 485{
486 //qWarning( "void AbTable::fitColumns()" ); 486 qWarning( "void AbTable::fitColumns()" );
487 int contentsWidth = visibleWidth() / 2; // :SX Why too low 487 int contentsWidth = visibleWidth() / 2;
488 // Fix to better value 488 // Fix to better value
489 // contentsWidth = 130; 489 // contentsWidth = 130;
490 490
491 setPaintingEnabled( FALSE ); 491 setPaintingEnabled( FALSE );
492 492
493 if ( columnVisible == false ){ 493 if ( columnVisible == false ){
494 showColumn(0); 494 showColumn(0);
495 columnVisible = true; 495 columnVisible = true;
496 } 496 }
497 497
498 //qWarning("Width: %d", contentsWidth); 498 //qWarning("Width: %d", contentsWidth);
499 499
500 setColumnWidth( 0, contentsWidth ); 500 setColumnWidth( 0, contentsWidth );
501 adjustColumn(1); 501 adjustColumn(1);
502 if ( columnWidth(1) < contentsWidth ) 502 if ( columnWidth(1) < contentsWidth )
503 setColumnWidth( 1, contentsWidth ); 503 setColumnWidth( 1, contentsWidth );
504 504
505 setPaintingEnabled( TRUE ); 505 setPaintingEnabled( TRUE );
506} 506}
507 507
508void AbTable::show() 508void AbTable::show()
509{ 509{
510 //qWarning( "void AbTable::show()" ); 510 //qWarning( "void AbTable::show()" );
511 realignTable(); 511 realignTable();
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 6cbd556..670cdb0 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -32,49 +32,50 @@ QString addressbookPersonalVCardName()
32{ 32{
33 QString filename = Global::applicationFileName("addressbook", 33 QString filename = Global::applicationFileName("addressbook",
34 "businesscard.vcf"); 34 "businesscard.vcf");
35 return filename; 35 return filename;
36} 36}
37 37
38 38
39AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): 39AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
40 QWidget(parent), 40 QWidget(parent),
41 mCat(0), 41 mCat(0),
42 m_inSearch( false ), 42 m_inSearch( false ),
43 m_inPersonal( false ), 43 m_inPersonal( false ),
44 m_curr_category( -1 ), 44 m_curr_category( -1 ),
45 m_curr_View( TableView ), 45 m_curr_View( TableView ),
46 m_prev_View( TableView ), 46 m_prev_View( TableView ),
47 m_curr_Contact ( 0 ), 47 m_curr_Contact ( 0 ),
48 m_contactdb ( 0l ), 48 m_contactdb ( 0l ),
49 m_storedDB ( 0l ), 49 m_storedDB ( 0l ),
50 m_viewStack( 0l ), 50 m_viewStack( 0l ),
51 m_abTable( 0l ), 51 m_abTable( 0l ),
52 m_orderedFields( ordered ) 52 m_orderedFields( ordered )
53{ 53{
54 qWarning("AbView::c'tor"); 54 qWarning("AbView::c'tor");
55 // Load default database and handle syncing myself.. ! 55 // Load default database and handle syncing myself.. !
56 m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false ), 56 m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false );
57 m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
57 mCat.load( categoryFileName() ); 58 mCat.load( categoryFileName() );
58 59
59 // Create Layout and put WidgetStack into it. 60 // Create Layout and put WidgetStack into it.
60 QVBoxLayout *vb = new QVBoxLayout( this ); 61 QVBoxLayout *vb = new QVBoxLayout( this );
61 m_viewStack = new QWidgetStack( this ); 62 m_viewStack = new QWidgetStack( this );
62 vb->addWidget( m_viewStack ); 63 vb->addWidget( m_viewStack );
63 64
64 // Creat TableView 65 // Creat TableView
65 QVBox* tableBox = new QVBox( m_viewStack ); 66 QVBox* tableBox = new QVBox( m_viewStack );
66 m_abTable = new AbTable( m_orderedFields, tableBox, "table" ); 67 m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
67 m_abTable->setCurrentCell( 0, 0 ); 68 m_abTable->setCurrentCell( 0, 0 );
68 m_abTable->setFocus(); 69 m_abTable->setFocus();
69 70
70 // Add TableView to WidgetStack and raise it 71 // Add TableView to WidgetStack and raise it
71 m_viewStack -> addWidget( tableBox , TableView ); 72 m_viewStack -> addWidget( tableBox , TableView );
72 73
73 // Create CardView and add it to WidgetStack 74 // Create CardView and add it to WidgetStack
74 QVBox* cardBox = new QVBox( m_viewStack ); 75 QVBox* cardBox = new QVBox( m_viewStack );
75 m_ablabel = new AbLabel( cardBox, "CardView"); 76 m_ablabel = new AbLabel( cardBox, "CardView");
76 m_viewStack -> addWidget( cardBox , CardView ); 77 m_viewStack -> addWidget( cardBox , CardView );
77 78
78 // Connect views to me 79 // Connect views to me
79 connect ( m_abTable, SIGNAL( signalSwitch( void ) ), 80 connect ( m_abTable, SIGNAL( signalSwitch( void ) ),
80 this, SLOT( slotSwitch( void ) ) ); 81 this, SLOT( slotSwitch( void ) ) );
diff --git a/core/pim/addressbook/addressbook.pro b/core/pim/addressbook/addressbook.pro
index 1637cac..c90568a 100644
--- a/core/pim/addressbook/addressbook.pro
+++ b/core/pim/addressbook/addressbook.pro
@@ -1,42 +1,40 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 #CONFIG = qt warn_on release 2 #CONFIG = qt warn_on release
3 CONFIG = qt warn_on debug 3 CONFIG = qt warn_on debug
4 DESTDIR = $(OPIEDIR)/bin 4 DESTDIR = $(OPIEDIR)/bin
5 HEADERS= addressbook.h \ 5 HEADERS= addressbook.h \
6 contacteditor.h \ 6 contacteditor.h \
7 ocontactfields.h \
8 ablabel.h \ 7 ablabel.h \
9 abtable.h \ 8 abtable.h \
10 picker.h \ 9 picker.h \
11 ofloatbar.h \ 10 ofloatbar.h \
12 configdlg.h \ 11 configdlg.h \
13 abconfig.h \ 12 abconfig.h \
14 abview.h 13 abview.h
15 SOURCES= main.cpp \ 14 SOURCES= main.cpp \
16 addressbook.cpp \ 15 addressbook.cpp \
17 contacteditor.cpp \ 16 contacteditor.cpp \
18 ocontactfields.cpp \
19 ablabel.cpp \ 17 ablabel.cpp \
20 abtable.cpp \ 18 abtable.cpp \
21 picker.cpp \ 19 picker.cpp \
22 configdlg.cpp \ 20 configdlg.cpp \
23 abconfig.cpp \ 21 abconfig.cpp \
24 abview.cpp 22 abview.cpp
25 23
26 INTERFACES= configdlg_base.ui 24 INTERFACES= configdlg_base.ui
27 TARGET = addressbook 25 TARGET = addressbook
28INCLUDEPATH += $(OPIEDIR)/include 26INCLUDEPATH += $(OPIEDIR)/include
29 DEPENDPATH+= $(OPIEDIR)/include 27 DEPENDPATH+= $(OPIEDIR)/include
30LIBS += -lqpe -lopie 28LIBS += -lqpe -lopie
31 29
32TRANSLATIONS = ../../../i18n/de/addressbook.ts \ 30TRANSLATIONS = ../../../i18n/de/addressbook.ts \
33 ../../../i18n/nl/addressbook.ts \ 31 ../../../i18n/nl/addressbook.ts \
34 ../../../i18n/da/addressbook.ts \ 32 ../../../i18n/da/addressbook.ts \
35 ../../../i18n/xx/addressbook.ts \ 33 ../../../i18n/xx/addressbook.ts \
36 ../../../i18n/en/addressbook.ts \ 34 ../../../i18n/en/addressbook.ts \
37 ../../../i18n/es/addressbook.ts \ 35 ../../../i18n/es/addressbook.ts \
38 ../../../i18n/fr/addressbook.ts \ 36 ../../../i18n/fr/addressbook.ts \
39 ../../../i18n/hu/addressbook.ts \ 37 ../../../i18n/hu/addressbook.ts \
40 ../../../i18n/ja/addressbook.ts \ 38 ../../../i18n/ja/addressbook.ts \
41 ../../../i18n/ko/addressbook.ts \ 39 ../../../i18n/ko/addressbook.ts \
42 ../../../i18n/no/addressbook.ts \ 40 ../../../i18n/no/addressbook.ts \
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp
index 629feef..981f5e0 100644
--- a/core/pim/addressbook/configdlg.cpp
+++ b/core/pim/addressbook/configdlg.cpp
@@ -1,36 +1,36 @@
1#include "configdlg.h" 1#include "configdlg.h"
2#include "ocontactfields.h"
3 2
4#include <qcheckbox.h> 3#include <qcheckbox.h>
5#include <qradiobutton.h> 4#include <qradiobutton.h>
6#include <qlistbox.h> 5#include <qlistbox.h>
7#include <qpushbutton.h> 6#include <qpushbutton.h>
8#include <qiconset.h> 7#include <qiconset.h>
9 8
10#include <qpe/resource.h> 9#include <qpe/resource.h>
11 10
12#include <opie/ocontact.h> 11#include <opie/ocontact.h>
12#include "opie/ocontactfields.h"
13 13
14ConfigDlg::ConfigDlg( QWidget *parent, const char *name): 14ConfigDlg::ConfigDlg( QWidget *parent, const char *name):
15 ConfigDlg_Base(parent, name, true ) 15 ConfigDlg_Base(parent, name, true )
16{ 16{
17 contFields = OContactFields::trfields(); 17 contFields = OContactFields::trfields();
18 18
19 // We add all Fields into the Listbox 19 // We add all Fields into the Listbox
20 for (uint i=0; i < contFields.count(); i++) { 20 for (uint i=0; i < contFields.count(); i++) {
21 allFieldListBox->insertItem( contFields[i] ); 21 allFieldListBox->insertItem( contFields[i] );
22 } 22 }
23 23
24 // Reset Widget Flags: This was not changeable by designer :( 24 // Reset Widget Flags: This was not changeable by designer :(
25 setWFlags ( WStyle_ContextHelp ); 25 setWFlags ( WStyle_ContextHelp );
26 26
27 // Set Pics to Buttons and Tabs 27 // Set Pics to Buttons and Tabs
28 m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); 28 m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) );
29 m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); 29 m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) );
30 m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) ); 30 m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) );
31 m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); 31 m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) );
32 32
33 33
34 // Get the translation maps between Field ID and translated strings 34 // Get the translation maps between Field ID and translated strings
35 m_mapStrToID = OContactFields::trFieldsToId(); 35 m_mapStrToID = OContactFields::trFieldsToId();
36 m_mapIDToStr = OContactFields::idToTrFields(); 36 m_mapIDToStr = OContactFields::idToTrFields();
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 9d1a1c7..8fbd065 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -1,48 +1,47 @@
1/* 1/*
2 * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> 2 * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
3 * Copyright (C) 2002 by Stefan Eilers (eilers.stefan@epost.de) 3 * Copyright (C) 2002 by Stefan Eilers (eilers.stefan@epost.de)
4 * 4 *
5 * This file is an add-on for the OPIE Palmtop Environment 5 * This file is an add-on for the OPIE Palmtop Environment
6 * 6 *
7 * This file may be distributed and/or modified under the terms of the 7 * This file may be distributed and/or modified under the terms of the
8 * GNU General Public License version 2 as published by the Free Software 8 * GNU General Public License version 2 as published by the Free Software
9 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging 9 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging
10 * of this file. 10 * of this file.
11 * 11 *
12 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
13 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 * 14 *
15 * 15 *
16 * This is a rewrite of the abeditor.h file, modified to provide a more 16 * This is a rewrite of the abeditor.h file, modified to provide a more
17 * intuitive interface to TrollTech's original Address Book editor. This 17 * intuitive interface to TrollTech's original Address Book editor. This
18 * is made to operate exactly in interface with the exception of name. 18 * is made to operate exactly in interface with the exception of name.
19 * 19 *
20 */ 20 */
21 21
22#include "contacteditor.h" 22#include "contacteditor.h"
23#include "addresspicker.h" 23#include "addresspicker.h"
24#include "ocontactfields.h"
25 24
26#include <qpe/categoryselect.h> 25#include <qpe/categoryselect.h>
27#include <qpe/qpeapplication.h> 26#include <qpe/qpeapplication.h>
28#include <qpe/qpedialog.h> 27#include <qpe/qpedialog.h>
29#include <qpe/timeconversion.h> 28#include <qpe/timeconversion.h>
30#include <opie/ocontact.h> 29#include <opie/ocontact.h>
31#include <qpe/resource.h> 30#include <qpe/resource.h>
32 31
33#include <qcombobox.h> 32#include <qcombobox.h>
34#include <qlabel.h> 33#include <qlabel.h>
35#include <qtabwidget.h> 34#include <qtabwidget.h>
36#include <qlayout.h> 35#include <qlayout.h>
37#include <qlineedit.h> 36#include <qlineedit.h>
38#include <qmultilineedit.h> 37#include <qmultilineedit.h>
39#include <qscrollview.h> 38#include <qscrollview.h>
40#include <qtoolbutton.h> 39#include <qtoolbutton.h>
41#include <qpushbutton.h> 40#include <qpushbutton.h>
42#include <qmainwindow.h> 41#include <qmainwindow.h>
43#include <qvaluelist.h> 42#include <qvaluelist.h>
44#include <qpopupmenu.h> 43#include <qpopupmenu.h>
45#include <qlistbox.h> 44#include <qlistbox.h>
46#include <qhbox.h> 45#include <qhbox.h>
47#include <qaction.h> 46#include <qaction.h>
48#include <qiconset.h> 47#include <qiconset.h>
diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h
index e7432ee..72d14a9 100644
--- a/core/pim/addressbook/contacteditor.h
+++ b/core/pim/addressbook/contacteditor.h
@@ -1,59 +1,58 @@
1/* 1/*
2 * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> 2 * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
3 * 3 *
4 * This file is an add-on for the OPIE Palmtop Environment 4 * This file is an add-on for the OPIE Palmtop Environment
5 * 5 *
6 * This file may be distributed and/or modified under the terms of the 6 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software 7 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging 8 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging
9 * of this file. 9 * of this file.
10 * 10 *
11 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 * 13 *
14 * 14 *
15 * This is a rewrite of the abeditor.h file, modified to provide a more 15 * This is a rewrite of the abeditor.h file, modified to provide a more
16 * intuitive interface to TrollTech's original Address Book editor. This 16 * intuitive interface to TrollTech's original Address Book editor. This
17 * is made to operate exactly in interface with the exception of name. 17 * is made to operate exactly in interface with the exception of name.
18 * 18 *
19 */ 19 */
20 20
21#ifndef CONTACTEDITOR_H 21#ifndef CONTACTEDITOR_H
22#define CONTACTEDITOR_H 22#define CONTACTEDITOR_H
23 23
24#include <opie/ocontact.h> 24#include <opie/ocontact.h>
25#include <opie/ocontactfields.h>
25 26
26#include <qpe/datebookmonth.h> 27#include <qpe/datebookmonth.h>
27 28
28#include <qdialog.h> 29#include <qdialog.h>
29#include <qlist.h> 30#include <qlist.h>
30#include <qmap.h> 31#include <qmap.h>
31#include <qstringlist.h> 32#include <qstringlist.h>
32#include <qwidgetstack.h> 33#include <qwidgetstack.h>
33 34
34#include "ocontactfields.h"
35
36const int NAME_LF = 0; 35const int NAME_LF = 0;
37const int NAME_LFM = 1; 36const int NAME_LFM = 1;
38const int NAME_FL = 2; 37const int NAME_FL = 2;
39const int NAME_FML = 3; 38const int NAME_FML = 3;
40 39
41const int NAME_F = 4; 40const int NAME_F = 4;
42const int NAME_M = 5; 41const int NAME_M = 5;
43const int NAME_L = 6; 42const int NAME_L = 6;
44const int NAME_S = 7; 43const int NAME_S = 7;
45 44
46 45
47class QScrollView; 46class QScrollView;
48class QTabWidget; 47class QTabWidget;
49class QMultiLineEdit; 48class QMultiLineEdit;
50class QLineEdit; 49class QLineEdit;
51class QComboBox; 50class QComboBox;
52class QPushButton; 51class QPushButton;
53class CategorySelect; 52class CategorySelect;
54class QLabel; 53class QLabel;
55 54
56class ContactEditor : public QDialog { 55class ContactEditor : public QDialog {
57 Q_OBJECT 56 Q_OBJECT
58 57
59 public: 58 public: