-rw-r--r-- | kabc/addresseedialog.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 3e7b72c..9197850 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -66,53 +66,56 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | |||
66 | QWidget *topWidget = plainPage(); | 66 | QWidget *topWidget = plainPage(); |
67 | 67 | ||
68 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); | 68 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); |
69 | 69 | ||
70 | 70 | ||
71 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); | 71 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); |
72 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 72 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
73 | 73 | ||
74 | topLayout->addWidget(mMiniSplitter ); | 74 | topLayout->addWidget(mMiniSplitter ); |
75 | 75 | ||
76 | QWidget *listWidget = new QWidget( mMiniSplitter ); | 76 | QWidget *listWidget = new QWidget( mMiniSplitter ); |
77 | 77 | ||
78 | QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; | 78 | QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ; |
79 | //topLayout->addLayout( listLayout ); | 79 | //topLayout->addLayout( listLayout ); |
80 | 80 | ||
81 | mAddresseeList = new KListView( listWidget ); | 81 | mAddresseeList = new KListView( listWidget ); |
82 | mAddresseeList->addColumn( i18n("Name") ); | 82 | mAddresseeList->addColumn( i18n("Name") ); |
83 | mAddresseeList->addColumn( i18n("Email") ); | 83 | mAddresseeList->addColumn( i18n("Email") ); |
84 | mAddresseeList->addColumn( i18n("Category") ); | 84 | mAddresseeList->addColumn( i18n("Category") ); |
85 | mAddresseeList->setAllColumnsShowFocus( true ); | 85 | mAddresseeList->setAllColumnsShowFocus( true ); |
86 | mAddresseeList->setFullWidth( true ); | 86 | mAddresseeList->setFullWidth( true ); |
87 | listLayout->addWidget( mAddresseeList ); | 87 | listLayout->addWidget( mAddresseeList ); |
88 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), | 88 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), |
89 | SLOT( slotOk() ) ); | 89 | SLOT( slotOk() ) ); |
90 | 90 | ||
91 | QHBox* searchBox = new QHBox ( listWidget ); | 91 | //QHBox* searchBox = new QHBox ( listWidget ); |
92 | mAddresseeEdit = new QLineEdit( searchBox ); | 92 | mAddresseeEdit = new QLineEdit( listWidget ); |
93 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), | 93 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), |
94 | SLOT( loadAddressBook() ) ); | 94 | SLOT( loadAddressBook() ) ); |
95 | mAddresseeEdit->setFocus(); | 95 | mAddresseeEdit->setFocus(); |
96 | QPushButton *searchButton = new QPushButton( i18n("Search!"), searchBox ); | 96 | QPushButton *searchButton = new QPushButton( i18n("Search!"), listWidget ); |
97 | connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); | 97 | connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) ); |
98 | 98 | ||
99 | listLayout->addWidget( searchBox ); | 99 | QHBoxLayout *searchLayout = new QHBoxLayout (listLayout) ; |
100 | searchLayout->addWidget( mAddresseeEdit ); | ||
101 | searchLayout->addWidget( searchButton ); | ||
102 | //listLayout->addWidget( searchBox ); | ||
100 | 103 | ||
101 | if ( mMultiple ) { | 104 | if ( mMultiple ) { |
102 | //QBoxLayout *selectedLayout = new QVBoxLayout; | 105 | //QBoxLayout *selectedLayout = new QVBoxLayout; |
103 | //topLayout->addLayout( selectedLayout ); | 106 | //topLayout->addLayout( selectedLayout ); |
104 | //topLayout->setSpacing( spacingHint() ); | 107 | //topLayout->setSpacing( spacingHint() ); |
105 | 108 | ||
106 | QVBox *selectedGroup = new QVBox( mMiniSplitter ); | 109 | QVBox *selectedGroup = new QVBox( mMiniSplitter ); |
107 | new QLabel ( i18n("Selected:"), selectedGroup ); | 110 | new QLabel ( i18n("Selected:"), selectedGroup ); |
108 | //selectedLayout->addWidget( selectedGroup ); | 111 | //selectedLayout->addWidget( selectedGroup ); |
109 | 112 | ||
110 | mSelectedList = new KListView( selectedGroup ); | 113 | mSelectedList = new KListView( selectedGroup ); |
111 | mSelectedList->addColumn( i18n("Name") ); | 114 | mSelectedList->addColumn( i18n("Name") ); |
112 | mSelectedList->addColumn( i18n("Email") ); | 115 | mSelectedList->addColumn( i18n("Email") ); |
113 | mSelectedList->setAllColumnsShowFocus( true ); | 116 | mSelectedList->setAllColumnsShowFocus( true ); |
114 | mSelectedList->setFullWidth( true ); | 117 | mSelectedList->setFullWidth( true ); |
115 | //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), | 118 | //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), |
116 | // SLOT( removeSelected() ) ); | 119 | // SLOT( removeSelected() ) ); |
117 | connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), | 120 | connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), |
118 | SLOT( removeSelected() ) ); | 121 | SLOT( removeSelected() ) ); |