Diffstat (limited to 'korganizer/koeditordetails.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditordetails.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index ef8025b..2fd13bd 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp | |||
@@ -77,92 +77,93 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) | |||
77 | { | 77 | { |
78 | QGridLayout *topLayout = new QGridLayout(this); | 78 | QGridLayout *topLayout = new QGridLayout(this); |
79 | topLayout->setSpacing(spacing); | 79 | topLayout->setSpacing(spacing); |
80 | 80 | ||
81 | QString organizer = KOPrefs::instance()->email(); | 81 | QString organizer = KOPrefs::instance()->email(); |
82 | mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); | 82 | mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); |
83 | 83 | ||
84 | mListView = new KListView(this,"mListView"); | 84 | mListView = new KListView(this,"mListView"); |
85 | mListView->addColumn(i18n("Name"),180); | 85 | mListView->addColumn(i18n("Name"),180); |
86 | mListView->addColumn(i18n("Email"),180); | 86 | mListView->addColumn(i18n("Email"),180); |
87 | mListView->addColumn(i18n("Role"),60); | 87 | mListView->addColumn(i18n("Role"),60); |
88 | mListView->addColumn(i18n("Status"),100); | 88 | mListView->addColumn(i18n("Status"),100); |
89 | mListView->addColumn(i18n("RSVP"),35); | 89 | mListView->addColumn(i18n("RSVP"),35); |
90 | if ( KOPrefs::instance()->mCompactDialogs ) { | 90 | if ( KOPrefs::instance()->mCompactDialogs ) { |
91 | //mListView->setFixedHeight(78); | 91 | //mListView->setFixedHeight(78); |
92 | } | 92 | } |
93 | mListView->setAllColumnsShowFocus (true ); | 93 | mListView->setAllColumnsShowFocus (true ); |
94 | //mListView->setSingleClick( true ); | 94 | //mListView->setSingleClick( true ); |
95 | connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), | 95 | connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), |
96 | SLOT(updateAttendeeInput())); | 96 | SLOT(updateAttendeeInput())); |
97 | 97 | ||
98 | connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), | 98 | connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), |
99 | SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); | 99 | SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); |
100 | 100 | ||
101 | mRsvpButton = new QCheckBox(this); | ||
102 | mRsvpButton->setText(i18n("Request response")); | ||
103 | mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); | ||
101 | QLabel *attendeeLabel = new QLabel(this); | 104 | QLabel *attendeeLabel = new QLabel(this); |
102 | attendeeLabel->setText(i18n("Name:")); | 105 | attendeeLabel->setText(i18n("Name:")); |
103 | attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); | 106 | attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); |
104 | mNameEdit = new QLineEdit(this); | 107 | mNameEdit = new QLineEdit(this); |
105 | connect(mNameEdit,SIGNAL(textChanged(const QString &)), | 108 | connect(mNameEdit,SIGNAL(textChanged(const QString &)), |
106 | SLOT(updateAttendeeItem())); | 109 | SLOT(updateAttendeeItem())); |
107 | 110 | ||
108 | mUidEdit = new QLineEdit(0); | 111 | mUidEdit = new QLineEdit(0); |
109 | mUidEdit->setText(""); | 112 | mUidEdit->setText(""); |
110 | 113 | ||
111 | QLabel *emailLabel = new QLabel(this); | 114 | QLabel *emailLabel = new QLabel(this); |
112 | emailLabel->setText(i18n("Email:")); | 115 | emailLabel->setText(i18n("Email:")); |
113 | mEmailEdit = new QLineEdit(this); | 116 | mEmailEdit = new QLineEdit(this); |
114 | connect(mEmailEdit,SIGNAL(textChanged(const QString &)), | 117 | connect(mEmailEdit,SIGNAL(textChanged(const QString &)), |
115 | SLOT(updateAttendeeItem())); | 118 | SLOT(updateAttendeeItem())); |
116 | 119 | ||
117 | QLabel *attendeeRoleLabel = new QLabel(this); | 120 | QLabel *attendeeRoleLabel = new QLabel(this); |
118 | attendeeRoleLabel->setText(i18n("Role:")); | 121 | attendeeRoleLabel->setText(i18n("Role:")); |
119 | mRoleCombo = new QComboBox(false,this); | 122 | mRoleCombo = new QComboBox(false,this); |
120 | mRoleCombo->insertStringList(Attendee::roleList()); | 123 | mRoleCombo->insertStringList(Attendee::roleList()); |
121 | connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); | 124 | connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); |
122 | 125 | ||
123 | QLabel *statusLabel = new QLabel(this); | 126 | QLabel *statusLabel = new QLabel(this); |
124 | statusLabel->setText( i18n("Status:") ); | 127 | statusLabel->setText( i18n("Status:") ); |
125 | 128 | ||
126 | mStatusCombo = new QComboBox(false,this); | 129 | mStatusCombo = new QComboBox(false,this); |
127 | mStatusCombo->insertStringList(Attendee::statusList()); | 130 | mStatusCombo->insertStringList(Attendee::statusList()); |
128 | connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); | 131 | connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); |
129 | 132 | ||
130 | mRsvpButton = new QCheckBox(this); | 133 | |
131 | mRsvpButton->setText(i18n("Request response")); | ||
132 | connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); | 134 | connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); |
133 | QWidget *buttonBox = new QWidget(this); | 135 | QWidget *buttonBox = new QWidget(this); |
134 | QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); | 136 | QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); |
135 | 137 | ||
136 | QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); | 138 | QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); |
137 | buttonLayout->addWidget(newButton); | 139 | buttonLayout->addWidget(newButton); |
138 | connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee())); | 140 | connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee())); |
139 | 141 | ||
140 | mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox); | 142 | mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox); |
141 | buttonLayout->addWidget(mRemoveButton); | 143 | buttonLayout->addWidget(mRemoveButton); |
142 | connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee())); | 144 | connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee())); |
143 | 145 | ||
144 | mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); | ||
145 | // buttonLayout->addWidget(mAddressBookButton); | 146 | // buttonLayout->addWidget(mAddressBookButton); |
146 | connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); | 147 | connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); |
147 | //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); | 148 | //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); |
148 | 149 | ||
149 | if (qApp->desktop()->width() < 640 ) { | 150 | if (qApp->desktop()->width() < 640 ) { |
150 | if ( qApp->desktop()->width() < 300 ) | 151 | if ( qApp->desktop()->width() < 300 ) |
151 | topLayout->setSpacing(1); | 152 | topLayout->setSpacing(1); |
152 | ;//mListView->setFixedHeight(80); | 153 | ;//mListView->setFixedHeight(80); |
153 | topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); | 154 | topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); |
154 | topLayout->addMultiCellWidget(mListView,1,1,0,3); | 155 | topLayout->addMultiCellWidget(mListView,1,1,0,3); |
155 | topLayout->addWidget(attendeeLabel,3,0); | 156 | topLayout->addWidget(attendeeLabel,3,0); |
156 | topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); | 157 | topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); |
157 | topLayout->addWidget(emailLabel,4,0); | 158 | topLayout->addWidget(emailLabel,4,0); |
158 | topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); | 159 | topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); |
159 | topLayout->addWidget(attendeeRoleLabel,5,0); | 160 | topLayout->addWidget(attendeeRoleLabel,5,0); |
160 | topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3); | 161 | topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3); |
161 | topLayout->addWidget(statusLabel,6,0); | 162 | topLayout->addWidget(statusLabel,6,0); |
162 | topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3); | 163 | topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3); |
163 | topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); | 164 | topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); |
164 | topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); | 165 | topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); |
165 | topLayout->addMultiCellWidget(buttonBox,3,4,3,3); | 166 | topLayout->addMultiCellWidget(buttonBox,3,4,3,3); |
166 | topLayout->setRowStretch(1,2); | 167 | topLayout->setRowStretch(1,2); |
167 | topLayout->setColStretch(0,0); | 168 | topLayout->setColStretch(0,0); |
168 | topLayout->setColStretch(1,2); | 169 | topLayout->setColStretch(1,2); |