summaryrefslogtreecommitdiffstats
path: root/src/torkview.h
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-07-27 16:57:53 +0200
committerSlávek Banko <[email protected]>2013-07-27 18:48:46 +0200
commit7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch)
tree4655c7263ca5c64d23d10167cb459dd9cb253815 /src/torkview.h
parent88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff)
downloadtork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz
tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip
Initial TQt conversion
Diffstat (limited to 'src/torkview.h')
-rw-r--r--src/torkview.h174
1 files changed, 87 insertions, 87 deletions
diff --git a/src/torkview.h b/src/torkview.h
index a13a29a..19ae410 100644
--- a/src/torkview.h
+++ b/src/torkview.h
@@ -23,7 +23,7 @@
#ifndef _TORKVIEW_H_
#define _TORKVIEW_H_
-#include <qwidget.h>
+#include <ntqwidget.h>
#include "torkview_base.h"
#include "hitwidget.h"
@@ -31,18 +31,18 @@
#include "kerrylabel.h"
#include "dndlistview.h"
-#include <qlistview.h>
-#include <qdragobject.h>
-#include <qiconview.h>
-#include <qdatetime.h>
+#include <ntqlistview.h>
+#include <ntqdragobject.h>
+#include <ntqiconview.h>
+#include <ntqdatetime.h>
#include <kpassivepopup.h>
#include "newstreamosd.h"
-class QPainter;
+class TQPainter;
class KURL;
-class QListViewItem;
-class QDragEnterEvent;
-class QDragDropEvent;
+class TQListViewItem;
+class TQDragEnterEvent;
+class TQDragDropEvent;
class KPassivePopup;
class StreamOSD;
class HitWidget;
@@ -70,7 +70,7 @@ public:
/**
* Default constructor
*/
- torkView(QWidget *parent);
+ torkView(TQWidget *parent);
/**
* Destructor
@@ -80,10 +80,10 @@ public:
void hidePopup();
bool getShowTormon() {return m_tormon;}
void setShowTormon(bool tormon) { m_tormon = tormon;}
- void infoUpdated(const QString &type, const QString &summary,
- const QString &data);
- QStringList subnet16List(){ return m_subnet16List; }
- QValueList<int> countryList(){ return m_countryList; }
+ void infoUpdated(const TQString &type, const TQString &summary,
+ const TQString &data);
+ TQStringList subnet16List(){ return m_subnet16List; }
+ TQValueList<int> countryList(){ return m_countryList; }
StreamOSD* m_osd;
StreamOSD* m_nontorosd;
void toggleAnonymizerTork(bool state);
@@ -102,7 +102,7 @@ public:
HitWidget* ksircitem;
HitWidget* operaitem;
HitWidget* firefoxitem;
- QValueList<HitWidget*> menuItems;
+ TQValueList<HitWidget*> menuItems;
KURLLabel *configurePriv;
KURLLabel *configurePrivText;
@@ -164,20 +164,20 @@ public:
/// TX Speed in bytes per second
inline double sys_byteSpeedTx() const;
- static inline QString byteFormat( double num,
+ static inline TQString byteFormat( double num,
const char* ksufix = " KB",
const char* msufix = " MB");
void resetBWHistory();
void updateChart();
- QStringList m_subnet16List;
- QValueList<int> m_countryList;
+ TQStringList m_subnet16List;
+ TQValueList<int> m_countryList;
void clearStreamMaps();
- QTime timeLastTorUse;
- QTime timeTorWasLastUsed(){return timeLastTorUse;};
- QString addrLastTorUse;
- QString addrTorWasLastUsed(){return addrLastTorUse;};
+ TQTime timeLastTorUse;
+ TQTime timeTorWasLastUsed(){return timeLastTorUse;};
+ TQString addrLastTorUse;
+ TQString addrTorWasLastUsed(){return addrLastTorUse;};
void setGeoIPAvailable(bool set){geoip_db = set;};
@@ -186,9 +186,9 @@ signals:
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
- void showSecurityNotice(const QString& cleanedPort);
- void showScreamingNotice(const QString& cleanedPort);
+ void signalChangeCaption(const TQString& text);
+ void showSecurityNotice(const TQString& cleanedPort);
+ void showScreamingNotice(const TQString& cleanedPort);
void showMyKonqueror();
void riskySession();
void aboutTorify();
@@ -200,41 +200,41 @@ signals:
void stopEverything();
void updateStats();
void mixminionHome();
- void processWarning(const QString& , const QString& );
+ void processWarning(const TQString& , const TQString& );
void signalCheckGuards();
void signalCheckTorNet();
void signalCheckBWSettings();
- void updateTrayStats(const QString &,const QString &,
- const QString &,const QString &);
+ void updateTrayStats(const TQString &,const TQString &,
+ const TQString &,const TQString &);
public slots:
void toggleParanoidMode(int);
- void torify(const QString &);
+ void torify(const TQString &);
void sendAnonymousEmail();
void anonymousOpera();
void anonymousFirefox();
- void anonymizedOpera(const QString &);
- void anonymizedFirefox(const QString &);
- void showServerBW(const QString&);
+ void anonymizedOpera(const TQString &);
+ void anonymizedFirefox(const TQString &);
+ void showServerBW(const TQString&);
private slots:
void switchColors();
void settingsChanged();
- void streamStatusUpdated(const QString &, const QString &,
- const QString &, const QString &,
- const QString &);
- void circuitStatusUpdated(const QString &, const QString &,
- const QString &, const QString &);
- void ORStatusUpdated(const QString &ORID, const QString &status);
- void guardStatusUpdated(const QString &ORID, const QString &status);
- void bwUpdated(const QString &in, const QString &out);
- void streamBwUpdated(const QString &stream, const QString &in,
- const QString &out);
- QPixmap streamProgram(const QString &port);
- void activeServersUpdated(const QStringList &servers);
- void displayError(const QString &,const QString &);
- void displayServer(const QString &,const QString &);
- void serverStatusUpdated(const QString &, const QString &,
- const QString &,const QString &);
+ void streamStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &,
+ const TQString &);
+ void circuitStatusUpdated(const TQString &, const TQString &,
+ const TQString &, const TQString &);
+ void ORStatusUpdated(const TQString &ORID, const TQString &status);
+ void guardStatusUpdated(const TQString &ORID, const TQString &status);
+ void bwUpdated(const TQString &in, const TQString &out);
+ void streamBwUpdated(const TQString &stream, const TQString &in,
+ const TQString &out);
+ TQPixmap streamProgram(const TQString &port);
+ void activeServersUpdated(const TQStringList &servers);
+ void displayError(const TQString &,const TQString &);
+ void displayServer(const TQString &,const TQString &);
+ void serverStatusUpdated(const TQString &, const TQString &,
+ const TQString &,const TQString &);
void privoxiedBash();
void downloadMixminion();
void downloadTorButton();
@@ -243,61 +243,61 @@ private slots:
private:
- unsigned long readInterfaceNumValue(QString interface,
+ unsigned long readInterfaceNumValue(TQString interface,
const char* name);
void setHiddenServicesText();
- QString parseStreamPort(const QString &);
+ TQString parseStreamPort(const TQString &);
void populateMenu();
bool geoip_db;
KPassivePopup* m_pop;
bool m_tormon;
- QStringList mSysDevPathList;
+ TQStringList mSysDevPathList;
bool mFirstUpdate;
bool checkInterface();
bool gotEth0;
KURLLabel *paranoidmodeicon;
KURLLabel *paranoidmodetext;
- QStringList greenonion;
- QStringList redonion;
- QStringList yellowonion;
- QStringList orangeonion;
- QStringList littleonion;
- QStringList todelete;
- QValueList<QStringList> iconList;
- QValueList<QString> torType;
-
-
- QStringList guard;
- QStringList redguard;
- QStringList detachedguard;
- QStringList littleguard;
- QValueList<QStringList> guardIconList;
- QValueList<QStringList> circuitIconList;
-
- typedef QMap<QString, QString> stringmap;
+ TQStringList greenonion;
+ TQStringList redonion;
+ TQStringList yellowonion;
+ TQStringList orangeonion;
+ TQStringList littleonion;
+ TQStringList todelete;
+ TQValueList<TQStringList> iconList;
+ TQValueList<TQString> torType;
+
+
+ TQStringList guard;
+ TQStringList redguard;
+ TQStringList detachedguard;
+ TQStringList littleguard;
+ TQValueList<TQStringList> guardIconList;
+ TQValueList<TQStringList> circuitIconList;
+
+ typedef TQMap<TQString, TQString> stringmap;
stringmap entryGuards;
stringmap streamPurpose;
stringmap portStream;
- typedef QMap<QString, streamItem*> streamlist;
+ typedef TQMap<TQString, streamItem*> streamlist;
streamlist streams;
- typedef QMap<QString, QListViewItem*> osdstreamlist;
+ typedef TQMap<TQString, TQListViewItem*> osdstreamlist;
osdstreamlist osdstreams;
osdstreamlist logstreams;
osdstreamlist torservers;
osdstreamlist circuitExits;
- typedef QMap<QString, QPixmap> stringToPixmap;
+ typedef TQMap<TQString, TQPixmap> stringToPixmap;
stringToPixmap streamStatusIcon;
stringToPixmap cachedStreamIcon;
- typedef QMap<QString, int> streamBw;
+ typedef TQMap<TQString, int> streamBw;
streamBw streamBwIn;
streamBw streamBwOut;
- QLabel *welcomeheaderLabel;
+ TQLabel *welcomeheaderLabel;
unsigned int torbtx;
unsigned int torbrx;
@@ -366,25 +366,25 @@ double torkView::sys_byteSpeedTx() const {
return sys_mSpeedHistoryTx[sys_mSpeedHistoryPtr];
}
-QString torkView::byteFormat( double num, const char* ksufix,
+TQString torkView::byteFormat( double num, const char* ksufix,
const char* msufix ) {
const double ONE_KB = 1024.0;
const double ONE_MB = ONE_KB*ONE_KB;
if ( num >= ONE_MB ) // MB
- return QString::number( num/(ONE_MB), 'f', 1 ) + msufix;
+ return TQString::number( num/(ONE_MB), 'f', 1 ) + msufix;
else // Kb
- return QString::number( num/ONE_KB, 'f', 1 ) + ksufix;
+ return TQString::number( num/ONE_KB, 'f', 1 ) + ksufix;
}
-class streamItem : public QObject, public QListViewItem
+class streamItem : public TQObject, public TQListViewItem
{
Q_OBJECT
public:
- streamItem( DndListView *parent, const QString &id,
- const QString &program, const QString &target,
- const QString &status, const QString &bw,
- const QString &exit, const QString &circuit );
+ streamItem( DndListView *parent, const TQString &id,
+ const TQString &program, const TQString &target,
+ const TQString &status, const TQString &bw,
+ const TQString &exit, const TQString &circuit );
streamItem();
enum {
@@ -509,16 +509,16 @@ double streamItem::byteSpeedTx() const {
}
-class circuitItem : public QObject, public QListViewItem
+class circuitItem : public TQObject, public TQListViewItem
{
Q_OBJECT
public:
- circuitItem( DndListView *parent, const QString &id,
- const QString &status, const QString &server );
+ circuitItem( DndListView *parent, const TQString &id,
+ const TQString &status, const TQString &server );
-// bool acceptDrop( const QMimeSource *mime ) const;
-// void dropped ( QDropEvent * e );
+// bool acceptDrop( const TQMimeSource *mime ) const;
+// void dropped ( TQDropEvent * e );
// void dragEntered( );