[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3944: Fixed tiny issue in NetViewer. Added placeholder HomePanel t (in vidalia/branches/extension-api/src/vidalia: HomePlugin NetworkMapPlugin)



Author: tyree731
Date: 2009-07-07 02:50:50 -0400 (Tue, 07 Jul 2009)
New Revision: 3944

Added:
   vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp
   vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h
   vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui
Modified:
   vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt
   vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp
   vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h
   vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.cpp
   vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.h
Log:
Fixed tiny issue in NetViewer. Added placeholder HomePanel to play with UI ideas. What to do with VClickLabel?


Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt	2009-07-07 05:28:09 UTC (rev 3943)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt	2009-07-07 06:50:50 UTC (rev 3944)
@@ -10,13 +10,22 @@
 ##  the terms described in the LICENSE file.
 ##
 
+include_directories(
+  ${CMAKE_CURRENT_BINARY_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}
+)
 
 set(homeplugin_SRCS 
   HomePlugin.cpp
+  HomePanel.cpp
 )
 qt4_wrap_cpp(homeplugin_SRCS
   HomePlugin.h
+  HomePanel.h
 )
+qt4_wrap_ui(homeplugin_SRCS
+  HomePanel.ui
+)
 
 add_library(homeplugin STATIC  ${homeplugin_SRCS})
 target_link_libraries(homeplugin ${QT_LIBRARIES})

Added: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp	                        (rev 0)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp	2009-07-07 06:50:50 UTC (rev 3944)
@@ -0,0 +1,39 @@
+/*
+**  This file is part of Vidalia, and is subject to the license terms in the
+**  LICENSE file, found in the top level directory of this distribution. If you
+**  did not receive the LICENSE file with this file, you may obtain it from the
+**  Vidalia source package distributed by the Vidalia Project at
+**  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+**  may be copied, modified, propagated, or distributed except according to the
+**  terms described in the LICENSE file.
+*/
+
+/*
+** \file HomePanel.cpp
+** \version $Id$
+** \brief The user's home panel, containing important status' and buttons
+*/
+
+#include "HomePanel.h"
+
+HomePanel::HomePanel(VidaliaPluginInterface* parent)
+: VidaliaPanel(parent)
+{
+  ui.setupUi(this);
+}
+
+HomePanel::~HomePanel()
+{
+}
+
+QString 
+HomePanel::tabLabel() const
+{
+  return QString("Home");
+}
+
+QIcon
+HomePanel::tabIcon() const
+{
+  return QIcon(":/images/16x16/view-media-artist.png");
+}


Property changes on: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp
___________________________________________________________________
Added: svn:keywords
   + Id
Added: eol-style
   + native

Added: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h	                        (rev 0)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h	2009-07-07 06:50:50 UTC (rev 3944)
@@ -0,0 +1,43 @@
+/*
+**  This file is part of Vidalia, and is subject to the license terms in the
+**  LICENSE file, found in the top level directory of this distribution. If you
+**  did not receive the LICENSE file with this file, you may obtain it from the
+**  Vidalia source package distributed by the Vidalia Project at
+**  http://www.vidalia-project.net/. No part of Vidalia, including this file,
+**  may be copied, modified, propagated, or distributed except according to the
+**  terms described in the LICENSE file.
+*/
+
+/*
+** \file HomePanel.h
+** \version $Id$
+** \brief The user's home panel, containing important status' and buttons
+*/
+
+#ifndef _HOMEPANEL_H
+#define _HOMEPANEL_H
+
+#include <vidalia/VidaliaPanel.h>
+
+#include <QIcon>
+#include <QString>
+
+#include "ui_HomePanel.h"
+
+class HomePlugin;
+
+class HomePanel : public VidaliaPanel
+{
+  Q_OBJECT
+
+public:
+  HomePanel(VidaliaPluginInterface* parent);
+  ~HomePanel();
+
+  QString tabLabel() const;
+  QIcon tabIcon() const;
+private:
+  Ui::HomePanel ui;
+};
+
+#endif


Property changes on: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h
___________________________________________________________________
Added: svn:keywords
   + Id
Added: eol-style
   + native

Added: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui	                        (rev 0)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui	2009-07-07 06:50:50 UTC (rev 3944)
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HomePanel</class>
+ <widget class="QMainWindow" name="HomePanel">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>805</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout_3">
+    <item row="0" column="0">
+     <widget class="QLabel" name="lblStartTorImg">
+      <property name="text">
+       <string/>
+      </property>
+      <property name="pixmap">
+       <pixmap resource="../res/vidalia.qrc">:/images/48x48/media-playback-start.png</pixmap>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="1">
+     <widget class="QLabel" name="lblStartTor">
+      <property name="text">
+       <string>Start Tor</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="2">
+     <spacer name="horizontalSpacer_5">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>78</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="0" column="3">
+     <widget class="QLabel" name="lblStartProxyImg">
+      <property name="text">
+       <string/>
+      </property>
+      <property name="pixmap">
+       <pixmap resource="../res/vidalia.qrc">:/images/48x48/media-playback-start.png</pixmap>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="4">
+     <widget class="QLabel" name="lblStartProxy">
+      <property name="text">
+       <string>Start Proxy</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="5">
+     <spacer name="horizontalSpacer_7">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>78</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="0" column="6">
+     <widget class="QLabel" name="lblNewNymImg">
+      <property name="text">
+       <string/>
+      </property>
+      <property name="pixmap">
+       <pixmap resource="../res/vidalia.qrc">:/images/48x48/view-media-artist.png</pixmap>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="7">
+     <widget class="QLabel" name="lblNewNym">
+      <property name="text">
+       <string>New Identity</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="8">
+     <spacer name="horizontalSpacer_6">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>74</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="0" column="9">
+     <widget class="QLabel" name="lblSettingsImg">
+      <property name="text">
+       <string/>
+      </property>
+      <property name="pixmap">
+       <pixmap resource="../res/vidalia.qrc">:/images/48x48/system-software-update.png</pixmap>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="10">
+     <widget class="QLabel" name="lblSettings">
+      <property name="text">
+       <string>Settings</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0" colspan="11">
+     <widget class="QGroupBox" name="groupTorStatus">
+      <property name="title">
+       <string>Tor Status</string>
+      </property>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QLabel" name="lblTorStatusImg">
+         <property name="text">
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="../res/vidalia.qrc">:/images/48x48/tor-stopping.png</pixmap>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <widget class="QLabel" name="lblTorStatus">
+         <property name="text">
+          <string>Tor does not appear to be running.</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="2" colspan="3">
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>465</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="lblRelayRunningImg">
+         <property name="text">
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="../res/vidalia.qrc">:/images/48x48/tor-stopping.png</pixmap>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1" colspan="2">
+        <widget class="QLabel" name="lblRelayRunning">
+         <property name="text">
+          <string>You are not currently running Tor as a relay.</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="3" colspan="2">
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>407</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="2" column="0">
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="../res/vidalia.qrc">:/images/48x48/tor-stopping.png</pixmap>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1" colspan="3">
+        <widget class="QLabel" name="lblRelayStatus">
+         <property name="text">
+          <string>Your relay does not appear to be functioning.</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="4">
+        <spacer name="horizontalSpacer_3">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>399</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="3" column="0" colspan="5">
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>748</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item row="2" column="0" colspan="11">
+     <widget class="QGroupBox" name="groupProxyStatus">
+      <property name="title">
+       <string>Proxy Status</string>
+      </property>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="0">
+        <widget class="QLabel" name="lblProxyStatusImg">
+         <property name="text">
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="../res/vidalia.qrc">:/images/48x48/tor-stopping.png</pixmap>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <widget class="QLabel" name="lblProxyStatus">
+         <property name="text">
+          <string>Polipo does not appear to be running.</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="2">
+        <spacer name="horizontalSpacer_4">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>447</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="1" column="0" colspan="3">
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>728</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+    </item>
+    <item row="3" column="4" colspan="2">
+     <spacer name="verticalSpacer_3">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>153</width>
+        <height>131</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources>
+  <include location="../res/vidalia.qrc"/>
+ </resources>
+ <connections/>
+</ui>


Property changes on: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui
___________________________________________________________________
Added: svn:keywords
   + Id
Added: eol-style
   + native
Added: svn:eol-style
   + native

Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp	2009-07-07 05:28:09 UTC (rev 3943)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp	2009-07-07 06:50:50 UTC (rev 3944)
@@ -18,12 +18,24 @@
 
 HomePlugin::HomePlugin()
 {
+  _homePanel = 0;
 }
 
 HomePlugin::~HomePlugin()
 {
+  if (_homePanel)
+    delete _homePanel;
 }
 
+VidaliaPanel*
+HomePlugin::panel()
+{
+  if (!_homePanel) {
+    setupUI();
+  }
+  return _homePanel;
+}
+
 QString 
 HomePlugin::name() const
 {
@@ -42,5 +54,11 @@
   return QString("The Home Panel. Serves as a hub for the user experience.");
 }
 
+void
+HomePlugin::setupUI()
+{
+  _homePanel = new HomePanel(this);
+}
+
 Q_EXPORT_PLUGIN2(homeplugin, HomePlugin)
 

Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h	2009-07-07 05:28:09 UTC (rev 3943)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h	2009-07-07 06:50:50 UTC (rev 3944)
@@ -22,6 +22,8 @@
 #include <QObject>
 #include <QString>
 
+#include "HomePanel.h"
+
 class HomePlugin : public QObject, public VidaliaPluginInterface
 {
   Q_OBJECT
@@ -31,9 +33,13 @@
   HomePlugin();
   ~HomePlugin();
 
+  VidaliaPanel* panel();
   QString name() const;
   QString id() const;
   QString description() const;
+private:
+  void setupUI();
+  HomePanel* _homePanel;
 };
 
 #endif

Modified: vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.cpp	2009-07-07 05:28:09 UTC (rev 3943)
+++ vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.cpp	2009-07-07 06:50:50 UTC (rev 3944)
@@ -125,6 +125,18 @@
              this,   SLOT(resolved(int, QList<GeoIp>)));
 }
 
+QString
+NetViewer::tabLabel() const
+{
+  return QString("Network Map");
+}
+
+QIcon
+NetViewer::tabIcon() const
+{
+  return QIcon(":/images/16x16/applications-internet.png");
+}
+
 /** Called when the user changes the UI translation. */
 void
 NetViewer::retranslateUi()
@@ -573,15 +585,3 @@
     _map->show();
   }
 }
-
-QString
-NetViewer::tabLabel() const
-{
-  return QString("Network Map");
-}
-
-QIcon
-NetViewer::tabIcon() const
-{
-  return QIcon(":/images/16x16/applications-internet.png");
-}

Modified: vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.h	2009-07-07 05:28:09 UTC (rev 3943)
+++ vidalia/branches/extension-api/src/vidalia/NetworkMapPlugin/NetViewer.h	2009-07-07 06:50:50 UTC (rev 3944)
@@ -48,6 +48,10 @@
   /** Default constructor */
   NetViewer(VidaliaPluginInterface* parent);
 
+  /** Hook for displaying text in a panel's tab. */
+  QString tabLabel() const;
+  /** Hook for displaying an icon in a panel's tab. */
+  QIcon tabIcon() const;
 public slots:
   /** Displays the network map window. */
   void showWindow();
@@ -96,11 +100,6 @@
    * Toggles the map between normal and a full screen viewing modes. */
   void toggleFullScreen();
 
-  /** Hook for displaying text in a panel's tab. */
-  QString tabLabel() const;
-  /** Hook for displaying an icon in a panel's tab. */
-  QIcon tabIcon() const;
-
 private:
   /** Adds an IP address to the resolve queue and updates the queue timers. */
   void addToResolveQueue(const QHostAddress &ip, const QString &id);