author | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
commit | a7c827aa0e555206b60dec3bc07f7afab4352883 (patch) (unidiff) | |
tree | 56dbda15314f27ffabd143d09ea036b092444198 /kabc | |
parent | 3116f249fc6ccd0e067213e826d3d924f6986972 (diff) | |
download | kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.zip kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.gz kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.bz2 |
fixes
-rw-r--r-- | kabc/addresseedialog.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index b3429e3..648e780 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -51,32 +51,33 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : | |||
51 | 51 | ||
52 | QString AddresseeItem::key( int column, bool ) const | 52 | QString AddresseeItem::key( int column, bool ) const |
53 | { | 53 | { |
54 | 54 | ||
55 | if (column == Email) { | 55 | if (column == Email) { |
56 | QString value = text(Email); | 56 | QString value = text(Email); |
57 | int val = value.findRev("@"); | 57 | int val = value.findRev("@"); |
58 | return value.mid( val) + value.left( val ); | 58 | return value.mid( val) + value.left( val ); |
59 | } | 59 | } |
60 | return text(column).lower(); | 60 | return text(column).lower(); |
61 | } | 61 | } |
62 | 62 | ||
63 | AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | 63 | AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : |
64 | KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), | 64 | KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), |
65 | Ok|Cancel, No, parent ), mMultiple( multiple ) | 65 | Ok|Cancel, No, parent ), mMultiple( multiple ) |
66 | { | 66 | { |
67 | qDebug("NEW AddresseeDialog "); | ||
67 | QWidget *topWidget = plainPage(); | 68 | QWidget *topWidget = plainPage(); |
68 | 69 | ||
69 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); | 70 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); |
70 | 71 | ||
71 | 72 | ||
72 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); | 73 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); |
73 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 74 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
74 | 75 | ||
75 | topLayout->addWidget(mMiniSplitter ); | 76 | topLayout->addWidget(mMiniSplitter ); |
76 | 77 | ||
77 | QWidget *listWidget = new QWidget( mMiniSplitter ); | 78 | QWidget *listWidget = new QWidget( mMiniSplitter ); |
78 | 79 | ||
79 | QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; | 80 | QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; |
80 | //topLayout->addLayout( listLayout ); | 81 | //topLayout->addLayout( listLayout ); |
81 | 82 | ||
82 | mAddresseeList = new KListView( listWidget ); | 83 | mAddresseeList = new KListView( listWidget ); |
@@ -124,32 +125,33 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
124 | 125 | ||
125 | mAddressBook = StdAddressBook::self( true ); | 126 | mAddressBook = StdAddressBook::self( true ); |
126 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), | 127 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), |
127 | SLOT( addressBookChanged() ) ); | 128 | SLOT( addressBookChanged() ) ); |
128 | connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), | 129 | connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), |
129 | SLOT( addressBookChanged() ) ); | 130 | SLOT( addressBookChanged() ) ); |
130 | 131 | ||
131 | loadAddressBook(); | 132 | loadAddressBook(); |
132 | QValueList<int> splitterSize; | 133 | QValueList<int> splitterSize; |
133 | splitterSize.append( ( width() / 5 ) * 3 ); | 134 | splitterSize.append( ( width() / 5 ) * 3 ); |
134 | splitterSize.append( ( width() / 5 ) *2 ); | 135 | splitterSize.append( ( width() / 5 ) *2 ); |
135 | mMiniSplitter->setSizes( splitterSize ); | 136 | mMiniSplitter->setSizes( splitterSize ); |
136 | } | 137 | } |
137 | 138 | ||
138 | AddresseeDialog::~AddresseeDialog() | 139 | AddresseeDialog::~AddresseeDialog() |
139 | { | 140 | { |
141 | qDebug("DELETE AddresseeDialog "); | ||
140 | } | 142 | } |
141 | 143 | ||
142 | void AddresseeDialog::loadAddressBook() | 144 | void AddresseeDialog::loadAddressBook() |
143 | { | 145 | { |
144 | mAddresseeList->clear(); | 146 | mAddresseeList->clear(); |
145 | mItemDict.clear(); | 147 | mItemDict.clear(); |
146 | if ( mAddresseeEdit->text().isEmpty() ) { | 148 | if ( mAddresseeEdit->text().isEmpty() ) { |
147 | AddressBook::Iterator it; | 149 | AddressBook::Iterator it; |
148 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 150 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
149 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 151 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
150 | continue; | 152 | continue; |
151 | new AddresseeItem( mAddresseeList, (*it) ); | 153 | new AddresseeItem( mAddresseeList, (*it) ); |
152 | } | 154 | } |
153 | return; | 155 | return; |
154 | } | 156 | } |
155 | //mAddresseeEdit->completionObject()->clear(); | 157 | //mAddresseeEdit->completionObject()->clear(); |