summaryrefslogtreecommitdiff
path: root/core
authoreilers <eilers>2003-09-29 07:48:56 (UTC)
committer eilers <eilers>2003-09-29 07:48:56 (UTC)
commit9883c4ba419d93e101991a3337ba1ac5de3273c8 (patch) (side-by-side diff)
treeecb5d96884914a8578f040d4b558f8697b3d60f5 /core
parent93b76e67cf954eab09091996a790301369d77a88 (diff)
downloadopie-9883c4ba419d93e101991a3337ba1ac5de3273c8.zip
opie-9883c4ba419d93e101991a3337ba1ac5de3273c8.tar.gz
opie-9883c4ba419d93e101991a3337ba1ac5de3273c8.tar.bz2
ocontactfields is now moved to libopie/pim
Diffstat (limited to 'core') (more/less context) (show 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 )
}
#endif
#endif
// int AbTable::rowHeight( int ) const
// {
// return 18;
// }
// int AbTable::rowPos( int row ) const
// {
// return 18*row;
// }
// int AbTable::rowAt( int pos ) const
// {
// return QMIN( pos/18, numRows()-1 );
// }
void AbTable::fitColumns()
{
- // qWarning( "void AbTable::fitColumns()" );
- int contentsWidth = visibleWidth() / 2; // :SX Why too low
+ qWarning( "void AbTable::fitColumns()" );
+ int contentsWidth = visibleWidth() / 2;
// Fix to better value
// contentsWidth = 130;
setPaintingEnabled( FALSE );
if ( columnVisible == false ){
showColumn(0);
columnVisible = true;
}
// qWarning("Width: %d", contentsWidth);
setColumnWidth( 0, contentsWidth );
adjustColumn(1);
if ( columnWidth(1) < contentsWidth )
setColumnWidth( 1, contentsWidth );
setPaintingEnabled( TRUE );
}
void AbTable::show()
{
// qWarning( "void AbTable::show()" );
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()
{
QString filename = Global::applicationFileName("addressbook",
"businesscard.vcf");
return filename;
}
AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
QWidget(parent),
mCat(0),
m_inSearch( false ),
m_inPersonal( false ),
m_curr_category( -1 ),
m_curr_View( TableView ),
m_prev_View( TableView ),
m_curr_Contact ( 0 ),
m_contactdb ( 0l ),
m_storedDB ( 0l ),
m_viewStack( 0l ),
m_abTable( 0l ),
m_orderedFields( ordered )
{
qWarning("AbView::c'tor");
// Load default database and handle syncing myself.. !
- m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false ),
+ m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false );
+ m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
mCat.load( categoryFileName() );
// Create Layout and put WidgetStack into it.
QVBoxLayout *vb = new QVBoxLayout( this );
m_viewStack = new QWidgetStack( this );
vb->addWidget( m_viewStack );
// Creat TableView
QVBox* tableBox = new QVBox( m_viewStack );
m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
m_abTable->setCurrentCell( 0, 0 );
m_abTable->setFocus();
// Add TableView to WidgetStack and raise it
m_viewStack -> addWidget( tableBox , TableView );
// Create CardView and add it to WidgetStack
QVBox* cardBox = new QVBox( m_viewStack );
m_ablabel = new AbLabel( cardBox, "CardView");
m_viewStack -> addWidget( cardBox , CardView );
// Connect views to me
connect ( m_abTable, SIGNAL( signalSwitch( void ) ),
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 @@
TEMPLATE = app
#CONFIG = qt warn_on release
CONFIG = qt warn_on debug
DESTDIR = $(OPIEDIR)/bin
HEADERS = addressbook.h \
contacteditor.h \
- ocontactfields.h \
ablabel.h \
abtable.h \
picker.h \
ofloatbar.h \
configdlg.h \
abconfig.h \
abview.h
SOURCES = main.cpp \
addressbook.cpp \
contacteditor.cpp \
- ocontactfields.cpp \
ablabel.cpp \
abtable.cpp \
picker.cpp \
configdlg.cpp \
abconfig.cpp \
abview.cpp
INTERFACES = configdlg_base.ui
TARGET = addressbook
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lopie
TRANSLATIONS = ../../../i18n/de/addressbook.ts \
../../../i18n/nl/addressbook.ts \
../../../i18n/da/addressbook.ts \
../../../i18n/xx/addressbook.ts \
../../../i18n/en/addressbook.ts \
../../../i18n/es/addressbook.ts \
../../../i18n/fr/addressbook.ts \
../../../i18n/hu/addressbook.ts \
../../../i18n/ja/addressbook.ts \
../../../i18n/ko/addressbook.ts \
../../../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 @@
#include "configdlg.h"
-#include "ocontactfields.h"
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qiconset.h>
#include <qpe/resource.h>
#include <opie/ocontact.h>
+#include "opie/ocontactfields.h"
ConfigDlg::ConfigDlg( QWidget *parent, const char *name):
ConfigDlg_Base(parent, name, true )
{
contFields = OContactFields::trfields();
// We add all Fields into the Listbox
for (uint i=0; i < contFields.count(); i++) {
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" ) ) );
m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) );
m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) );
// Get the translation maps between Field ID and translated strings
m_mapStrToID = OContactFields::trFieldsToId();
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 @@
/*
* Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
* Copyright (C) 2002 by Stefan Eilers (eilers.stefan@epost.de)
*
* This file is an add-on for the OPIE 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 pacakaging
* 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.
*
*
* This is a rewrite of the abeditor.h file, modified to provide a more
* intuitive interface to TrollTech's original Address Book editor. This
* is made to operate exactly in interface with the exception of name.
*
*/
#include "contacteditor.h"
#include "addresspicker.h"
-#include "ocontactfields.h"
#include <qpe/categoryselect.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
#include <qpe/timeconversion.h>
#include <opie/ocontact.h>
#include <qpe/resource.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qtabwidget.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qmultilineedit.h>
#include <qscrollview.h>
#include <qtoolbutton.h>
#include <qpushbutton.h>
#include <qmainwindow.h>
#include <qvaluelist.h>
#include <qpopupmenu.h>
#include <qlistbox.h>
#include <qhbox.h>
#include <qaction.h>
#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 @@
/*
* Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
*
* This file is an add-on for the OPIE 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 pacakaging
* 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.
*
*
* This is a rewrite of the abeditor.h file, modified to provide a more
* intuitive interface to TrollTech's original Address Book editor. This
* is made to operate exactly in interface with the exception of name.
*
*/
#ifndef CONTACTEDITOR_H
#define CONTACTEDITOR_H
#include <opie/ocontact.h>
+#include <opie/ocontactfields.h>
#include <qpe/datebookmonth.h>
#include <qdialog.h>
#include <qlist.h>
#include <qmap.h>
#include <qstringlist.h>
#include <qwidgetstack.h>
-#include "ocontactfields.h"
-
const int NAME_LF = 0;
const int NAME_LFM = 1;
const int NAME_FL = 2;
const int NAME_FML = 3;
const int NAME_F = 4;
const int NAME_M = 5;
const int NAME_L = 6;
const int NAME_S = 7;
class QScrollView;
class QTabWidget;
class QMultiLineEdit;
class QLineEdit;
class QComboBox;
class QPushButton;
class CategorySelect;
class QLabel;
class ContactEditor : public QDialog {
Q_OBJECT
public: