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 <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);
tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}

@ -27,7 +27,7 @@ class TQPaintEvent;
class Chart : public TQWidget {
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); }
protected:
void paintEvent( TQPaintEvent* ev );

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

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

@ -14,7 +14,7 @@
#include <kapp.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();
}

@ -26,10 +26,10 @@ class Interface {
public:
/**
* 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!!)
*/
Interface(KNetStats* tqparent, const TQString& name);
Interface(KNetStats* parent, const TQString& name);
/**
* Set this interface visible to the user via a KNetStatsView.

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

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

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

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

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

Loading…
Cancel
Save