author | drw <drw> | 2004-03-25 23:40:52 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-25 23:40:52 (UTC) |
commit | 98721c16aa480c4a160d3492462cb8f0de783268 (patch) (side-by-side diff) | |
tree | 2be8dcd6cf985d98912cbb18e5d23e4b567396ff /core/pim/addressbook/abtable.cpp | |
parent | 03091cd727701bdb2aa6ac623cd606131546d686 (diff) | |
download | opie-98721c16aa480c4a160d3492462cb8f0de783268.zip opie-98721c16aa480c4a160d3492462cb8f0de783268.tar.gz opie-98721c16aa480c4a160d3492462cb8f0de783268.tar.bz2 |
libopie -> libopie2
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 85 |
1 files changed, 42 insertions, 43 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 29f4383..cd77b13 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -22,2 +22,4 @@ +#include <opie2/opimrecordlist.h> + #include <qpe/timestring.h> @@ -25,5 +27,2 @@ -#include <opie/orecordlist.h> - - #include "abtable.h" @@ -41,3 +40,3 @@ \class AbTableItem abtable.h - + \brief QTableItem based class for showing a field of an entry @@ -68,3 +67,3 @@ void AbTableItem::setItem( const QString &txt, const QString &secondKey ) sortKey = Qtopia::buildSortKey( txt, secondKey ); - + // sortKey = txt.lower() + QChar( '\0' ) + secondKey.lower(); @@ -74,3 +73,3 @@ void AbTableItem::setItem( const QString &txt, const QString &secondKey ) \class AbPickItem abtable.h - + \brief QTableItem based class for showing slection of an entry @@ -111,3 +110,3 @@ void AbPickItem::setContentFromEditor( QWidget *w ) \class AbTable abtable.h - + \brief QTable based class for showing a list of entries @@ -145,3 +144,3 @@ void AbTable::init() setNumCols( 2 ); - + horizontalHeader()->setLabel( 0, tr( "Full Name" )); @@ -153,3 +152,3 @@ void AbTable::init() -void AbTable::setContacts( const OContactAccess::List& viewList ) +void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) { @@ -162,4 +161,4 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) setPaintingEnabled( FALSE ); - - OContactAccess::List::Iterator it; + + Opie::OPimContactAccess::List::Iterator it; setNumRows( m_viewList.count() ); @@ -168,3 +167,3 @@ void AbTable::setContacts( const OContactAccess::List& viewList ) // insertIntoTable( *it, row++ ); - + // setSorting( true ); @@ -189,3 +188,3 @@ bool AbTable::selectContact( int UID ) int rows = numRows(); - OContact* foundContact = 0l; + Opie::OPimContact* foundContact = 0l; bool found = false; @@ -215,11 +214,11 @@ bool AbTable::selectContact( int UID ) #if 0 -void AbTable::insertIntoTable( const OContact& cnt, int row ) +void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) { - qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); + qWarning( "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, %d )", row ); QString strName; ContactItem contactItem; - + strName = findContactName( cnt ); contactItem = findContactContact( cnt, row ); - + AbTableItem *ati; @@ -232,6 +231,6 @@ void AbTable::insertIntoTable( const OContact& cnt, int row ) setItem( row, 1, ati ); - + //### cannot do this; table only has two columns at this point // setItem( row, 2, new AbPickItem( this ) ); - + } @@ -244,6 +243,6 @@ void AbTable::columnClicked( int col ) return; - + if ( lastSortCol == -1 ) lastSortCol = col; - + if ( col == lastSortCol ) { @@ -274,4 +273,4 @@ void AbTable::resort() -OContact AbTable::currentEntry() -{ +Opie::OPimContact AbTable::currentEntry() +{ return m_viewList[currentRow()]; @@ -333,6 +332,6 @@ void AbTable::keyPressEvent( QKeyEvent *e ) char key = toupper( e->ascii() ); - + if ( key >= 'A' && key <= 'Z' ) moveTo( key ); - + // qWarning("Received key .."); @@ -355,3 +354,3 @@ void AbTable::keyPressEvent( QKeyEvent *e ) } - + } @@ -361,3 +360,3 @@ void AbTable::moveTo( char c ) qWarning( "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" ); - + #if 0 @@ -396,3 +395,3 @@ void AbTable::moveTo( char c ) // Useless.. Nobody uses it .. (se) -QString AbTable::findContactName( const OContact &entry ) +QString AbTable::findContactName( const Opie::OPimContact &entry ) { @@ -477,8 +476,8 @@ void AbTable::fitColumns() qWarning( "void AbTable::fitColumns()" ); - int contentsWidth = visibleWidth() / 2; + int contentsWidth = visibleWidth() / 2; // Fix to better value - // contentsWidth = 130; + // contentsWidth = 130; setPaintingEnabled( FALSE ); - + if ( columnVisible == false ){ @@ -487,3 +486,3 @@ void AbTable::fitColumns() } - + // qWarning("Width: %d", contentsWidth); @@ -549,6 +548,6 @@ QStringList AbTable::choiceSelection(int /*index*/) const /* ###### - + QString selname = choicenames.at(index); for (each row) { - OContact *c = contactForRow(row); + Opie::OPimContact *c = contactForRow(row); if ( text(row,2) == selname ) { @@ -557,3 +556,3 @@ QStringList AbTable::choiceSelection(int /*index*/) const } - + */ @@ -571,5 +570,5 @@ void AbTable::updateVisible() selectedRow = 0; - + visible = 0; - + setPaintingEnabled( FALSE ); @@ -594,3 +593,3 @@ void AbTable::updateVisible() setCurrentCell( -1, 0 ); - + setPaintingEnabled( TRUE ); @@ -633,3 +632,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) - OContact act_contact = m_viewList[row]; + Opie::OPimContact act_contact = m_viewList[row]; @@ -655,3 +654,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) switch( col ){ - case 0: + case 0: p->drawText( x + marg,2 + fm.ascent(), nameText ); @@ -663,3 +662,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) QString contactText = contactItem.value; - + if ( !contactPic.isNull() ) @@ -667,3 +666,3 @@ void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) p->drawPixmap( x + marg, y, contactPic ); - p->drawText( x + marg + contactPic.width() + p->drawText( x + marg + contactPic.width() + 4,2 + fm.ascent(), contactText ); @@ -686,3 +685,3 @@ void AbTable::rowHeightChanged( int row ) } -ContactItem AbTable::findContactContact( const OContact &entry, int /* row */ ) +ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* row */ ) { |