[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3946: PluginManager tor starting and stopping api functioning. Hom (in vidalia/branches/extension-api/src/vidalia: . HomePlugin res res/16x16)
Author: tyree731
Date: 2009-07-08 01:44:39 -0400 (Wed, 08 Jul 2009)
New Revision: 3946
Added:
vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.cpp
vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.h
vidalia/branches/extension-api/src/vidalia/res/16x16/go-home.png
Removed:
vidalia/branches/extension-api/src/vidalia/VClickLabel.cpp
vidalia/branches/extension-api/src/vidalia/VClickLabel.h
Modified:
vidalia/branches/extension-api/src/vidalia/CMakeLists.txt
vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt
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
vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp
vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h
vidalia/branches/extension-api/src/vidalia/MainWindow.cpp
vidalia/branches/extension-api/src/vidalia/PluginManager.cpp
vidalia/branches/extension-api/src/vidalia/PluginManager.h
vidalia/branches/extension-api/src/vidalia/VidaliaPluginInterface.h
vidalia/branches/extension-api/src/vidalia/res/vidalia.qrc
Log:
PluginManager tor starting and stopping api functioning. HomePlugin has said functionality. Fixed icons and updated API extensively.
Modified: vidalia/branches/extension-api/src/vidalia/CMakeLists.txt
===================================================================
--- vidalia/branches/extension-api/src/vidalia/CMakeLists.txt 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/CMakeLists.txt 2009-07-08 05:44:39 UTC (rev 3946)
@@ -179,7 +179,6 @@
Vidalia.cpp
LanguageSupport.cpp
MainWindow.cpp
- VClickLabel.cpp
VidaliaWindow.cpp
VMessageBox.cpp
HelperProcess.cpp
@@ -190,7 +189,6 @@
qt4_wrap_cpp(vidalia_SRCS
Vidalia.h
MainWindow.h
- VClickLabel.h
VidaliaWindow.h
VMessageBox.h
HelperProcess.h
Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/CMakeLists.txt 2009-07-08 05:44:39 UTC (rev 3946)
@@ -15,13 +15,17 @@
${CMAKE_CURRENT_SOURCE_DIR}
)
-set(homeplugin_SRCS
+set(homeplugin_SRCS
+ AnimatedPixmap.cpp
HomePlugin.cpp
HomePanel.cpp
+ VClickLabel.cpp
)
qt4_wrap_cpp(homeplugin_SRCS
+ AnimatedPixmap.h
HomePlugin.h
HomePanel.h
+ VClickLabel.h
)
qt4_wrap_ui(homeplugin_SRCS
HomePanel.ui
Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.cpp 2009-07-08 05:44:39 UTC (rev 3946)
@@ -20,10 +20,33 @@
: VidaliaPanel(parent)
{
ui.setupUi(this);
+
+ /* Create animated pixmaps and connect animation signal to slots */
+#if 0
+ _torStatusAnimatedPixmap =
+ new AnimatedPixmap(":/images/48x48/process-working.png");
+ _proxyStatusAnimatedPixmap =
+ new AnimatedPixmap(":/images/48x48/process-working.png");
+ connect(_torStatusAnimatedPixmap, SIGNAL(frameChanged(int)),
+ this, SLOT(torFrameChanged(int)));
+ connect(_proxyStatusAnimatedPixmap, SIGNAL(frameChanged(int)),
+ this, SLOT(proxyFrameChanged(int)));
+#endif
+
+ /* Connect buttons to signals */
+ connect(ui.lblStartTorImg, SIGNAL(clicked()), this, SIGNAL(startTor()));
+ connect(ui.lblStartTor, SIGNAL(clicked()), this, SIGNAL(startTor()));
+ connect(ui.lblStartProxyImg, SIGNAL(clicked()), this, SIGNAL(startProxy()));
+ connect(ui.lblStartProxy, SIGNAL(clicked()), this, SIGNAL(startProxy()));
+ connect(ui.lblNewNym, SIGNAL(clicked()), this, SIGNAL(newIdentity()));
}
HomePanel::~HomePanel()
{
+#if 0
+ delete _torStatusAnimatedPixmap;
+ delete _proxyStatusAnimatedPixmap;
+#endif
}
QString
@@ -35,5 +58,79 @@
QIcon
HomePanel::tabIcon() const
{
- return QIcon(":/images/16x16/view-media-artist.png");
+ return QIcon(":/images/16x16/go-home.png");
}
+
+void
+HomePanel::proxyFrameChanged(int frame)
+{
+ ui.lblProxyStatusImg->setPixmap(_proxyStatusAnimatedPixmap->currentFrame());
+}
+
+void
+HomePanel::torFrameChanged(int frame)
+{
+ ui.lblTorStatusImg->setPixmap(_torStatusAnimatedPixmap->currentFrame());
+}
+
+void
+HomePanel::torStarting()
+{
+#if 0
+ _torStatusAnimatedPixmap->start();
+ ui.lblTorStatusImg->setPixmap(_torStatusAnimatedPixmap->currentFrame());
+#endif
+ ui.lblTorStatus->setText(tr("Tor is starting."));
+ ui.lblStartTor->setText(tr("Starting Tor"));
+
+ /* Disconnect the signals */
+ disconnect(ui.lblStartTorImg, SIGNAL(clicked()), this, 0);
+ disconnect(ui.lblStartTor, SIGNAL(clicked()), this, 0);
+}
+
+void
+HomePanel::torStarted()
+{
+#if 0
+ _torStatusAnimatedPixmap->stop();
+#endif
+ ui.lblTorStatusImg->setPixmap(QPixmap(":/images/48x48/tor-on.png"));
+ ui.lblTorStatus->setText(tr("You are connected to Tor!"));
+ ui.lblStartTor->setText(tr("Stop Tor"));
+ ui.lblStartTorImg->setPixmap(QPixmap(":/images/48x48/media-playback-stop.png"));
+
+ /* Reconnect the signals */
+ connect(ui.lblStartTorImg, SIGNAL(clicked()),this, SIGNAL(stopTor()));
+ connect(ui.lblStartTor, SIGNAL(clicked()), this, SIGNAL(stopTor()));
+}
+
+void
+HomePanel::torStopping()
+{
+#if 0
+ _torStatusAnimatedPixmap->start();
+ ui.lblTorStatusImg->setPixmap(_torStatusAnimatedPixmap->currentFrame());
+#endif
+ ui.lblTorStatus->setText(tr("Tor is stopping."));
+ ui.lblStartTor->setText(tr("Stopping Tor"));
+
+ /* Disconnect the signals */
+ disconnect(ui.lblStartTorImg, SIGNAL(clicked()), this, 0);
+ disconnect(ui.lblStartTor, SIGNAL(clicked()),this, 0);
+}
+
+void
+HomePanel::torStopped()
+{
+#if 0
+ _torStatusAnimatedPixmap->stop();
+#endif
+ ui.lblTorStatusImg->setPixmap(QPixmap(":/images/48x48/tor-off.png"));
+ ui.lblTorStatus->setText(tr("Tor does not appear to be running."));
+ ui.lblStartTor->setText(tr("Start Tor"));
+ ui.lblStartTorImg->setPixmap(QPixmap(":/images/48x48/media-playback-start.png"));
+
+ /* Reconnect the signals */
+ connect(ui.lblStartTorImg, SIGNAL(clicked()),this, SIGNAL(startTor()));
+ connect(ui.lblStartTor, SIGNAL(clicked()), this, SIGNAL(startTor()));
+}
Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.h 2009-07-08 05:44:39 UTC (rev 3946)
@@ -22,6 +22,7 @@
#include <QIcon>
#include <QString>
+#include "AnimatedPixmap.h"
#include "ui_HomePanel.h"
class HomePlugin;
@@ -30,14 +31,41 @@
{
Q_OBJECT
+ friend class HomePlugin;
+
public:
HomePanel(VidaliaPluginInterface* parent);
~HomePanel();
QString tabLabel() const;
QIcon tabIcon() const;
+
+signals:
+ void newIdentity();
+ void startProxy();
+ void stopProxy();
+ void startTor();
+ void stopTor();
+
+private slots:
+ /** Update status to next frame of animation */
+ void proxyFrameChanged(int frame);
+ /** Update status to next frame of animation */
+ void torFrameChanged(int frame);
+ /** Updates interface to show tor starting */
+ void torStarting();
+ /** Updates interface to show tor started */
+ void torStarted();
+ /** Updates interface to show tor stopping */
+ void torStopping();
+ /** Update interface to show tor stopped */
+ void torStopped();
private:
+ /** Qt Designer Object */
Ui::HomePanel ui;
+ /** Circular indeterminate progress animation object */
+ AnimatedPixmap* _torStatusAnimatedPixmap;
+ AnimatedPixmap* _proxyStatusAnimatedPixmap;
};
#endif
Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePanel.ui 2009-07-08 05:44:39 UTC (rev 3946)
@@ -16,7 +16,7 @@
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
- <widget class="QLabel" name="lblStartTorImg">
+ <widget class="VClickLabel" name="lblStartTorImg">
<property name="text">
<string/>
</property>
@@ -26,7 +26,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="QLabel" name="lblStartTor">
+ <widget class="VClickLabel" name="lblStartTor">
<property name="text">
<string>Start Tor</string>
</property>
@@ -46,7 +46,7 @@
</spacer>
</item>
<item row="0" column="3">
- <widget class="QLabel" name="lblStartProxyImg">
+ <widget class="VClickLabel" name="lblStartProxyImg">
<property name="text">
<string/>
</property>
@@ -56,7 +56,7 @@
</widget>
</item>
<item row="0" column="4">
- <widget class="QLabel" name="lblStartProxy">
+ <widget class="VClickLabel" name="lblStartProxy">
<property name="text">
<string>Start Proxy</string>
</property>
@@ -76,7 +76,7 @@
</spacer>
</item>
<item row="0" column="6">
- <widget class="QLabel" name="lblNewNymImg">
+ <widget class="VClickLabel" name="lblNewNymImg">
<property name="text">
<string/>
</property>
@@ -86,7 +86,7 @@
</widget>
</item>
<item row="0" column="7">
- <widget class="QLabel" name="lblNewNym">
+ <widget class="VClickLabel" name="lblNewNym">
<property name="text">
<string>New Identity</string>
</property>
@@ -106,17 +106,17 @@
</spacer>
</item>
<item row="0" column="9">
- <widget class="QLabel" name="lblSettingsImg">
+ <widget class="VClickLabel" name="lblSettingsImg">
<property name="text">
<string/>
</property>
<property name="pixmap">
- <pixmap resource="../res/vidalia.qrc">:/images/48x48/system-software-update.png</pixmap>
+ <pixmap resource="../res/vidalia.qrc">:/images/48x48/preferences-system.png</pixmap>
</property>
</widget>
</item>
<item row="0" column="10">
- <widget class="QLabel" name="lblSettings">
+ <widget class="VClickLabel" name="lblSettings">
<property name="text">
<string>Settings</string>
</property>
@@ -302,6 +302,13 @@
</layout>
</widget>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>VClickLabel</class>
+ <extends>QLabel</extends>
+ <header>VClickLabel.h</header>
+ </customwidget>
+ </customwidgets>
<resources>
<include location="../res/vidalia.qrc"/>
</resources>
Modified: vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.cpp 2009-07-08 05:44:39 UTC (rev 3946)
@@ -58,6 +58,28 @@
HomePlugin::setupUI()
{
_homePanel = new HomePanel(this);
+
+ /* Update the Tor and Proxy status based on Plugin Manager signals */
+ connect(_pluginManager, SIGNAL(torStarting()),
+ _homePanel, SLOT(torStarting()));
+ connect(_pluginManager, SIGNAL(torStarted()),
+ _homePanel, SLOT(torStarted()));
+ connect(_pluginManager, SIGNAL(torStopping()),
+ _homePanel, SLOT(torStopping()));
+ connect(_pluginManager, SIGNAL(torStopped()),
+ _homePanel, SLOT(torStopped()));
+
+ /* Connect panel signals to the plugin manager */
+ connect(_homePanel, SIGNAL(newIdentity()),
+ _pluginManager,SLOT(newIdentity()));
+ connect(_homePanel, SIGNAL(startProxy()),
+ _pluginManager, SLOT(startProxy()));
+ connect(_homePanel, SIGNAL(stopProxy()),
+ _pluginManager, SLOT(stopProxy()));
+ connect(_homePanel, SIGNAL(startTor()),
+ _pluginManager, SLOT(startTor()));
+ connect(_homePanel, SIGNAL(stopTor()),
+ _pluginManager, SLOT(stopTor()));
}
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-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/HomePlugin.h 2009-07-08 05:44:39 UTC (rev 3946)
@@ -37,6 +37,7 @@
QString name() const;
QString id() const;
QString description() const;
+
private:
void setupUI();
HomePanel* _homePanel;
Copied: vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.cpp (from rev 3941, vidalia/branches/extension-api/src/vidalia/VClickLabel.cpp)
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.cpp (rev 0)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.cpp 2009-07-08 05:44:39 UTC (rev 3946)
@@ -0,0 +1,40 @@
+/*
+** 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 VClickLabel.cpp
+** \version $Id$
+** \brief Custom widget to create a clickable label with both an image and text.
+*/
+
+#include "VClickLabel.h"
+#include "Vidalia.h"
+
+#include <QPainter>
+
+
+/** Default constructor. */
+VClickLabel::VClickLabel(QWidget *parent)
+ : QLabel(parent)
+{
+ setCursor(Qt::PointingHandCursor);
+}
+
+/** Overloaded mouse event to catch left mouse button clicks. */
+void
+VClickLabel::mouseReleaseEvent(QMouseEvent *e)
+{
+ if (e->button() == Qt::LeftButton) {
+ emit clicked();
+ }
+ e->accept();
+}
+
+
Copied: vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.h (from rev 3941, vidalia/branches/extension-api/src/vidalia/VClickLabel.h)
===================================================================
--- vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.h (rev 0)
+++ vidalia/branches/extension-api/src/vidalia/HomePlugin/VClickLabel.h 2009-07-08 05:44:39 UTC (rev 3946)
@@ -0,0 +1,42 @@
+/*
+** 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 VClickLabel.h
+** \version $Id$
+** \brief Custom widget to create a clickable label with both an image and text.
+*/
+
+#ifndef _VCLICKLABEL_H
+#define _VCLICKLABEL_H
+
+#include <QLabel>
+#include <QMouseEvent>
+
+class VClickLabel : public QLabel
+{
+ Q_OBJECT
+
+public:
+ /** Default constructor. */
+ VClickLabel(QWidget *parent = 0);
+
+signals:
+ /** Emitted when the widget is left-clicked. */
+ void clicked();
+
+protected:
+ /** Overloaded mouse event to catch left mouse button clicks. */
+ virtual void mouseReleaseEvent(QMouseEvent *e);
+
+};
+
+#endif
+
Modified: vidalia/branches/extension-api/src/vidalia/MainWindow.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/MainWindow.cpp 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/MainWindow.cpp 2009-07-08 05:44:39 UTC (rev 3946)
@@ -105,7 +105,6 @@
#define STARTUP_PROGRESS_CIRCUITBUILD 75
#define STARTUP_PROGRESS_MAXIMUM (STARTUP_PROGRESS_BOOTSTRAPPING+100)
-
/** Default constructor. It installs an icon in the system tray area and
* creates the popup menu associated with that icon. */
MainWindow::MainWindow()
@@ -186,6 +185,12 @@
connect(vApp, SIGNAL(running()), this, SLOT(running()));
connect(vApp, SIGNAL(aboutToQuit()), this, SLOT(aboutToQuit()));
+ /* Allow plugin manager to start/stop tor, request new identity */
+ connect(_pluginManager, SIGNAL(newIdentityRequest()),
+ this, SLOT(newIdentity()));
+ connect(_pluginManager, SIGNAL(startTorRequest()), this, SLOT(start()));
+ connect(_pluginManager, SIGNAL(stopTorRequest()), this, SLOT(stop()));
+
#if defined(USE_AUTOUPDATE)
/* Create a timer used to remind us to check for software updates */
connect(&_updateTimer, SIGNAL(timeout()), this, SLOT(checkForUpdates()));
@@ -959,6 +964,9 @@
_startStopAct->setText(actionText);
_startStopAct->setIcon(QIcon(IMG_START_TOR_16));
+ /* Notify plugin manager */
+ _pluginManager->sendStatus(pmStopped);
+
/* XXX: This might need to be smarter if we ever start connecting other
* slots to these triggered() and clicked() signals. */
QObject::disconnect(_startStopAct, SIGNAL(triggered()), this, 0);
@@ -973,6 +981,9 @@
}
trayIconFile = IMG_TOR_STOPPING;
statusIconFile = IMG_TOR_STOPPING_16;
+
+ /* Notify plugin manager */
+ _pluginManager->sendStatus(pmStopping);
} else if (status == Started) {
actionText = tr("Stop Tor");
_startStopAct->setEnabled(true);
@@ -990,11 +1001,17 @@
_startStopAct->setEnabled(false);
setStartupProgressVisible(true);
setStartupProgress(STARTUP_PROGRESS_STARTING, statusText);
+
+ /* Notify plugin manager */
+ _pluginManager->sendStatus(pmStarting);
} else if (status == CircuitEstablished) {
statusText = tr("Connected to the Tor network!");
trayIconFile = IMG_TOR_RUNNING;
statusIconFile = IMG_TOR_RUNNING_16;
setStartupProgressVisible(false);
+
+ /* Notify plugin manager */
+ _pluginManager->sendStatus(pmStarted);
}
/* Update the tray icon */
Modified: vidalia/branches/extension-api/src/vidalia/PluginManager.cpp
===================================================================
--- vidalia/branches/extension-api/src/vidalia/PluginManager.cpp 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/PluginManager.cpp 2009-07-08 05:44:39 UTC (rev 3946)
@@ -21,7 +21,7 @@
#include <QStringList>
PluginManager::PluginManager(const QString& dataDirectory)
- : _dataDirectory(dataDirectory)
+: _dataDirectory(dataDirectory)
{
}
@@ -96,3 +96,52 @@
{
return _dataDirectory;
}
+
+void
+PluginManager::newIdentity()
+{
+ emit newIdentityRequest();
+}
+
+void
+PluginManager::startTor()
+{
+ emit startTorRequest();
+}
+
+void
+PluginManager::stopTor()
+{
+ emit stopTorRequest();
+}
+
+void
+PluginManager::startProxy()
+{
+ emit startProxyRequest();
+}
+
+void
+PluginManager::stopProxy()
+{
+ emit stopProxyRequest();
+}
+
+void
+PluginManager::sendStatus(PMTorStatus status)
+{
+ switch(status) {
+ case pmStarting:
+ emit torStarting();
+ break;
+ case pmStarted:
+ emit torStarted();
+ break;
+ case pmStopping:
+ emit torStopping();
+ break;
+ case pmStopped:
+ emit torStopped();
+ break;
+ }
+}
Modified: vidalia/branches/extension-api/src/vidalia/PluginManager.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/PluginManager.h 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/PluginManager.h 2009-07-08 05:44:39 UTC (rev 3946)
@@ -23,8 +23,17 @@
#include <QObject>
#include <QString>
+class MainWindow;
class VidaliaPluginInterface;
+/** Used to simply signal emission for PluginManager */
+enum PMTorStatus {
+ pmStarting = 0,
+ pmStarted,
+ pmStopping,
+ pmStopped
+};
+
/** Class for the loading and managing of dynamic and static plugins from within
* Vidalia. Provides an interface for plugins to interact with the Vidalia
* application as well providing a number of useful functions for interplugin
@@ -33,6 +42,8 @@
{
Q_OBJECT
+ friend class MainWindow;
+
public:
/** PluginManager constructor. */
PluginManager(const QString& dataDirectory);
@@ -44,9 +55,53 @@
QList<VidaliaPluginInterface*> plugins() const;
/** Return the location of the users data directory plugin directory. */
QString dataDirectory() const;
+
+public slots:
+ /** Request MainWindow to start using a new Tor identity */
+ void newIdentity();
+ /** Request MainWindow to start the tor executable */
+ void startTor();
+ /** Request MainWindow to stop the tor executable */
+ void stopTor();
+ /** Request MainWindow to start the proxy server */
+ void startProxy();
+ /** Request MainWindow to stop the proxy server */
+ void stopProxy();
+
signals:
+ /** Sends a signal to MainWindow requesting the Vidalia Help Dialog */
void helpRequested(const QString& topic);
+ /** Sends a signal to MainWindow requesting a NEWNYM message be sent to Tor */
+ void newIdentityRequest();
+ /** Sends a signal to MainWindow requesting Tor to be started */
+ void startTorRequest();
+ /** Sends a signal to MainWindow requesting Tor to be stopped */
+ void stopTorRequest();
+ /** Sends a signal to MainWindow requesting the Proxy Server be started */
+ void startProxyRequest();
+ /** Sends a signal to MainWindow requesting the Proxy server be stopped */
+ void stopProxyRequest();
+
+ /** Send a signal signifying that Tor is starting */
+ void torStarting();
+ /** Send a signal signifying that Tor is started */
+ void torStarted();
+ /** Send a signal signifying that Tor is stopping */
+ void torStopping();
+ /** Send a signal signifying that Tor is stopped */
+ void torStopped();
+ /** Send a signal signifying that the Proxy server is starting */
+ void proxyStarting();
+ /** Send a signal signifying that the Proxy server is started */
+ void proxyStarted();
+ /** Send a signal signifying that the Proxy server is stopping */
+ void proxyStopping();
+ /** Send a signal signifying that the Proxy server is stopped */
+ void proxyStopped();
private:
+ /** Emit tor status signal based on provided TorStatus value */
+ void sendStatus(PMTorStatus status);
+
QList<VidaliaPluginInterface*> _pluginList;
const QString _dataDirectory;
};
Modified: vidalia/branches/extension-api/src/vidalia/VidaliaPluginInterface.h
===================================================================
--- vidalia/branches/extension-api/src/vidalia/VidaliaPluginInterface.h 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/VidaliaPluginInterface.h 2009-07-08 05:44:39 UTC (rev 3946)
@@ -36,7 +36,6 @@
* not be included for the plugin. */
class VidaliaPluginInterface
{
-
friend class PluginManager;
public:
@@ -69,9 +68,10 @@
QSettings* settings() const;
signals:
void helpRequested(const QString& topic);
-private:
+protected:
/** A singleton instance of the plugin manager. */
PluginManager* _pluginManager;
+private:
/** Allows the Plugin Manager to pass an instance of itself to the plugin. */
void setPluginManager(PluginManager* pluginManager);
};
Added: vidalia/branches/extension-api/src/vidalia/res/16x16/go-home.png
===================================================================
(Binary files differ)
Property changes on: vidalia/branches/extension-api/src/vidalia/res/16x16/go-home.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: vidalia/branches/extension-api/src/vidalia/res/vidalia.qrc
===================================================================
--- vidalia/branches/extension-api/src/vidalia/res/vidalia.qrc 2009-07-08 03:26:27 UTC (rev 3945)
+++ vidalia/branches/extension-api/src/vidalia/res/vidalia.qrc 2009-07-08 05:44:39 UTC (rev 3946)
@@ -11,6 +11,7 @@
<file>16x16/dialog-warning.png</file>
<file>16x16/emblem-important.png</file>
<file>16x16/format-justify-fill.png</file>
+ <file>16x16/go-home.png</file>
<file>16x16/graph-area.png</file>
<file>16x16/graph-line.png</file>
<file>16x16/help-about.png</file>