Changeset 6118 for trunk/qt4-gui/src/core
- Timestamp:
- 03/29/08 04:35:22 (8 months ago)
- Location:
- trunk/qt4-gui/src/core
- Files:
-
- 2 modified
-
messagebox.cpp (modified) (22 diffs)
-
messagebox.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/core/messagebox.cpp
r6048 r6118 22 22 23 23 #include "config.h" 24 25 #include <algorithm>26 #include <ctype.h>27 #include <stdio.h>28 24 29 25 #include <QHBoxLayout> … … 48 44 /*! \brief Dialog with configurable yes/no buttons 49 45 * 50 * In it's easiest form, this dialog displays szQuery and the buttons szBtn1 and szBtn2.51 * szBtn1 means true/yes,52 * szBtn2 means false/no.46 * In it's easiest form, this dialog displays query and the buttons button1 and button2. 47 * button1 means true/yes, 48 * button2 means false/no. 53 49 * 54 50 * When bConfirmYes is true, then a second dialog asks the user to confirm his positive … … 58 54 * decision, the displayed confirmation message is passed using the QString szConfirmNo. 59 55 */ 60 bool LicqQtGui::QueryUser(QWidget* q, QString szQuery, QString szBtn1, QString szBtn2,61 bool bConfirmYes, QString szConfirmYes, bool bConfirmNo, QString szConfirmNo)56 bool LicqQtGui::QueryUser(QWidget* parent, QString query, QString button1, QString button2, 57 bool confirmYes, QString confirmYesText, bool confirmNo, QString confirmNoText) 62 58 { 63 59 bool result; 64 60 65 61 #ifdef USE_KDE 66 result = (KMessageBox::questionYesNo( q, szQuery, QMessageBox::tr("Licq Question"),67 KGuiItem( szBtn1), KGuiItem(szBtn2)) == KMessageBox::Yes);62 result = (KMessageBox::questionYesNo(parent, query, QMessageBox::tr("Licq Question"), 63 KGuiItem(button1), KGuiItem(button2)) == KMessageBox::Yes); 68 64 // The user must confirm his decision! 69 if (result == true && bConfirmYes && !szConfirmYes.isEmpty())70 result = (KMessageBox::questionYesNo( q, szConfirmYes,65 if (result == true && confirmYes && !confirmYesText.isEmpty()) 66 result = (KMessageBox::questionYesNo(parent, confirmYesText, 71 67 QMessageBox::tr("Licq Question")) == KMessageBox::Yes); 72 else if (result == false && bConfirmNo && !szConfirmNo.isEmpty())73 result = (KMessageBox::questionYesNo( q, szConfirmNo,68 else if (result == false && confirmNo && !confirmNoText.isEmpty()) 69 result = (KMessageBox::questionYesNo(parent, confirmNoText, 74 70 QMessageBox::tr("Licq Question")) == KMessageBox::Yes); 75 71 #else 76 result = (QMessageBox::question( q, QMessageBox::tr("Licq Question"), szQuery,77 szBtn1, szBtn2) == 0);72 result = (QMessageBox::question(parent, QMessageBox::tr("Licq Question"), query, 73 button1, button2) == 0); 78 74 // The user must confirm his decision! 79 if (result == true && bConfirmYes && !szConfirmYes.isEmpty())80 result = (QMessageBox::question( q, QMessageBox::tr("Licq Question"), szConfirmYes,75 if (result == true && confirmYes && !confirmYesText.isEmpty()) 76 result = (QMessageBox::question(parent, QMessageBox::tr("Licq Question"), confirmYesText, 81 77 QMessageBox::tr("Yes"), QMessageBox::tr("No")) == 0); 82 else if (result == false && bConfirmNo && !szConfirmNo.isEmpty())83 result = (QMessageBox::question( q, QMessageBox::tr("Licq Question"), szConfirmNo,78 else if (result == false && confirmNo && !confirmNoText.isEmpty()) 79 result = (QMessageBox::question(parent, QMessageBox::tr("Licq Question"), confirmNoText, 84 80 QMessageBox::tr("Yes"), QMessageBox::tr("No")) == 0); 85 81 #endif … … 88 84 } 89 85 90 int LicqQtGui::QueryUser(QWidget* q, QString szQuery, QString szBtn1, QString szBtn2, QString szBtn3)91 { 92 return ( QMessageBox::question( q, QMessageBox::tr("Licq Question"), szQuery, szBtn1, szBtn2, szBtn3));86 int LicqQtGui::QueryUser(QWidget* parent, QString query, QString button1, QString button2, QString button3) 87 { 88 return ( QMessageBox::question(parent, QMessageBox::tr("Licq Question"), query, button1, button2, button3)); 93 89 } 94 90 … … 98 94 } 99 95 100 101 void LicqQtGui::InformUser(QWidget* q, QString sz) 102 { 103 MessageManager::Instance()->addMessage(QMessageBox::Information, sz, q); 104 } 105 106 void LicqQtGui::WarnUser(QWidget* q, QString sz) 107 { 108 MessageManager::Instance()->addMessage(QMessageBox::Warning, sz, q); 109 } 110 111 void LicqQtGui::CriticalUser(QWidget* q, QString sz) 112 { 113 MessageManager::Instance()->addMessage(QMessageBox::Critical, sz, q); 96 void LicqQtGui::InformUser(QWidget* parent, QString text) 97 { 98 MessageBox::addMessage(QMessageBox::Information, text, parent); 99 } 100 101 void LicqQtGui::WarnUser(QWidget* parent, QString text) 102 { 103 MessageBox::addMessage(QMessageBox::Warning, text, parent); 104 } 105 106 void LicqQtGui::CriticalUser(QWidget* parent, QString text) 107 { 108 MessageBox::addMessage(QMessageBox::Critical, text, parent); 114 109 } 115 110 … … 117 112 118 113 MessageBox::MessageBox(QWidget* parent) 119 : QDialog(parent, Qt::Dialog), m _nUnreadNum(0)114 : QDialog(parent, Qt::Dialog), myUnreadCount(0) 120 115 { 121 116 setModal(true); … … 127 122 QMessageBox::Icon type = QMessageBox::Information; 128 123 129 QVBoxLayout* topLay = new QVBoxLayout(this);124 QVBoxLayout* topLayout = new QVBoxLayout(this); 130 125 131 126 // Make the first horizontal layout for the icon and message 132 QFrame* frmMessage = new QFrame(); 133 QHBoxLayout* lay = new QHBoxLayout(frmMessage); 134 m_lblIcon = new QLabel(); 127 QHBoxLayout* messageLayout = new QHBoxLayout(); 128 myIconLabel = new QLabel(); 135 129 QPixmap icon = getMessageIcon(type); 136 m_lblIcon->setPixmap(icon); 137 m_lblMessage = new QLabel(msg); 138 139 lay->addWidget(m_lblIcon, 0, Qt::AlignCenter); 140 lay->addWidget(m_lblMessage); 130 myIconLabel->setPixmap(icon); 131 myMessageLabel = new QLabel(msg); 132 133 messageLayout->addStretch(1); 134 messageLayout->addWidget(myIconLabel); 135 messageLayout->addWidget(myMessageLabel); 136 messageLayout->addStretch(1); 141 137 142 138 // Make the list box of all the pending messages, starts out hidden 143 m_frmList = new QFrame(); 144 QHBoxLayout* layList = new QHBoxLayout(m_frmList); 145 m_lstMsg = new QListWidget(); 146 m_lstMsg->setFixedHeight(100); // This seems to be a good height 147 layList->addWidget(m_lstMsg); 148 // Add this listbox as an extension to the dialog, and make it shown at the 149 // bottom part of the dialog. 150 setOrientation(Qt::Vertical); 151 setExtension(m_frmList); 139 myExtension = new QWidget(); 140 myExtension->hide(); 141 QHBoxLayout* listLayout = new QHBoxLayout(myExtension); 142 listLayout->setMargin(0); 143 myMessageList = new QListWidget(); 144 myMessageList->setFixedHeight(100); // This seems to be a good height 145 listLayout->addWidget(myMessageList); 152 146 153 147 // Make the second horizontal layout for the buttons 154 QFrame* frmButtons = new QFrame(); 155 QHBoxLayout* lay2 = new QHBoxLayout(frmButtons); 156 m_btnMore = new QPushButton(tr("&List")); 157 //m_btnMore->setDisabled(true); 158 m_btnNext = new QPushButton(tr("&Next")); 159 m_btnNext->setDisabled(true); 160 m_btnClear = new QPushButton(tr("&Ok")); 161 m_btnClear->setDefault(true); 162 163 lay2->addWidget(m_btnMore); 164 lay2->addWidget(m_btnNext); 165 lay2->addWidget(m_btnClear); 166 167 topLay->addWidget(frmMessage, 0, Qt::AlignCenter); 168 topLay->addWidget(frmButtons, 0, Qt::AlignCenter); 148 QHBoxLayout* buttonsLayout = new QHBoxLayout(); 149 myMoreButton = new QPushButton(tr("&List")); 150 myMoreButton->setCheckable(true); 151 //myMoreButton->setDisabled(true); 152 myNextButton = new QPushButton(tr("&Next")); 153 myNextButton->setDisabled(true); 154 myCloseButton = new QPushButton(tr("&Ok")); 155 myCloseButton->setDefault(true); 156 157 buttonsLayout->addStretch(1); 158 buttonsLayout->addWidget(myMoreButton); 159 buttonsLayout->addWidget(myNextButton); 160 buttonsLayout->addWidget(myCloseButton); 161 buttonsLayout->addStretch(1); 162 163 topLayout->addLayout(messageLayout); 164 topLayout->addLayout(buttonsLayout); 165 topLayout->addWidget(myExtension); 169 166 170 167 // Connect all the signals here 171 connect(m _btnMore, SIGNAL(clicked()), SLOT(slot_toggleMore()));172 connect(m _btnNext, SIGNAL(clicked()), SLOT(slot_clickNext()));173 connect(m _btnClear, SIGNAL(clicked()), SLOT(slot_clickClear()));174 connect(m _lstMsg, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),175 SLOT( slot_listChanged(QListWidgetItem*, QListWidgetItem*)));168 connect(myMoreButton, SIGNAL(toggled(bool)), myExtension, SLOT(setVisible(bool))); 169 connect(myNextButton, SIGNAL(clicked()), SLOT(showNext())); 170 connect(myCloseButton, SIGNAL(clicked()), SLOT(closeDialog())); 171 connect(myMessageList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), 172 SLOT(updateCurrentMessage(QListWidgetItem*, QListWidgetItem*))); 176 173 177 174 show(); 175 } 176 177 MessageBox::~MessageBox() 178 { 179 myMessageDialog = NULL; 178 180 } 179 181 … … 188 190 // If we have only one message in queue, show that one, otherwise update 189 191 // the number of pending messages. 190 if (m_lstMsg->count() == 0) 191 { 192 m_lblIcon->setPixmap(pix); 193 m_lblMessage->setText(msg); 194 m_btnNext->setText(tr("&Next")); 195 m_btnNext->setEnabled(false); 196 m_btnMore->setEnabled(false); 197 m_btnNext->hide(); 198 m_btnMore->hide(); 199 m_btnClear->setText(tr("&Ok")); 200 showExtension(false); // We are opening the window, so default to not showing this 192 if (myMessageList->count() == 0) 193 { 194 myIconLabel->setPixmap(pix); 195 myMessageLabel->setText(msg); 196 myNextButton->setText(tr("&Next")); 197 myNextButton->setEnabled(false); 198 myMoreButton->setEnabled(false); 199 myNextButton->hide(); 200 myMoreButton->hide(); 201 myCloseButton->setText(tr("&Ok")); 201 202 } 202 203 else 203 204 { 204 m _nUnreadNum++;205 myUnreadCount++; 205 206 unread = true; // It is unread 206 m _btnClear->setText(tr("&Clear All"));207 QString nextStr = QString(tr("&Next (%1)")).arg(m _nUnreadNum);208 m _btnNext->setText(nextStr);209 if (!m _btnNext->isEnabled())207 myCloseButton->setText(tr("&Clear All")); 208 QString nextStr = QString(tr("&Next (%1)")).arg(myUnreadCount); 209 myNextButton->setText(nextStr); 210 if (!myNextButton->isEnabled()) 210 211 { 211 m _btnNext->setEnabled(true);212 m _btnNext->show();212 myNextButton->setEnabled(true); 213 myNextButton->show(); 213 214 } 214 if (!m _btnMore->isEnabled())215 if (!myMoreButton->isEnabled()) 215 216 { 216 m _btnMore->setEnabled(true);217 m _btnMore->show();217 myMoreButton->setEnabled(true); 218 myMoreButton->show(); 218 219 } 219 220 } 220 221 221 MessageBoxItem* pEntry = new MessageBoxItem();222 MessageBoxItem* entry = new MessageBoxItem(); 222 223 // Resize the icon 223 224 img = pix.toImage(); … … 228 229 QPixmap scaledPix(QPixmap::fromImage(img)); 229 230 // Add the columns now 230 pEntry->setIcon(scaledPix);231 pEntry->setText(msg.left(qMin(50, msg.indexOf('\n')))); // Put this in setMessage()231 entry->setIcon(scaledPix); 232 entry->setText(msg.left(qMin(50, msg.indexOf('\n')))); // Put this in setMessage() 232 233 // Set the special data 233 pEntry->setMessage(msg);234 pEntry->setFullIcon(pix);235 pEntry->setUnread(unread);236 pEntry->setType(type);237 238 m _lstMsg->insertItem(0, pEntry);234 entry->setMessage(msg); 235 entry->setFullIcon(pix); 236 entry->setUnread(unread); 237 entry->setType(type); 238 239 myMessageList->insertItem(0, entry); 239 240 240 241 // Set the caption if we set the text and icon here 241 if (m_nUnreadNum == 0) 242 updateCaption(pEntry); 243 } 244 245 /// //////////////////////////////////////////////////////// 246 /// @brief Toggline the detailed list view 247 /// 248 /// When the more button is clicked, toggle showing the list view of 249 /// pending messages. When we hide the list view, we need to show the 250 /// oldest unread message. 251 /// //////////////////////////////////////////////////////// 252 void MessageBox::slot_toggleMore() 253 { 254 showExtension(m_frmList->isHidden()); 242 if (myUnreadCount == 0) 243 updateCaption(entry); 255 244 } 256 245 … … 261 250 /// unread message. The text and icon will both be updated. 262 251 /// //////////////////////////////////////////////////////// 263 void MessageBox::s lot_clickNext()252 void MessageBox::showNext() 264 253 { 265 254 // Find the next unread message 266 bool bFound = false;255 bool found = false; 267 256 MessageBoxItem* item = 0; 268 for (int i = m _lstMsg->currentRow(); i >= 0; --i)269 { 270 item = dynamic_cast<MessageBoxItem*>(m _lstMsg->item(i));257 for (int i = myMessageList->currentRow(); i >= 0; --i) 258 { 259 item = dynamic_cast<MessageBoxItem*>(myMessageList->item(i)); 271 260 if (item->isUnread()) 272 261 { 273 bFound = true;262 found = true; 274 263 break; 275 264 } … … 277 266 278 267 // If no unread item was found, search from the bottom 279 if (! bFound)280 { 281 for (int i = m _lstMsg->count() - 1; i >= 0; --i)268 if (!found) 269 { 270 for (int i = myMessageList->count() - 1; i >= 0; --i) 282 271 { 283 item = dynamic_cast<MessageBoxItem*>(m _lstMsg->item(i));272 item = dynamic_cast<MessageBoxItem*>(myMessageList->item(i)); 284 273 if (item->isUnread()) 285 274 { 286 bFound = true;275 found = true; 287 276 break; 288 277 } … … 291 280 292 281 // Only change the item if there something to change it to 293 if ( bFound)294 m _lstMsg->setCurrentItem(item);282 if (found) 283 myMessageList->setCurrentItem(item); 295 284 } 296 285 … … 301 290 /// remove all messages from the queue. 302 291 /// //////////////////////////////////////////////////////// 303 void MessageBox:: slot_clickClear()292 void MessageBox::closeDialog() 304 293 { 305 294 // Hide the window first … … 307 296 308 297 // Remove all items that have been read 309 m _lstMsg->clear();310 m _nUnreadNum= 0;298 myMessageList->clear(); 299 myUnreadCount = 0; 311 300 } 312 301 … … 320 309 /// @param previous The QListWidgetItem* that has been selected prior 321 310 /// //////////////////////////////////////////////////////// 322 void MessageBox:: slot_listChanged(QListWidgetItem* i, QListWidgetItem* /* previous */)311 void MessageBox::updateCurrentMessage(QListWidgetItem* i, QListWidgetItem* /* previous */) 323 312 { 324 313 // Change the icon, message and caption … … 326 315 if (item != NULL) 327 316 { 328 m _lblIcon->setPixmap(item->getFullIcon());329 m _lblMessage->setText(item->getMessage());317 myIconLabel->setPixmap(item->getFullIcon()); 318 myMessageLabel->setText(item->getMessage()); 330 319 updateCaption(item); 331 320 … … 333 322 if (item->isUnread()) 334 323 { 335 m _nUnreadNum--;324 myUnreadCount--; 336 325 item->setUnread(false); 337 326 } … … 340 329 // Update the next button 341 330 QString nextStr; 342 if (m _nUnreadNum> 0)343 nextStr = QString(tr("&Next (%1)")).arg(m _nUnreadNum);331 if (myUnreadCount > 0) 332 nextStr = QString(tr("&Next (%1)")).arg(myUnreadCount); 344 333 else 345 334 { 346 335 // No more unread messages 347 336 nextStr = QString(tr("&Next")); 348 m _btnNext->setEnabled(false);349 m _nUnreadNum= 0;350 } 351 m _btnNext->setText(nextStr);337 myNextButton->setEnabled(false); 338 myUnreadCount = 0; 339 } 340 myNextButton->setText(nextStr); 352 341 } 353 342 … … 362 351 return; 363 352 364 QString strCaption;353 QString caption; 365 354 switch (item->getType()) 366 355 { 367 356 case QMessageBox::Information: 368 strCaption = tr("Licq Information");357 caption = tr("Licq Information"); 369 358 break; 370 359 371 360 case QMessageBox::Warning: 372 strCaption = tr("Licq Warning");361 caption = tr("Licq Warning"); 373 362 break; 374 363 375 364 case QMessageBox::Critical: 376 strCaption = tr("Licq Critical");365 caption = tr("Licq Critical"); 377 366 break; 378 367 … … 380 369 case QMessageBox::Question: 381 370 default: 382 strCaption = tr("Licq");383 break; 384 } 385 setWindowTitle( strCaption);371 caption = tr("Licq"); 372 break; 373 } 374 setWindowTitle(caption); 386 375 } 387 376 … … 419 408 } 420 409 421 MessageManager* MessageManager::m_pInstance = 0; 422 423 MessageManager::MessageManager() 424 : m_pMsgDlg(0) 425 { 426 } 427 428 MessageManager::~MessageManager() 429 { 430 if (m_pMsgDlg) 431 delete m_pMsgDlg; 432 } 433 434 MessageManager* MessageManager::Instance() 435 { 436 if (m_pInstance == 0) 437 m_pInstance = new MessageManager; 438 439 return m_pInstance; 440 } 441 442 void MessageManager::addMessage(QMessageBox::Icon type, const QString& msg, 410 MessageBox* MessageBox::myMessageDialog = 0; 411 412 void MessageBox::addMessage(QMessageBox::Icon type, const QString& msg, 443 413 QWidget* parent) 444 414 { 445 415 // We should pass parent to it, but it causes a crash after the parent closes 446 // and we try to show another message box. I tried to reparent m _pMsgDlg, but416 // and we try to show another message box. I tried to reparent myMessageDialog, but 447 417 // that didnt help much. 448 418 // So for now.. we do this: 449 419 parent = 0; // XXX See comment above 450 if (m _pMsgDlg == 0)451 m _pMsgDlg = new MessageBox(parent);452 453 m _pMsgDlg->addMessage(type, msg);454 m _pMsgDlg->show();420 if (myMessageDialog == 0) 421 myMessageDialog = new MessageBox(parent); 422 423 myMessageDialog->addMessage(type, msg); 424 myMessageDialog->show(); 455 425 } 456 426 … … 458 428 : QListWidgetItem(parent) 459 429 { 460 m _unread = false;461 } 462 463 void MessageBoxItem::setUnread(bool b)464 { 465 m _unread = b;466 if (m _unread)430 myUnread = false; 431 } 432 433 void MessageBoxItem::setUnread(bool unread) 434 { 435 myUnread = unread; 436 if (myUnread) 467 437 setForeground(Qt::red); 468 438 else -
trunk/qt4-gui/src/core/messagebox.h
r5837 r6118 34 34 namespace LicqQtGui 35 35 { 36 bool QueryUser(QWidget*, QString, QString, QString, bool bConfirmYes=false, 37 QString szConfirm=NULL, bool bConfirmNo=false, QString szConfirmNo=NULL); 38 int QueryUser(QWidget*, QString, QString, QString, QString); 36 bool QueryUser(QWidget* q, QString query, QString button1, QString button2, 37 bool confirmYes = false, QString confirmYesText = NULL, 38 bool confirmNo = false, QString confirmNoText = NULL); 39 int QueryUser(QWidget* parent, QString query, QString button1, QString button2, 40 QString button3); 39 41 bool QueryYesNo(QWidget* parent, QString query); 40 void InformUser(QWidget* q, QString); 41 void WarnUser(QWidget* q, QString szInfo); 42 void CriticalUser(QWidget* q, QString szInfo); 42 void InformUser(QWidget* parent, QString text); 43 void WarnUser(QWidget* parent, QString text); 44 void CriticalUser(QWidget* parent, QString text); 45 43 46 44 47 class MessageBoxItem : public QListWidgetItem … … 47 50 MessageBoxItem(QListWidget* parent = 0); 48 51 49 void setMessage(const QString& s) { m _msg= s; }50 void setFullIcon(const QPixmap& p) { m _fullIcon = p; }51 void setUnread(bool b);52 void setType(QMessageBox::Icon t) { m _type = t; }52 void setMessage(const QString& s) { myMessage = s; } 53 void setFullIcon(const QPixmap& p) { myFullIcon = p; } 54 void setUnread(bool unread); 55 void setType(QMessageBox::Icon t) { myType = t; } 53 56 54 QString getMessage() const { return m _msg; }55 QPixmap getFullIcon() const { return m _fullIcon; }56 bool isUnread() const { return m _unread; }57 QMessageBox::Icon getType() const { return m _type; }57 QString getMessage() const { return myMessage; } 58 QPixmap getFullIcon() const { return myFullIcon; } 59 bool isUnread() const { return myUnread; } 60 QMessageBox::Icon getType() const { return myType; } 58 61 59 62 private: 60 QString m _msg;61 QPixmap m _fullIcon;62 bool m _unread;63 QMessageBox::Icon m _type;63 QString myMessage; 64 QPixmap myFullIcon; 65 bool myUnread; 66 QMessageBox::Icon myType; 64 67 }; 65 68 … … 68 71 Q_OBJECT 69 72 public: 73 static void addMessage(QMessageBox::Icon type, const QString& msg, QWidget* p); 74 75 public slots: 76 void showNext(); 77 void closeDialog(); 78 void updateCurrentMessage(QListWidgetItem* current, QListWidgetItem* previous); 79 80 private: 70 81 MessageBox(QWidget* parent = 0); 82 ~MessageBox(); 71 83 void addMessage(QMessageBox::Icon type, const QString& msg); 72 84 73 public slots:74 void slot_toggleMore();75 void slot_clickNext();76 void slot_clickClear();77 void slot_listChanged(QListWidgetItem* current, QListWidgetItem* previous);78 79 private:80 85 QPixmap getMessageIcon(QMessageBox::Icon); 81 86 void updateCaption(MessageBoxItem*); 82 87 83 int m_nUnreadNum; 84 QLabel* m_lblIcon; 85 QLabel* m_lblMessage; 86 QPushButton* m_btnNext; 87 QPushButton* m_btnMore; 88 QPushButton* m_btnClear; 89 QListWidget* m_lstMsg; 90 QFrame* m_frmList; 91 }; 88 static MessageBox* myMessageDialog; 92 89 93 class MessageManager 94 { 95 public: 96 ~MessageManager(); 97 98 static MessageManager* Instance(); 99 100 void addMessage(QMessageBox::Icon type, const QString& msg, QWidget* p); 101 102 private: 103 MessageManager(); 104 MessageManager(const MessageManager&); 105 MessageManager& operator=(const MessageManager&); 106 107 static MessageManager* m_pInstance; 108 MessageBox* m_pMsgDlg; 90 int myUnreadCount; 91 QLabel* myIconLabel; 92 QLabel* myMessageLabel; 93 QPushButton* myNextButton; 94 QPushButton* myMoreButton; 95 QPushButton* myCloseButton; 96 QListWidget* myMessageList; 97 QWidget* myExtension; 109 98 }; 110 99
