[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3772: Add support for viewing the map as a full screen widget when (in vidalia/trunk: . src/vidalia/network src/vidalia/res src/vidalia/res/32x32)
Author: edmanm
Date: 2009-05-14 22:57:47 -0400 (Thu, 14 May 2009)
New Revision: 3772
Added:
vidalia/trunk/src/vidalia/res/32x32/view-fullscreen.png
Modified:
vidalia/trunk/CHANGELOG
vidalia/trunk/src/vidalia/network/NetViewer.cpp
vidalia/trunk/src/vidalia/network/NetViewer.h
vidalia/trunk/src/vidalia/network/NetViewer.ui
vidalia/trunk/src/vidalia/res/vidalia.qrc
Log:
Add support for viewing the map as a full screen widget when built
with KDE Marble support. Suggested by Jake.
Modified: vidalia/trunk/CHANGELOG
===================================================================
--- vidalia/trunk/CHANGELOG 2009-05-14 02:47:39 UTC (rev 3771)
+++ vidalia/trunk/CHANGELOG 2009-05-15 02:57:47 UTC (rev 3772)
@@ -4,6 +4,8 @@
in the Network settings page.
o Tolerate bridge addresses that do not specify a port number, since Tor
now defaults to using port 443 in such cases.
+ o Add support for viewing the map as a full screen widget when built
+ with KDE Marble support.
o Renamed the 'make win32-installer' CMake target to 'make dist-win32'
for consistency with our 'make dist-osx' target.
o Fix a couple bugs in the WiX-based Windows installer related to building
Modified: vidalia/trunk/src/vidalia/network/NetViewer.cpp
===================================================================
--- vidalia/trunk/src/vidalia/network/NetViewer.cpp 2009-05-14 02:47:39 UTC (rev 3771)
+++ vidalia/trunk/src/vidalia/network/NetViewer.cpp 2009-05-15 02:57:47 UTC (rev 3772)
@@ -44,6 +44,7 @@
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);
+
#if defined(Q_WS_MAC)
ui.actionHelp->setShortcut(QString("Ctrl+?"));
#endif
@@ -72,8 +73,12 @@
_map = new TorMapWidget();
connect(_map, SIGNAL(displayRouterInfo(QString)),
this, SLOT(displayRouterInfo(QString)));
+ connect(ui.actionZoomFullScreen, SIGNAL(triggered()),
+ this, SLOT(toggleFullScreen()));
+ Vidalia::createShortcut("ESC", _map, this, SLOT(toggleFullScreen()));
#else
_map = new TorMapImageView();
+ ui.actionZoomFullScreen->setVisible(false);
#endif
ui.gridLayout->addWidget(_map);
@@ -554,3 +559,21 @@
#endif
}
+/** Called when the user clicks "Full Screen" or presses Escape on the map.
+ * Toggles the map between normal and a full screen viewing modes. */
+void
+NetViewer::toggleFullScreen()
+{
+ if (_map->isFullScreen()) {
+ /* Disabling full screen mode. Put the map back in its container. */
+ ui.gridLayout->addWidget(_map);
+ _map->setWindowState(_map->windowState() & ~Qt::WindowFullScreen);
+ } else {
+ /* Enabling full screen mode. Remove the map from the QGridLayout
+ * container and set its window state to full screen. */
+ _map->setParent(0);
+ _map->setWindowState(_map->windowState() | Qt::WindowFullScreen);
+ _map->show();
+ }
+}
+
Modified: vidalia/trunk/src/vidalia/network/NetViewer.h
===================================================================
--- vidalia/trunk/src/vidalia/network/NetViewer.h 2009-05-14 02:47:39 UTC (rev 3771)
+++ vidalia/trunk/src/vidalia/network/NetViewer.h 2009-05-15 02:57:47 UTC (rev 3772)
@@ -89,6 +89,9 @@
void zoomIn();
/** Called when the user clicks the "Zoom Out" button. */
void zoomOut();
+ /** Called when the user clicks "Full Screen" or presses Escape on the map.
+ * Toggles the map between normal and a full screen viewing modes. */
+ void toggleFullScreen();
private:
/** Adds an IP address to the resolve queue and updates the queue timers. */
Modified: vidalia/trunk/src/vidalia/network/NetViewer.ui
===================================================================
--- vidalia/trunk/src/vidalia/network/NetViewer.ui 2009-05-14 02:47:39 UTC (rev 3771)
+++ vidalia/trunk/src/vidalia/network/NetViewer.ui 2009-05-15 02:57:47 UTC (rev 3772)
@@ -224,6 +224,7 @@
<addaction name="actionZoomIn" />
<addaction name="actionZoomOut" />
<addaction name="actionZoomToFit" />
+ <addaction name="actionZoomFullScreen" />
<addaction name="separator" />
<addaction name="actionHelp" />
<addaction name="actionClose" />
@@ -333,6 +334,23 @@
<string>Ctrl+Z</string>
</property>
</action>
+ <action name="actionZoomFullScreen" >
+ <property name="icon" >
+ <iconset resource="../res/vidalia.qrc" >:/images/32x32/view-fullscreen.png</iconset>
+ </property>
+ <property name="text" >
+ <string>Full Screen</string>
+ </property>
+ <property name="toolTip" >
+ <string>View the network map as a full screen window</string>
+ </property>
+ <property name="statusTip" >
+ <string>View the network map as a full screen window</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+F</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
Added: vidalia/trunk/src/vidalia/res/32x32/view-fullscreen.png
===================================================================
(Binary files differ)
Property changes on: vidalia/trunk/src/vidalia/res/32x32/view-fullscreen.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: vidalia/trunk/src/vidalia/res/vidalia.qrc
===================================================================
--- vidalia/trunk/src/vidalia/res/vidalia.qrc 2009-05-14 02:47:39 UTC (rev 3771)
+++ vidalia/trunk/src/vidalia/res/vidalia.qrc 2009-05-15 02:57:47 UTC (rev 3772)
@@ -79,6 +79,7 @@
<file>32x32/tor-stopping.png</file>
<file>32x32/utilities-log-viewer.png</file>
<file>32x32/utilities-system-monitor.png</file>
+ <file>32x32/view-fullscreen.png</file>
<file>32x32/view-refresh.png</file>
<file>32x32/window-close.png</file>
<file>32x32/zoom-fit-best.png</file>