[Dooble-Development] SF.net SVN: dooble:[68] trunk/browser
Brought to you by:
textfield
From: <tex...@us...> - 2008-11-25 10:07:19
|
Revision: 68 http://dooble.svn.sourceforge.net/dooble/?rev=68&view=rev Author: textfield Date: 2008-11-25 10:07:14 +0000 (Tue, 25 Nov 2008) Log Message: ----------- Signals and slots are more elegant. Modified Paths: -------------- trunk/browser/Include/dtabwidget.h trunk/browser/Source/dooble.cc trunk/browser/Source/dtabwidget.cc Modified: trunk/browser/Include/dtabwidget.h =================================================================== --- trunk/browser/Include/dtabwidget.h 2008-11-25 01:18:31 UTC (rev 67) +++ trunk/browser/Include/dtabwidget.h 2008-11-25 10:07:14 UTC (rev 68) @@ -79,6 +79,10 @@ private slots: void slotCloseTab(void); void slotCreateTab(void); + + signals: + void closeTabSignal(void); + void createTabSignal(void); }; #endif Modified: trunk/browser/Source/dooble.cc =================================================================== --- trunk/browser/Source/dooble.cc 2008-11-25 01:18:31 UTC (rev 67) +++ trunk/browser/Source/dooble.cc 2008-11-25 10:07:14 UTC (rev 68) @@ -103,12 +103,16 @@ SLOT(slotCurrentChanged(int))); connect(ui.actionNew_Tab, SIGNAL(triggered(void)), this, SLOT(slotNewTab(void))); + connect(ui.tabWidget, SIGNAL(createTabSignal(void)), this, + SLOT(slotNewTab(void))); connect(ui.actionNew_Window, SIGNAL(triggered(void)), this, SLOT(slotNewWindow(void))); connect(ui.actionOpen_URL, SIGNAL(triggered(void)), this, SLOT(slotOpenURL(void))); connect(ui.actionClose_Tab, SIGNAL(triggered(void)), this, SLOT(slotCloseTab(void))); + connect(ui.tabWidget, SIGNAL(closeTabSignal(void)), this, + SLOT(slotCloseTab(void))); connect(ui.actionClose_Window, SIGNAL(triggered(void)), this, SLOT(slotClose(void))); connect(ui.action_Quit, SIGNAL(triggered(void)), this, Modified: trunk/browser/Source/dtabwidget.cc =================================================================== --- trunk/browser/Source/dtabwidget.cc 2008-11-25 01:18:31 UTC (rev 67) +++ trunk/browser/Source/dtabwidget.cc 2008-11-25 10:07:14 UTC (rev 68) @@ -99,12 +99,10 @@ void dtabwidget::slotCloseTab(void) { - static_cast<dooble *> (parentWidget()->parentWidget()->parentWidget())-> - closeTab(selectedTabIndex); + emit closeTabSignal(); } void dtabwidget::slotCreateTab(void) { - static_cast<dooble *> (parentWidget()->parentWidget()->parentWidget())-> - openLinkInNewTab(); + emit createTabSignal(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |