Changeset 6185
- Timestamp:
- 2008-05-06 04:50:29 (2 months ago)
- Files:
-
- trunk/qt4-gui/src/core/licqgui.cpp (modified) (2 diffs)
- trunk/qt4-gui/src/core/licqgui.h (modified) (2 diffs)
- trunk/qt4-gui/src/core/mainwin.h (modified) (2 diffs)
- trunk/qt4-gui/src/userevents/usersendcommon.cpp (modified) (2 diffs)
- trunk/qt4-gui/src/userevents/usersendcommon.h (modified) (1 diff)
- trunk/qt4-gui/src/userevents/userviewevent.cpp (modified) (5 diffs)
- trunk/qt4-gui/src/userevents/userviewevent.h (modified) (1 diff)
- trunk/qt4-gui/src/widgets/historyview.cpp (modified) (1 diff)
- trunk/qt4-gui/src/widgets/historyview.h (modified) (1 diff)
- trunk/qt4-gui/src/widgets/messagelist.cpp (modified) (1 diff)
- trunk/qt4-gui/src/widgets/messagelist.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/qt4-gui/src/core/licqgui.cpp
r6160 r6185 994 994 } 995 995 996 // Since daemon doesn't notify us when an event is sent we need to take care of it ourselfs 997 // Get signals from event dialog and forward it to anyone who needs it 998 connect(e, SIGNAL(eventSent(const ICQEvent*)), SIGNAL(eventSent(const ICQEvent*))); 999 996 1000 // there might be more than one send window open 997 1001 // make sure we only remember one, or it will get complicated … … 1007 1011 disconnect(oldDialog, SIGNAL(finished(QString, unsigned long)), this, SLOT(sendEventFinished(QString, unsigned long))); 1008 1012 sendEventFinished(id, ppid); 1013 connect(newDialog, SIGNAL(eventSent(const ICQEvent*)), SIGNAL(eventSent(const ICQEvent*))); 1009 1014 connect(newDialog, SIGNAL(finished(QString, unsigned long)), SLOT(sendEventFinished(QString, unsigned long))); 1010 1015 myUserSendList.append(newDialog); trunk/qt4-gui/src/core/licqgui.h
r6160 r6185 37 37 class CICQDaemon; 38 38 class CICQSignal; 39 class ICQEvent; 39 40 40 41 namespace LicqQtGui … … 230 231 void sendChatRequest(QString id, unsigned long ppid); 231 232 233 signals: 234 /** 235 * Since daemon doesn't notify us when an event is sent we'll have to handle 236 * it ourselfs. This is used by event dialog to notify other dialogs when a 237 * message has been sent. 238 * 239 * @param event Event object that was sent 240 */ 241 void eventSent(const ICQEvent* event); 242 232 243 private slots: 233 244 #ifdef Q_WS_X11 trunk/qt4-gui/src/core/mainwin.h
r6152 r6185 97 97 virtual void closeEvent(QCloseEvent*); 98 98 99 signals:100 void signal_sentevent(ICQEvent* e);101 102 99 public slots: 103 100 void slot_shutdown(); … … 159 156 void callUserFunction(QAction* action); 160 157 void checkUserAutoResponse(); 161 162 friend class UserSendCommon;163 158 }; 164 159 trunk/qt4-gui/src/userevents/usersendcommon.cpp
r6182 r6185 404 404 gUserManager.DropUser(u); 405 405 406 connect( gMainWindow, SIGNAL(signal_sentevent(ICQEvent*)),407 myHistoryView, SLOT(addMsg( ICQEvent*)));406 connect(LicqGui::instance(), SIGNAL(eventSent(const ICQEvent*)), 407 myHistoryView, SLOT(addMsg(const ICQEvent*))); 408 408 //myViewSplitter->setResizeMode(myHistoryView, QSplitter::FollowSizeHint); 409 409 } … … 1200 1200 if (sendDone(e)) 1201 1201 { 1202 emit gMainWindow->signal_sentevent(e);1202 emit eventSent(e); 1203 1203 if (Config::Chat::instance()->msgChatView() && myHistoryView != NULL) 1204 1204 { trunk/qt4-gui/src/userevents/usersendcommon.h
r6108 r6185 61 61 void updateUser(CICQSignal* sig); 62 62 void msgTypeChanged(UserSendCommon* from, UserSendCommon* to); 63 64 /** 65 * Since daemon doesn't notify us when an event is sent we'll have to handle 66 * it ourselfs. This signal is sent to notify other windows about the event 67 * that was sent. 68 * 69 * @param event Event object that was sent 70 */ 71 void eventSent(const ICQEvent* event); 63 72 64 73 public slots: trunk/qt4-gui/src/userevents/userviewevent.cpp
r6166 r6185 23 23 #include "config.h" 24 24 25 #include <QAction> 25 26 #include <QApplication> 26 27 #include <QCheckBox> … … 48 49 #include "core/gui-defines.h" 49 50 #include "core/licqgui.h" 50 #include "core/mainwin.h"51 51 #include "core/messagebox.h" 52 52 #include "core/signalmanager.h" … … 90 90 connect(myMessageList, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), 91 91 SLOT(printMessage(QTreeWidgetItem*))); 92 connect( gMainWindow, SIGNAL(signal_sentevent(ICQEvent*)),93 SLOT(sentEvent( ICQEvent*)));92 connect(LicqGui::instance(), SIGNAL(eventSent(const ICQEvent*)), 93 SLOT(sentEvent(const ICQEvent*))); 94 94 95 95 myActionsBox = new QGroupBox(); … … 779 779 } 780 780 781 void UserViewEvent::sentEvent( ICQEvent* e)781 void UserViewEvent::sentEvent(const ICQEvent* e) 782 782 { 783 783 if (e->PPID() != myPpid || strcmp(myUsers.front().c_str(), e->Id()) != 0) … … 785 785 786 786 if (!Config::Chat::instance()->msgChatView()) 787 new MessageListItem(e-> GrabUserEvent(), myCodec, myMessageList);787 new MessageListItem(e->UserEvent(), myCodec, myMessageList); 788 788 } 789 789 trunk/qt4-gui/src/userevents/userviewevent.h
r6166 r6185 82 82 void msgTypeChanged(UserSendCommon* from, UserSendCommon* to); 83 83 void printMessage(QTreeWidgetItem* item); 84 void sentEvent( ICQEvent* e);84 void sentEvent(const ICQEvent* e); 85 85 void setEncoding(); 86 86 }; trunk/qt4-gui/src/widgets/historyview.cpp
r6180 r6185 239 239 } 240 240 241 void HistoryView::addMsg( ICQEvent* event)241 void HistoryView::addMsg(const ICQEvent* event) 242 242 { 243 243 if (event->Id() == myId && event->PPID() == myPpid && event->UserEvent() != NULL) trunk/qt4-gui/src/widgets/historyview.h
r6180 r6185 62 62 public slots: 63 63 void addMsg(const CUserEvent* event, QString id = QString(), unsigned long ppid = 0); 64 void addMsg( ICQEvent* event);64 void addMsg(const ICQEvent* event); 65 65 void setColors(); 66 66 trunk/qt4-gui/src/widgets/messagelist.cpp
r5837 r6185 39 39 /* TRANSLATOR LicqQtGui::MessageListItem */ 40 40 41 MessageListItem::MessageListItem( CUserEvent* theMsg, QTextCodec* codec, QTreeWidget* parent)41 MessageListItem::MessageListItem(const CUserEvent* theMsg, QTextCodec* codec, QTreeWidget* parent) 42 42 : QTreeWidgetItem(parent) 43 43 { 44 if (theMsg->Direction() == D_SENDER) 45 myMsg = theMsg; 46 else 47 myMsg = theMsg->Copy(); 44 // Keep a copy of the event 45 myMsg = theMsg->Copy(); 48 46 49 47 myCodec = codec; trunk/qt4-gui/src/widgets/messagelist.h
r5837 r6185 32 32 { 33 33 public: 34 MessageListItem( CUserEvent* theMsg, QTextCodec* codec, QTreeWidget* parent);34 MessageListItem(const CUserEvent* theMsg, QTextCodec* codec, QTreeWidget* parent); 35 35 ~MessageListItem(void); 36 36 void MarkRead();
