-rw-r--r-- | kabc/addresseedialog.cpp | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 0cf75a0..671787e 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -66,11 +66,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
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 | ||
@@ -90,5 +85,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
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() ), |
@@ -96,21 +92,8 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
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 | |||
100 | QHBoxLayout *searchLayout = new QHBoxLayout (listLayout) ; | ||
101 | searchLayout->addWidget( mAddresseeEdit ); | ||
102 | searchLayout->addWidget( searchButton ); | ||
103 | //listLayout->addWidget( searchBox ); | ||
104 | |||
105 | if ( mMultiple ) { | 95 | 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 | 96 | ||
114 | mSelectedList = new KListView( selectedGroup ); | 97 | mSelectedList = new KListView( mMiniSplitter ); |
115 | mSelectedList->addColumn( i18n("Name") ); | 98 | mSelectedList->addColumn( i18n("Selected Name") ); |
116 | mSelectedList->addColumn( i18n("Email") ); | 99 | mSelectedList->addColumn( i18n("Email") ); |
@@ -332,2 +315,3 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | |||
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; |
@@ -336,5 +320,2 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | |||
336 | static int geoH = 0; | 320 | static int geoH = 0; |
337 | if ( QApplication::desktop()->width() <= 640 ) | ||
338 | dlg->showMaximized(); | ||
339 | else { | ||
340 | if ( !geoX && ! geoY && !geoW &&!geoH ) { | 321 | if ( !geoX && ! geoY && !geoW &&!geoH ) { |
@@ -344,9 +325,10 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | |||
344 | geoH = dlg->height(); | 325 | geoH = dlg->height(); |
345 | } else { | 326 | } |
346 | dlg->show(); | 327 | dlg->show(); |
347 | dlg->setGeometry(geoX , geoY,geoW , geoH ); | 328 | dlg->setGeometry(geoX , geoY,geoW , geoH ); |
348 | 329 | #else | |
349 | } | 330 | dlg->showMaximized(); |
350 | } | 331 | #endif |
351 | int result = dlg->exec(); | 332 | int result = dlg->exec(); |
333 | #ifdef DESKTOP_VERSION | ||
352 | geoX = dlg->geometry().x(); | 334 | geoX = dlg->geometry().x(); |
@@ -355,2 +337,3 @@ Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | |||
355 | geoH = dlg->height(); | 337 | geoH = dlg->height(); |
338 | #endif | ||
356 | if ( result == QDialog::Accepted ) { | 339 | if ( result == QDialog::Accepted ) { |