rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knetstats@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent df757dfa7d
commit 7bde530f35

@ -22,7 +22,7 @@
#include <tqpainter.h> #include <tqpainter.h>
#include <tqbrush.h> #include <tqbrush.h>
Chart::Chart(TQWidget* tqparent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed) : TQWidget(tqparent), mUplBuffer(uploadBuffer), mDldBuffer(downloadBuffer), mBufferSize(bufferSize), mPtr(ptr), mMaxSpeed(maxspeed) { Chart::Chart(TQWidget* parent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed) : TQWidget(parent), mUplBuffer(uploadBuffer), mDldBuffer(downloadBuffer), mBufferSize(bufferSize), mPtr(ptr), mMaxSpeed(maxspeed) {
setWFlags(TQt::WNoAutoErase); setWFlags(TQt::WNoAutoErase);
tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
} }

@ -27,7 +27,7 @@ class TQPaintEvent;
class Chart : public TQWidget { class Chart : public TQWidget {
public: public:
Chart(TQWidget* tqparent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed); Chart(TQWidget* parent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed);
TQSize tqsizeHint() { return TQSize(200, 100); } TQSize tqsizeHint() { return TQSize(200, 100); }
protected: protected:
void paintEvent( TQPaintEvent* ev ); void paintEvent( TQPaintEvent* ev );

@ -41,7 +41,7 @@
#include <kpushbutton.h> #include <kpushbutton.h>
Configure::Configure(KNetStats* tqparent, const InterfaceMap& ifs) : ConfigureBase(tqparent) { Configure::Configure(KNetStats* parent, const InterfaceMap& ifs) : ConfigureBase(parent) {
// Load configuration // Load configuration
KIconLoader* loader = kapp->iconLoader(); KIconLoader* loader = kapp->iconLoader();
@ -52,7 +52,7 @@ Configure::Configure(KNetStats* tqparent, const InterfaceMap& ifs) : ConfigureBa
mInterfaces->insertItem(iconPCI, it.key()); mInterfaces->insertItem(iconPCI, it.key());
mConfig[it.key()] = it.data()->options(); mConfig[it.key()] = it.data()->options();
// tqparent->readInterfaceOptions(*it, &mConfig[*it]); // parent->readInterfaceOptions(*it, &mConfig[*it]);
} }
mInterfaces->setCurrentItem(0); mInterfaces->setCurrentItem(0);

@ -47,7 +47,7 @@ class Configure : public ConfigureBase
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
Configure(KNetStats* tqparent, const InterfaceMap& ifs); Configure(KNetStats* parent, const InterfaceMap& ifs);
const OptionsMap& currentConfig() const { return mConfig; } const OptionsMap& currentConfig() const { return mConfig; }
bool canSaveConfig(); bool canSaveConfig();

@ -14,7 +14,7 @@
#include <kapp.h> #include <kapp.h>
#include <kconfig.h> #include <kconfig.h>
Interface::Interface(KNetStats* tqparent, const TQString& name) : mName(name), mView(0), mParent(tqparent) { Interface::Interface(KNetStats* parent, const TQString& name) : mName(name), mView(0), mParent(parent) {
update(); update();
} }

@ -26,10 +26,10 @@ class Interface {
public: public:
/** /**
* Constructs a new interface. * Constructs a new interface.
* \param tqparent tqparent of the view of this interface. * \param parent parent of the view of this interface.
* \param name name of this interface (not the TQObject name!!) * \param name name of this interface (not the TQObject name!!)
*/ */
Interface(KNetStats* tqparent, const TQString& name); Interface(KNetStats* parent, const TQString& name);
/** /**
* Set this interface visible to the user via a KNetStatsView. * Set this interface visible to the user via a KNetStatsView.

@ -63,8 +63,8 @@ extern "C" {
extern const char* programName; extern const char* programName;
KNetStatsView::KNetStatsView(KNetStats* tqparent, const TQString& interface) KNetStatsView::KNetStatsView(KNetStats* parent, const TQString& interface)
: KSystemTray(tqparent, 0), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) { : KSystemTray(parent, 0), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) {
mFdSock = 0; mFdSock = 0;
mFirstUpdate = true; mFirstUpdate = true;
mMaxSpeedAge = 0; mMaxSpeedAge = 0;
@ -82,7 +82,7 @@ KNetStatsView::KNetStatsView(KNetStats* tqparent, const TQString& interface)
strcpy(mDevInfo.ifr_name, mInterface.latin1()); strcpy(mDevInfo.ifr_name, mInterface.latin1());
setTextFormat(TQt::PlainText); setTextFormat(TQt::PlainText);
mContextMenu = tqparent->contextMenu(); mContextMenu = parent->contextMenu();
show(); show();
// Timer // Timer
@ -366,12 +366,12 @@ TQString KNetStatsView::getIp() {
return inet_ntoa(sin.sin_addr); return inet_ntoa(sin.sin_addr);
} }
TQString KNetStatsView::getNettqmask() { TQString KNetStatsView::getNetmask() {
if (mFdSock == -1 && !openFdSocket()) if (mFdSock == -1 && !openFdSocket())
return ""; return "";
ioctl(mFdSock, SIOCGIFNETMASK, &mDevInfo); ioctl(mFdSock, SIOCGIFNETMASK, &mDevInfo);
sockaddr_in tqmask = ((sockaddr_in&)mDevInfo.ifr_netmask); sockaddr_in mask = ((sockaddr_in&)mDevInfo.ifr_netmask);
return inet_ntoa(tqmask.sin_addr); return inet_ntoa(mask.sin_addr);
} }
void KNetStatsView::readOptions( const TQString& name, KNetStatsView::Options* opts, bool defaultVisibility ) { void KNetStatsView::readOptions( const TQString& name, KNetStatsView::Options* opts, bool defaultVisibility ) {

@ -78,7 +78,7 @@ public:
bool mChartTransparentBackground; bool mChartTransparentBackground;
}; };
KNetStatsView(KNetStats* tqparent, const TQString& interface); KNetStatsView(KNetStats* parent, const TQString& interface);
~KNetStatsView(); ~KNetStatsView();
void say(const TQString& message); void say(const TQString& message);
@ -88,7 +88,7 @@ public:
// read a value from /sys/class/net/interface/name // read a value from /sys/class/net/interface/name
TQString readInterfaceStringValue(const char* name, int maxlength); TQString readInterfaceStringValue(const char* name, int maxlength);
TQString getIp(); TQString getIp();
TQString getNettqmask(); TQString getNetmask();
const double* speedHistoryRx() const { return mSpeedHistoryRx; } const double* speedHistoryRx() const { return mSpeedHistoryRx; }
const double* speedHistoryTx() const { return mSpeedHistoryTx; } const double* speedHistoryTx() const { return mSpeedHistoryTx; }

@ -29,17 +29,17 @@
Statistics::Statistics( KNetStatsView* tqparent, const char *name ) Statistics::Statistics( KNetStatsView* parent, const char *name )
: StatisticsBase( tqparent, name ), mInterface(tqparent->interface()), mParent(tqparent) { : StatisticsBase( parent, name ), mInterface(parent->interface()), mParent(parent) {
setCaption( i18n( "Details of %1" ).tqarg( mInterface ) ); setCaption( i18n( "Details of %1" ).tqarg( mInterface ) );
TQBoxLayout* l = new TQHBoxLayout( mChart ); TQBoxLayout* l = new TQHBoxLayout( mChart );
l->setAutoAdd( true ); l->setAutoAdd( true );
Chart* chart = new Chart(mChart, tqparent->speedHistoryTx(), tqparent->speedHistoryRx(), tqparent->historyBufferSize(), tqparent->historyPointer(), tqparent->maxSpeed()); Chart* chart = new Chart(mChart, parent->speedHistoryTx(), parent->speedHistoryRx(), parent->historyBufferSize(), parent->historyPointer(), parent->maxSpeed());
mMAC->setText(mParent->readInterfaceStringValue("address", 18)); mMAC->setText(mParent->readInterfaceStringValue("address", 18));
mIP->tqsetAlignment(TQt::AlignRight); mIP->tqsetAlignment(TQt::AlignRight);
mMAC->tqsetAlignment(TQt::AlignRight); mMAC->tqsetAlignment(TQt::AlignRight);
mNettqmask->tqsetAlignment(TQt::AlignRight); mNetmask->tqsetAlignment(TQt::AlignRight);
update(); update();
mTimer = new TQTimer( this ); mTimer = new TQTimer( this );
@ -64,7 +64,7 @@ void Statistics::show() {
// Update details... // Update details...
mMTU->setText(mParent->readInterfaceStringValue("mtu", 6)); mMTU->setText(mParent->readInterfaceStringValue("mtu", 6));
mIP->setText( mParent->getIp() ); mIP->setText( mParent->getIp() );
mNettqmask->setText( mParent->getNettqmask() ); mNetmask->setText( mParent->getNetmask() );
mTimer->start( mParent->updateInterval() ); mTimer->start( mParent->updateInterval() );
StatisticsBase::show(); StatisticsBase::show();

@ -31,7 +31,7 @@ class Statistics : public StatisticsBase
TQ_OBJECT TQ_OBJECT
public: public:
Statistics( KNetStatsView* tqparent = 0, const char *name = 0 ); Statistics( KNetStatsView* parent = 0, const char *name = 0 );
/** /**
* Formats a numberic byte representation * Formats a numberic byte representation

@ -286,7 +286,7 @@
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Nettqmask:</string> <string>Netmask:</string>
</property> </property>
</widget> </widget>
<widget class="TQLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
@ -357,7 +357,7 @@
</widget> </widget>
<widget class="KActiveLabel" row="1" column="2"> <widget class="KActiveLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>mNettqmask</cstring> <cstring>mNetmask</cstring>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy> <sizepolicy>

Loading…
Cancel
Save