author | zautrix <zautrix> | 2005-06-28 21:26:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-28 21:26:55 (UTC) |
commit | f226b4cd2ce06a6948811fe04d80fe3ffa44f695 (patch) (unidiff) | |
tree | 32fc124bf593d6d854b1bf368b18f8db2aa6ff4b /kabc | |
parent | 29fbaa763b39011bb1d19b1f5f705cab53ac0d7a (diff) | |
download | kdepimpi-f226b4cd2ce06a6948811fe04d80fe3ffa44f695.zip kdepimpi-f226b4cd2ce06a6948811fe04d80fe3ffa44f695.tar.gz kdepimpi-f226b4cd2ce06a6948811fe04d80fe3ffa44f695.tar.bz2 |
fixxx
-rw-r--r-- | kabc/addresseedialog.cpp | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 0cf75a0..671787e 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -64,15 +64,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
64 | { | 64 | { |
65 | qDebug("NEW AddresseeDialog "); | 65 | qDebug("NEW AddresseeDialog "); |
66 | 66 | ||
67 | QWidget *topWidget = plainPage(); | ||
68 | 67 | ||
69 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); | 68 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this ); |
70 | |||
71 | |||
72 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); | ||
73 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 69 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
74 | 70 | setMainWidget( mMiniSplitter ); | |
75 | topLayout->addWidget(mMiniSplitter ); | ||
76 | 71 | ||
77 | QWidget *listWidget = new QWidget( mMiniSplitter ); | 72 | QWidget *listWidget = new QWidget( mMiniSplitter ); |
78 | 73 | ||
@@ -88,31 +83,19 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
88 | listLayout->addWidget( mAddresseeList ); | 83 | listLayout->addWidget( mAddresseeList ); |
89 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), | 84 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), |
90 | SLOT( slotOk() ) ); | 85 | SLOT( slotOk() ) ); |
91 | |||
92 | //QHBox* searchBox = new QHBox ( listWidget ); | 86 | //QHBox* searchBox = new QHBox ( listWidget ); |
93 | mAddresseeEdit = new QLineEdit( listWidget ); | 87 | QHBox * hb = new QHBox ( listWidget ); |
88 | listLayout->addWidget ( hb ); | ||
89 | mAddresseeEdit = new QLineEdit( hb ); | ||
94 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), | 90 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), |
95 | SLOT( loadAddressBook() ) ); | 91 | SLOT( loadAddressBook() ) ); |
96 | mAddresseeEdit->setFocus(); | 92 | mAddresseeEdit->setFocus(); |
97 | QPushButton *searchButton = new QPushButton( i18n("Search!"), listWidget ); | 93 | QPushButton *searchButton = new QPushButton( i18n("Search!"), hb ); |
98 | connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); | 94 | connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); |
99 | 95 | if ( mMultiple ) { | |
100 | QHBoxLayout *searchLayout = new QHBoxLayout (listLayout) ; | 96 | |
101 | searchLayout->addWidget( mAddresseeEdit ); | 97 | mSelectedList = new KListView( mMiniSplitter ); |
102 | searchLayout->addWidget( searchButton ); | 98 | mSelectedList->addColumn( i18n("Selected Name") ); |
103 | //listLayout->addWidget( searchBox ); | ||
104 | |||
105 | if ( mMultiple ) { | ||
106 | //QBoxLayout *selectedLayout = new QVBoxLayout; | ||
107 | //topLayout->addLayout( selectedLayout ); | ||
108 | //topLayout->setSpacing( spacingHint() ); | ||
109 | |||
110 | QVBox *selectedGroup = new QVBox( mMiniSplitter ); | ||
111 | new QLabel ( i18n("Selected:"), selectedGroup ); | ||
112 | //selectedLayout->addWidget( selectedGroup ); | ||
113 | |||
114 | mSelectedList = new KListView( selectedGroup ); | ||
115 | mSelectedList->addColumn( i18n("Name") ); | ||
116 | mSelectedList->addColumn( i18n("Email") ); | 99 | mSelectedList->addColumn( i18n("Email") ); |
117 | mSelectedList->setAllColumnsShowFocus( true ); | 100 | mSelectedList->setAllColumnsShowFocus( true ); |
118 | mSelectedList->setFullWidth( true ); | 101 | mSelectedList->setFullWidth( true ); |
@@ -330,29 +313,29 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | |||
330 | if ( running ) return addressees; | 313 | if ( running ) return addressees; |
331 | running = true; | 314 | running = true; |
332 | AddresseeDialog *dlg = new AddresseeDialog( parent, true ); | 315 | AddresseeDialog *dlg = new AddresseeDialog( parent, true ); |
316 | #ifdef DESKTOP_VERSION | ||
333 | static int geoX = 0; | 317 | static int geoX = 0; |
334 | static int geoY = 0; | 318 | static int geoY = 0; |
335 | static int geoW = 0; | 319 | static int geoW = 0; |
336 | static int geoH = 0; | 320 | static int geoH = 0; |
337 | if ( QApplication::desktop()->width() <= 640 ) | 321 | if ( !geoX && ! geoY && !geoW &&!geoH ) { |
338 | dlg->showMaximized(); | 322 | geoX = dlg->geometry().x(); |
339 | else { | 323 | geoY = dlg->geometry().y(); |
340 | if ( !geoX && ! geoY && !geoW &&!geoH ) { | 324 | geoW = dlg->width(); |
341 | geoX = dlg->geometry().x(); | 325 | geoH = dlg->height(); |
342 | geoY = dlg->geometry().y(); | 326 | } |
343 | geoW = dlg->width(); | 327 | dlg->show(); |
344 | geoH = dlg->height(); | 328 | dlg->setGeometry(geoX , geoY,geoW , geoH ); |
345 | } else { | 329 | #else |
346 | dlg->show(); | 330 | dlg->showMaximized(); |
347 | dlg->setGeometry(geoX , geoY,geoW , geoH ); | 331 | #endif |
348 | |||
349 | } | ||
350 | } | ||
351 | int result = dlg->exec(); | 332 | int result = dlg->exec(); |
333 | #ifdef DESKTOP_VERSION | ||
352 | geoX = dlg->geometry().x(); | 334 | geoX = dlg->geometry().x(); |
353 | geoY = dlg->geometry().y(); | 335 | geoY = dlg->geometry().y(); |
354 | geoW = dlg->width(); | 336 | geoW = dlg->width(); |
355 | geoH = dlg->height(); | 337 | geoH = dlg->height(); |
338 | #endif | ||
356 | if ( result == QDialog::Accepted ) { | 339 | if ( result == QDialog::Accepted ) { |
357 | addressees = dlg->addressees(); | 340 | addressees = dlg->addressees(); |
358 | } | 341 | } |