Changeset 3490 for branches/protocol_plugin_1_3_0
- Timestamp:
- 05/03/03 10:51:05 (6 years ago)
- Location:
- branches/protocol_plugin_1_3_0/qt-gui/src
- Files:
-
- 2 modified
-
mainwin.cpp (modified) (4 diffs)
-
usereventdlg.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/protocol_plugin_1_3_0/qt-gui/src/mainwin.cpp
r3483 r3490 2219 2219 (*it)->PPID() == nPPID) 2220 2220 { 2221 e = *it; 2222 e->show(); 2223 if(!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon")) 2224 { 2225 e->raise(); 2221 e = static_cast<UserSendCommon*>(*it); 2222 #if QT_VERSION >= 300 2223 if (userEventTabDlg && userEventTabDlg->tabExists(e)) 2224 { 2225 userEventTabDlg->show(); 2226 userEventTabDlg->selectTab(e); 2227 userEventTabDlg->raise(); 2226 2228 #ifdef USE_KDE 2227 KWin::setActiveWindow(e->winId()); 2228 #endif 2229 } 2229 KWin::setActiveWindow(userEventTabDlg->winId()); 2230 #endif 2231 } 2232 #endif 2233 else 2234 { 2235 e->show(); 2236 if (!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon")) 2237 { 2238 e->raise(); 2239 #ifdef USE_KDE 2240 KWin::setActiveWindow(e->winId()); 2241 #endif 2242 } 2243 } 2230 2244 return e; 2231 2245 } … … 2235 2249 } 2236 2250 2251 QWidget *parent = NULL; 2252 #if QT_VERSION >= 300 2253 if (m_bTabbedChatting) 2254 { 2255 if (userEventTabDlg != NULL) 2256 userEventTabDlg->raise(); 2257 else 2258 { 2259 // create the tab dialog if it does not exist 2260 userEventTabDlg = new UserEventTabDlg(); 2261 connect(userEventTabDlg, SIGNAL(signal_done()), this, SLOT(slot_doneUserEventTabDlg())); 2262 } 2263 parent = userEventTabDlg; 2264 } 2265 #endif 2266 2237 2267 switch (fcn) 2238 2268 { … … 2244 2274 case mnuUserSendMsg: 2245 2275 { 2246 e = new UserSendMsgEvent(licqDaemon, licqSigMan, this, szId, nPPID );2276 e = new UserSendMsgEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2247 2277 break; 2248 2278 } 2249 2279 case mnuUserSendUrl: 2250 2280 { 2251 e = new UserSendUrlEvent(licqDaemon, licqSigMan, this, szId, nPPID );2281 e = new UserSendUrlEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2252 2282 break; 2253 2283 } 2254 2284 case mnuUserSendChat: 2255 2285 { 2256 e = new UserSendChatEvent(licqDaemon, licqSigMan, this, szId, nPPID );2286 e = new UserSendChatEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2257 2287 break; 2258 2288 } 2259 2289 case mnuUserSendFile: 2260 2290 { 2261 e = new UserSendFileEvent(licqDaemon, licqSigMan, this, szId, nPPID );2291 e = new UserSendFileEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2262 2292 break; 2263 2293 } 2264 2294 case mnuUserSendContact: 2265 2295 { 2266 e = new UserSendContactEvent(licqDaemon, licqSigMan, this, szId, nPPID );2296 e = new UserSendContactEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2267 2297 break; 2268 2298 } 2269 2299 case mnuUserSendSms: 2270 2300 { 2271 e = new UserSendSmsEvent(licqDaemon, licqSigMan, this, szId, nPPID );2301 e = new UserSendSmsEvent(licqDaemon, licqSigMan, this, szId, nPPID, parent); 2272 2302 break; 2273 2303 } … … 2275 2305 gLog.Warn("%sunknown callFunction() fcn: %d\n", L_WARNxSTR, fcn); 2276 2306 } 2277 if(e) { 2278 connect(e, SIGNAL(viewurl(QWidget*, QString)), this, SLOT(slot_viewurl(QWidget *, QString))); 2307 if (e == NULL) return NULL; 2308 2309 connect(e, SIGNAL(viewurl(QWidget*, QString)), this, SLOT(slot_viewurl(QWidget *, QString))); 2310 #if QT_VERSION >= 300 2311 if (m_bTabbedChatting && fcn != mnuUserView) 2312 { 2313 userEventTabDlg->addTab(e); 2314 userEventTabDlg->show(); 2315 } 2316 else 2317 #endif 2279 2318 e->show(); 2280 // there might be more than one send window open 2281 // make sure we only remember one, or it will get compliated 2282 if (fcn == mnuUserView) 2283 { 2284 slot_userfinished(szId, nPPID); 2285 connect(e, SIGNAL(finished(const char *, unsigned long)), 2286 SLOT(slot_userfinished(const char *, unsigned long))); 2287 licqUserView.append(static_cast<UserViewEvent*>(e)); 2288 } 2289 else 2290 { 2291 slot_sendfinished(szId, nPPID); 2292 connect(e, SIGNAL(finished(const char *, unsigned long)), 2293 SLOT(slot_sendfinished(const char *, unsigned long))); 2294 licqUserSend.append(static_cast<UserSendCommon*>(e)); 2295 } 2296 } 2297 2319 2320 // there might be more than one send window open 2321 // make sure we only remember one, or it will get complicated 2322 if (fcn == mnuUserView) 2323 { 2324 slot_userfinished(szId, nPPID); 2325 connect(e, SIGNAL(finished(const char *, unsigned long)), 2326 SLOT(slot_userfinished(const char *, unsigned long))); 2327 licqUserView.append(static_cast<UserViewEvent*>(e)); 2328 } 2329 else 2330 { 2331 slot_sendfinished(szId, nPPID); 2332 connect(e, SIGNAL(finished(const char *, unsigned long)), 2333 SLOT(slot_sendfinished(const char *, unsigned long))); 2334 licqUserSend.append(static_cast<UserSendCommon*>(e)); 2335 } 2298 2336 return e; 2299 2337 } -
branches/protocol_plugin_1_3_0/qt-gui/src/usereventdlg.cpp
r3489 r3490 88 88 m_bOwner = (gUserManager.FindOwner(m_szId, m_nPPID) != NULL); 89 89 m_bDeleteUser = false; 90 90 91 91 top_hlay = new QHBoxLayout(this, 6); 92 92 top_lay = new QVBoxLayout(top_hlay); … … 200 200 { 201 201 QString label; 202 ICQUser *u = gUserManager.FetchUser(tab-> Uin(), LOCK_W);202 ICQUser *u = gUserManager.FetchUser(tab->Id(), tab->PPID(), LOCK_W); 203 203 if (u == NULL) return; 204 204 … … 1369 1369 QAccel *a = new QAccel( this ); 1370 1370 a->connectItem(a->insertItem(Key_Escape), this, SLOT(cancelSend())); 1371 #if QT_VERSION >= 300 1372 if (mainwin->userEventTabDlg && 1373 parent == mainwin->userEventTabDlg) 1374 { 1375 a->connectItem(a->insertItem(ALT + Key_Left), 1376 mainwin->userEventTabDlg, SLOT(moveLeft())); 1377 a->connectItem(a->insertItem(ALT + Key_Right), 1378 mainwin->userEventTabDlg, SLOT(moveRight())); 1379 } 1380 #endif 1371 1381 1372 1382 QGroupBox *box = new QGroupBox(this); … … 1673 1683 { 1674 1684 case 0: 1675 e = new UserSendMsgEvent(server, sigman, mainwin, m_szId, m_nPPID );1685 e = new UserSendMsgEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1676 1686 break; 1677 1687 case 1: 1678 e = new UserSendUrlEvent(server, sigman, mainwin, m_szId, m_nPPID );1688 e = new UserSendUrlEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1679 1689 break; 1680 1690 case 2: 1681 e = new UserSendChatEvent(server, sigman, mainwin, m_szId, m_nPPID );1691 e = new UserSendChatEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1682 1692 break; 1683 1693 case 3: 1684 e = new UserSendFileEvent(server, sigman, mainwin, m_szId, m_nPPID );1694 e = new UserSendFileEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1685 1695 break; 1686 1696 case 4: 1687 e = new UserSendContactEvent(server, sigman, mainwin, m_szId, m_nPPID );1697 e = new UserSendContactEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1688 1698 break; 1689 1699 case 5: 1690 e = new UserSendSmsEvent(server, sigman, mainwin, m_szId, m_nPPID );1700 e = new UserSendSmsEvent(server, sigman, mainwin, m_szId, m_nPPID, parent); 1691 1701 break; 1692 1702 } … … 2230 2240 2231 2241 m_sBaseTitle += tr(" - Message"); 2242 #if QT_VERSION >= 300 2243 if (mainwin->userEventTabDlg && 2244 mainwin->userEventTabDlg->tabIsSelected(this)) 2245 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2246 #endif 2232 2247 setCaption(m_sBaseTitle); 2233 2248 cmbSendType->setCurrentItem(0); … … 2396 2411 2397 2412 m_sBaseTitle += tr(" - URL"); 2413 #if QT_VERSION >= 300 2414 if (mainwin->userEventTabDlg && 2415 mainwin->userEventTabDlg->tabIsSelected(this)) 2416 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2417 #endif 2398 2418 setCaption(m_sBaseTitle); 2399 2419 cmbSendType->setCurrentItem(1); … … 2524 2544 2525 2545 m_sBaseTitle += tr(" - File Transfer"); 2546 #if QT_VERSION >= 300 2547 if (mainwin->userEventTabDlg && 2548 mainwin->userEventTabDlg->tabIsSelected(this)) 2549 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2550 #endif 2526 2551 setCaption(m_sBaseTitle); 2527 2552 cmbSendType->setCurrentItem(3); … … 2727 2752 2728 2753 m_sBaseTitle += tr(" - Chat Request"); 2754 #if QT_VERSION >= 300 2755 if (mainwin->userEventTabDlg && 2756 mainwin->userEventTabDlg->tabIsSelected(this)) 2757 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2758 #endif 2729 2759 setCaption(m_sBaseTitle); 2730 2760 cmbSendType->setCurrentItem(2); … … 2877 2907 2878 2908 m_sBaseTitle += tr(" - Contact List"); 2909 #if QT_VERSION >= 300 2910 if (mainwin->userEventTabDlg && 2911 mainwin->userEventTabDlg->tabIsSelected(this)) 2912 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2913 #endif 2879 2914 setCaption(m_sBaseTitle); 2880 2915 cmbSendType->setCurrentItem(4); … … 3029 3064 3030 3065 m_sBaseTitle += tr(" - SMS"); 3066 #if QT_VERSION >= 300 3067 if (mainwin->userEventTabDlg && 3068 mainwin->userEventTabDlg->tabIsSelected(this)) 3069 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 3070 #endif 3031 3071 setCaption(m_sBaseTitle); 3032 3072 cmbSendType->setCurrentItem(5);
