Changeset 5725
- Timestamp:
- 2007-10-29 02:18:09 (9 months ago)
- Files:
-
- branches/qt-gui_qt4/src/CMakeLists.txt (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/chatdlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/editfiledlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/editgrpdlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/filedlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/forwarddlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/logwindow.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/ownermanagerdlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/phonedlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/plugindlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/randomchatdlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/registeruser.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/searchuserdlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/securitydlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/skinbrowser.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/userinfodlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dialogs/utilitydlg.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/dockicons/themeddockicon.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/mainwin.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/menus/usermenu.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/messagebox.cpp (moved) (moved from branches/qt-gui_qt4/src/ewidgets.cpp) (17 diffs)
- branches/qt-gui_qt4/src/messagebox.h (moved) (moved from branches/qt-gui_qt4/src/ewidgets.h) (5 diffs)
- branches/qt-gui_qt4/src/userevents/usereventcommon.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendchatevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendcommon.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendfileevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendmsgevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendsmsevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/usersendurlevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/userevents/userviewevent.cpp (modified) (1 diff)
- branches/qt-gui_qt4/src/views/mmuserview.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/qt-gui_qt4/src/CMakeLists.txt
r5724 r5725 1 1 # Sources common for both Qt4- and KDE4-GUI 2 2 set(Qt-GUI_SRCS 3 ewidgets.cpp4 3 historyview.cpp 5 4 licqgui.cpp 6 5 mainwin.cpp 6 messagebox.cpp 7 7 mlview.cpp 8 8 signalmanager.cpp branches/qt-gui_qt4/src/dialogs/chatdlg.cpp
r5694 r5725 72 72 #include "helpers/support.h" 73 73 #include "helpers/usercodec.h" 74 #include " ewidgets.h"74 #include "messagebox.h" 75 75 76 76 // --------------------------------------------------------------------------- branches/qt-gui_qt4/src/dialogs/editfiledlg.cpp
r5577 r5725 34 34 #include "widgets/mledit.h" 35 35 36 #include " ewidgets.h"36 #include "messagebox.h" 37 37 38 38 using namespace LicqQtGui; branches/qt-gui_qt4/src/dialogs/editgrpdlg.cpp
r5577 r5725 38 38 #include "widgets/infofield.h" 39 39 40 #include " ewidgets.h"40 #include "messagebox.h" 41 41 42 42 using namespace LicqQtGui; branches/qt-gui_qt4/src/dialogs/filedlg.cpp
r5577 r5725 51 51 #include "widgets/mledit.h" 52 52 53 #include " ewidgets.h"53 #include "messagebox.h" 54 54 55 55 using namespace LicqQtGui; branches/qt-gui_qt4/src/dialogs/forwarddlg.cpp
r5577 r5725 43 43 #include "widgets/infofield.h" 44 44 45 #include " ewidgets.h"45 #include "messagebox.h" 46 46 #include "gui-defines.h" 47 47 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/logwindow.cpp
r5676 r5725 44 44 45 45 #include "widgets/mledit.h" 46 #include " ewidgets.h"46 #include "messagebox.h" 47 47 48 48 #undef connect branches/qt-gui_qt4/src/dialogs/ownermanagerdlg.cpp
r5580 r5725 42 42 #include "helpers/support.h" 43 43 44 #include " ewidgets.h"44 #include "messagebox.h" 45 45 #include "gui-defines.h" 46 46 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/phonedlg.cpp
r5701 r5725 40 40 #include "helpers/usercodec.h" 41 41 42 #include " ewidgets.h"42 #include "messagebox.h" 43 43 44 44 using namespace LicqQtGui; branches/qt-gui_qt4/src/dialogs/plugindlg.cpp
r5577 r5725 43 43 #include "helpers/support.h" 44 44 45 #include " ewidgets.h"45 #include "messagebox.h" 46 46 #include "editfiledlg.h" 47 47 branches/qt-gui_qt4/src/dialogs/randomchatdlg.cpp
r5577 r5725 34 34 #include "helpers/support.h" 35 35 36 #include " ewidgets.h"36 #include "messagebox.h" 37 37 #include "gui-defines.h" 38 38 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/registeruser.cpp
r5682 r5725 34 34 #include <licq_icqd.h> 35 35 36 #include " ewidgets.h"36 #include "messagebox.h" 37 37 #include "signalmanager.h" 38 38 #include "helpers/support.h" branches/qt-gui_qt4/src/dialogs/searchuserdlg.cpp
r5580 r5725 46 46 #include "helpers/support.h" 47 47 #include "widgets/tabwidget.h" 48 #include " ewidgets.h"48 #include "messagebox.h" 49 49 #include "gui-defines.h" 50 50 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/securitydlg.cpp
r5577 r5725 40 40 #include "helpers/support.h" 41 41 42 #include " ewidgets.h"42 #include "messagebox.h" 43 43 #include "signalmanager.h" 44 44 branches/qt-gui_qt4/src/dialogs/skinbrowser.cpp
r5723 r5725 50 50 51 51 #include "editfiledlg.h" 52 #include " ewidgets.h"52 #include "messagebox.h" 53 53 #include "gui-defines.h" 54 54 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/userinfodlg.cpp
r5701 r5725 88 88 #include "editcategorydlg.h" 89 89 #include "editfiledlg.h" 90 #include " ewidgets.h"90 #include "messagebox.h" 91 91 #include "historyview.h" 92 92 #include "mainwin.h" branches/qt-gui_qt4/src/dialogs/utilitydlg.cpp
r5577 r5725 39 39 #include "widgets/mledit.h" 40 40 41 #include " ewidgets.h"41 #include "messagebox.h" 42 42 43 43 using namespace LicqQtGui; branches/qt-gui_qt4/src/dockicons/themeddockicon.cpp
r5580 r5725 32 32 33 33 #include "config/general.h" 34 #include " ewidgets.h"34 #include "messagebox.h" 35 35 #include "gui-defines.h" 36 36 branches/qt-gui_qt4/src/mainwin.cpp
r5723 r5725 133 133 #include "views/floatyview.h" 134 134 135 #include " ewidgets.h"135 #include "messagebox.h" 136 136 #include "gui-defines.h" 137 137 #include "signalmanager.h" branches/qt-gui_qt4/src/menus/usermenu.cpp
r5579 r5725 41 41 #include "dialogs/utilitydlg.h" 42 42 #include "helpers/strings.h" 43 #include " ewidgets.h"43 #include "messagebox.h" 44 44 #include "gui-defines.h" 45 45 #include "mainwin.h" branches/qt-gui_qt4/src/messagebox.cpp
r5612 r5725 19 19 */ 20 20 21 #include " ewidgets.h"21 #include "messagebox.h" 22 22 23 23 #include "config.h" … … 45 45 using namespace std; 46 46 47 /* TRANSLATOR LicqQtGui:: LicqMessageBox */47 /* TRANSLATOR LicqQtGui::MessageBox */ 48 48 49 49 /*! \brief Dialog with configurable yes/no buttons … … 97 97 void LicqQtGui::InformUser(QWidget *q, QString sz) 98 98 { 99 LicqMessageManager::Instance()->addMessage(QMessageBox::Information, sz, q);99 MessageManager::Instance()->addMessage(QMessageBox::Information, sz, q); 100 100 } 101 101 102 102 void LicqQtGui::WarnUser(QWidget *q, QString sz) 103 103 { 104 LicqMessageManager::Instance()->addMessage(QMessageBox::Warning, sz, q);104 MessageManager::Instance()->addMessage(QMessageBox::Warning, sz, q); 105 105 } 106 106 107 107 void LicqQtGui::CriticalUser(QWidget *q, QString sz) 108 108 { 109 LicqMessageManager::Instance()->addMessage(QMessageBox::Critical, sz, q);109 MessageManager::Instance()->addMessage(QMessageBox::Critical, sz, q); 110 110 } 111 111 112 112 // ----------------------------------------------------------------------------- 113 113 114 LicqMessageBox::LicqMessageBox(QWidget *parent)114 MessageBox::MessageBox(QWidget *parent) 115 115 : QDialog(parent, Qt::Dialog), m_nUnreadNum(0) 116 116 { … … 174 174 } 175 175 176 void LicqMessageBox::addMessage(QMessageBox::Icon type, const QString &msg)176 void MessageBox::addMessage(QMessageBox::Icon type, const QString &msg) 177 177 { 178 178 bool unread = false; … … 215 215 } 216 216 217 LicqMessageBoxItem* pEntry = new LicqMessageBoxItem();217 MessageBoxItem* pEntry = new MessageBoxItem(); 218 218 // Resize the icon 219 219 img = pix.toImage(); … … 246 246 /// oldest unread message. 247 247 /// //////////////////////////////////////////////////////// 248 void LicqMessageBox::slot_toggleMore()248 void MessageBox::slot_toggleMore() 249 249 { 250 250 showExtension(m_frmList->isHidden()); … … 257 257 /// unread message. The text and icon will both be updated. 258 258 /// //////////////////////////////////////////////////////// 259 void LicqMessageBox::slot_clickNext()259 void MessageBox::slot_clickNext() 260 260 { 261 261 // Find the next unread message 262 262 bool bFound = false; 263 LicqMessageBoxItem *item = 0;263 MessageBoxItem *item = 0; 264 264 for (int i = m_lstMsg->currentRow(); i >= 0; --i) 265 265 { 266 item = dynamic_cast< LicqMessageBoxItem *>(m_lstMsg->item(i));266 item = dynamic_cast<MessageBoxItem *>(m_lstMsg->item(i)); 267 267 if (item->isUnread()) 268 268 { … … 277 277 for (int i = m_lstMsg->count() - 1; i >= 0; --i) 278 278 { 279 item = dynamic_cast< LicqMessageBoxItem *>(m_lstMsg->item(i));279 item = dynamic_cast<MessageBoxItem *>(m_lstMsg->item(i)); 280 280 if (item->isUnread()) 281 281 { … … 297 297 /// remove all messages from the queue. 298 298 /// //////////////////////////////////////////////////////// 299 void LicqMessageBox::slot_clickClear()299 void MessageBox::slot_clickClear() 300 300 { 301 301 // Hide the window first … … 315 315 /// @param item The new QListViewItem that has been selected 316 316 /// //////////////////////////////////////////////////////// 317 void LicqMessageBox::slot_listChanged(QListWidgetItem *i, QListWidgetItem* /* previous */)317 void MessageBox::slot_listChanged(QListWidgetItem *i, QListWidgetItem* /* previous */) 318 318 { 319 319 // Change the icon, message and caption 320 LicqMessageBoxItem *item = dynamic_cast<LicqMessageBoxItem *>(i);320 MessageBoxItem *item = dynamic_cast<MessageBoxItem *>(i); 321 321 if (item != NULL) 322 322 { … … 350 350 /// @brief Change the caption of the message box 351 351 /// 352 /// @param item The LicqMessageBoxItem that will be shown353 /// //////////////////////////////////////////////////////// 354 void LicqMessageBox::updateCaption(LicqMessageBoxItem *item)352 /// @param item The MessageBoxItem that will be shown 353 /// //////////////////////////////////////////////////////// 354 void MessageBox::updateCaption(MessageBoxItem *item) 355 355 { 356 356 if (!item) … … 381 381 } 382 382 383 QPixmap LicqMessageBox::getMessageIcon(QMessageBox::Icon type)383 QPixmap MessageBox::getMessageIcon(QMessageBox::Icon type) 384 384 { 385 385 #ifdef USE_KDE … … 413 413 } 414 414 415 LicqMessageManager *LicqMessageManager::m_pInstance = 0;416 417 LicqMessageManager::LicqMessageManager()415 MessageManager *MessageManager::m_pInstance = 0; 416 417 MessageManager::MessageManager() 418 418 : m_pMsgDlg(0) 419 419 { 420 420 } 421 421 422 LicqMessageManager::~LicqMessageManager()422 MessageManager::~MessageManager() 423 423 { 424 424 if (m_pMsgDlg) … … 426 426 } 427 427 428 LicqMessageManager *LicqMessageManager::Instance()428 MessageManager *MessageManager::Instance() 429 429 { 430 430 if (m_pInstance == 0) 431 m_pInstance = new LicqMessageManager;431 m_pInstance = new MessageManager; 432 432 433 433 return m_pInstance; 434 434 } 435 435 436 void LicqMessageManager::addMessage(QMessageBox::Icon type, const QString &msg,436 void MessageManager::addMessage(QMessageBox::Icon type, const QString &msg, 437 437 QWidget *parent) 438 438 { … … 443 443 parent = 0; // XXX See comment above 444 444 if (m_pMsgDlg == 0) 445 m_pMsgDlg = new LicqMessageBox(parent);445 m_pMsgDlg = new MessageBox(parent); 446 446 447 447 m_pMsgDlg->addMessage(type, msg); … … 449 449 } 450 450 451 LicqMessageBoxItem::LicqMessageBoxItem(QListWidget *parent)451 MessageBoxItem::MessageBoxItem(QListWidget *parent) 452 452 : QListWidgetItem(parent) 453 453 { … … 455 455 } 456 456 457 void LicqMessageBoxItem::setUnread(bool b)457 void MessageBoxItem::setUnread(bool b) 458 458 { 459 459 m_unread = b; branches/qt-gui_qt4/src/messagebox.h
r5383 r5725 18 18 */ 19 19 20 #ifndef EWIDGETS_H21 #define EWIDGETS_H20 #ifndef MESSAGEBOX_H 21 #define MESSAGEBOX_H 22 22 23 23 #include <QListWidget> … … 47 47 /* ----------------------------------------------------------------------------- */ 48 48 49 class LicqMessageBoxItem : public QListWidgetItem49 class MessageBoxItem : public QListWidgetItem 50 50 { 51 51 public: 52 LicqMessageBoxItem(QListWidget* parent = 0);52 MessageBoxItem(QListWidget* parent = 0); 53 53 54 54 void setMessage(const QString &s) { m_msg = s; } … … 69 69 }; 70 70 71 class LicqMessageBox : public QDialog71 class MessageBox : public QDialog 72 72 { 73 73 Q_OBJECT 74 74 public: 75 LicqMessageBox(QWidget *parent = 0);75 MessageBox(QWidget *parent = 0); 76 76 void addMessage(QMessageBox::Icon type, const QString &msg); 77 77 … … 84 84 private: 85 85 QPixmap getMessageIcon(QMessageBox::Icon); 86 void updateCaption( LicqMessageBoxItem *);86 void updateCaption(MessageBoxItem *); 87 87 88 88 int m_nUnreadNum; … … 96 96 }; 97 97 98 class LicqMessageManager98 class MessageManager 99 99 { 100 100 public: 101 ~ LicqMessageManager();101 ~MessageManager(); 102 102 103 static LicqMessageManager *Instance();103 static MessageManager *Instance(); 104 104 105 105 void addMessage(QMessageBox::Icon type, const QString &msg, QWidget *p); 106 106 107 107 private: 108 LicqMessageManager();109 LicqMessageManager(const LicqMessageManager &);110 LicqMessageManager &operator=(const LicqMessageManager &);108 MessageManager(); 109 MessageManager(const MessageManager &); 110 MessageManager &operator=(const MessageManager &); 111 111 112 static LicqMessageManager *m_pInstance;113 LicqMessageBox *m_pMsgDlg;112 static MessageManager *m_pInstance; 113 MessageBox *m_pMsgDlg; 114 114 }; 115 115 branches/qt-gui_qt4/src/userevents/usereventcommon.cpp
r5685 r5725 57 57 #include "widgets/infofield.h" 58 58 59 #include " ewidgets.h"59 #include "messagebox.h" 60 60 #include "mainwin.h" 61 61 #include "signalmanager.h" branches/qt-gui_qt4/src/userevents/usersendchatevent.cpp
r5649 r5725 38 38 39 39 #include "mainwin.h" 40 #include " ewidgets.h"40 #include "messagebox.h" 41 41 42 42 #include "usereventtabdlg.h" branches/qt-gui_qt4/src/userevents/usersendcommon.cpp
r5723 r5725 60 60 #include "widgets/mledit.h" 61 61 62 #include " ewidgets.h"62 #include "messagebox.h" 63 63 #include "historyview.h" 64 64 #include "mainwin.h" branches/qt-gui_qt4/src/userevents/usersendfileevent.cpp
r5649 r5725 42 42 43 43 #include "mainwin.h" 44 #include " ewidgets.h"44 #include "messagebox.h" 45 45 46 46 #include "usereventtabdlg.h" branches/qt-gui_qt4/src/userevents/usersendmsgevent.cpp
r5649 r5725 36 36 37 37 #include "mainwin.h" 38 #include " ewidgets.h"38 #include "messagebox.h" 39 39 40 40 #include "usereventcommon.h" branches/qt-gui_qt4/src/userevents/usersendsmsevent.cpp
r5649 r5725 35 35 36 36 #include "mainwin.h" 37 #include " ewidgets.h"37 #include "messagebox.h" 38 38 39 39 #include "usereventtabdlg.h" branches/qt-gui_qt4/src/userevents/usersendurlevent.cpp
r5649 r5725 39 39 40 40 #include "mainwin.h" 41 #include " ewidgets.h"41 #include "messagebox.h" 42 42 43 43 #include "usereventtabdlg.h" branches/qt-gui_qt4/src/userevents/userviewevent.cpp
r5724 r5725 52 52 #include "widgets/skinnablebutton.h" 53 53 54 #include " ewidgets.h"54 #include "messagebox.h" 55 55 #include "gui-defines.h" 56 56 #include "mainwin.h" branches/qt-gui_qt4/src/views/mmuserview.cpp
r5612 r5725 44 44 45 45 #include "gui-defines.h" 46 #include " ewidgets.h"46 #include "messagebox.h" 47 47 48 48 using namespace LicqQtGui;
