Rename old tq methods that no longer need a unique name

pull/1/head
Timothy Pearson 13 years ago
parent 90705c50d3
commit c895c15390

@ -90,7 +90,7 @@ KNutClient::KNutClient(bool noDock, TQObject* parent, const char *name) : TQObje
// sets data for selected item
setActiveUpsInfo(m_mainUpsInfo.record.name);
// sets mainUpsInfo.oldState to const value KNutNet::inittqStatus
// sets mainUpsInfo.oldState to const value KNutNet::initStatus
m_mainUpsInfo.oldState=KNutNet::initState;
@ -715,7 +715,7 @@ void KNutClient::addEventString (const TQString text, const TQString UPSAddress)
mainWindow->addComboStatusItem (text,UPSAddress);
else
{
TQString dateTime(TQDate::tqcurrentDate().toString());
TQString dateTime(TQDate::currentDate().toString());
dateTime +=" " + TQTime::currentTime().toString();
if (UPSAddress.isEmpty()) m_listKNutEvent->append(dateTime+" "+text);
else m_listKNutEvent->append(dateTime+" "+UPSAddress+" : "+text);
@ -791,7 +791,7 @@ void KNutClient::showStatusEvent(void) {
//qDebug ("KNutClient::showStatusEvent");
int myState = m_mainUpsInfo.upsNet->readtqStatus();
int myState = m_mainUpsInfo.upsNet->readStatus();
if (myState != m_mainUpsInfo.oldState) {
if ((myState & KNutNet::OFF) != (m_mainUpsInfo.oldState & KNutNet::OFF)) {

@ -152,7 +152,7 @@ void KNutDock::changeKIcon (void) {
if (!m_runtimeLayer) {
m_runtimeLayer = new TQPixmap(ICON_SIZE,ICON_SIZE);
}
painttqStatus(m_statusValue);
paintStatus(m_statusValue);
paintRuntime(m_runtimeValue, m_statusValue);
}
else { // picture Icon
@ -215,7 +215,7 @@ void KNutDock::repaintDock (const bool always) {
}
else myRuntimeValue = knc::numberVarError;
myStatusValue = m_activeUpsInfo->upsNet->readtqStatus();
myStatusValue = m_activeUpsInfo->upsNet->readStatus();
switch (m_typeOfIcon) {
@ -223,7 +223,7 @@ void KNutDock::repaintDock (const bool always) {
// *********STATUS****************
if (myStatusValue !=m_statusValue ) {
m_statusValue = myStatusValue;
painttqStatus(m_statusValue);
paintStatus(m_statusValue);
repaintNow = true;
}
@ -726,7 +726,7 @@ void KNutDock::paintOKPoint (TQPainter& paint ) {
}
void KNutDock::painttqStatus (int status ) {
void KNutDock::paintStatus (int status ) {
TQPainter paint;
int lastPos = 0;

@ -443,12 +443,12 @@ class KNutDock : public KSystemTray {
/**
* @internal
* Paints layer for UPS tqStatus, only for type general
* Vykresli vrstvu pro UPS tqStatus.
* Paints layer for UPS Status, only for type general
* Vykresli vrstvu pro UPS Status.
*
* @since 0.2
**/
void painttqStatus (int status );
void paintStatus (int status );
void paintEvent (TQPaintEvent *);

@ -43,7 +43,7 @@ KNutInstComms::KNutInstComms(TQString* userName, TQString* userPassword, const T
TQFrame *page = plainPage();
TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
TQLabel *label1 = new TQLabel (i18n("RUN INSTANT COMMAND"),page,"label1");
label1->tqsetAlignment(TQt::AlignHCenter);
label1->setAlignment(TQt::AlignHCenter);
topLayout->addWidget(label1);
TQLabel *label2 = new TQLabel (i18n("Command:"),page,"label2");

@ -150,7 +150,7 @@ void KNutMainWindow::addComboStatusItem (const TQString text, const TQString nam
if (m_infoCombo->count() >= (int)knc::maxCountKNutEvent) m_infoCombo->removeItem(0);
if (m_listKNutEvent->count() > knc::maxCountKNutEvent) m_listKNutEvent->remove(m_listKNutEvent->begin());
TQString dateTime(TQDate::tqcurrentDate().toString());
TQString dateTime(TQDate::currentDate().toString());
dateTime +=" " + TQTime::currentTime().toString();
if (name.isEmpty()) {
m_infoCombo->insertItem(dateTime+" "+text);
@ -369,7 +369,7 @@ void KNutMainWindow::showUpsData (void) {
int runtimeVal;
TQString nutStringVar;
bool okFloat;
// activeUpsInfo->oldtqStatus=KNutNet::inittqStatus;
// activeUpsInfo->oldStatus=KNutNet::initStatus;
// Nastaveni nemenych dat jsou precteny pouze jednou, predpoklada se jejich nemenost
// setting of unchange data, ones are reading only one.
@ -414,9 +414,9 @@ void KNutMainWindow::showUpsData (void) {
m_existLowHighXfer = true;
}
}
int upstqStatus=0;
if ((upstqStatus = m_activeUpsInfo->upsNet->readtqStatus ()) != -1)
m_frontPanel->setPanel(upstqStatus);
int upsStatus=0;
if ((upsStatus = m_activeUpsInfo->upsNet->readStatus ()) != -1)
m_frontPanel->setPanel(upsStatus);
if ( !m_activeUpsInfo->upsNet->existName(m_activeUpsInfo->runtimeVar)) {
nutStringVar = m_activeUpsInfo->upsNet->readStringVar(m_activeUpsInfo->runtimeVar);
@ -494,7 +494,7 @@ void KNutMainWindow::repaintPanel (void) {
}
else m_frontPanel->setRuntime(knc::numberVarError);
// precteme status a nastavime zarovky panelu
int status = m_activeUpsInfo->upsNet->readtqStatus();
int status = m_activeUpsInfo->upsNet->readStatus();
m_frontPanel->setPanel(status);
}
@ -727,7 +727,7 @@ void KNutMainWindow::initToolBar ( void ) {
TQLabel *upsNazev = new TQLabel ("UPS : ",toolBar("mainToolBar"));
// upsNazev is connected on toolBaar, dosn't need to call desctructor
toolBar ("mainToolBar")->insertWidget (0,upsNazev->tqsizeHint().width(),upsNazev);
toolBar ("mainToolBar")->insertWidget (0,upsNazev->sizeHint().width(),upsNazev);
toolBar ("mainToolBar")->insertCombo("",1,false, TQT_SIGNAL (activated (const TQString &)),TQT_TQOBJECT(this), TQT_SLOT (slotChangeUPS (const TQString &)));
// bude se pouze vybirat-------------------^^^
KComboBox *combo = toolBar("mainToolBar")->getCombo(1);

@ -33,7 +33,7 @@ enum LevelOfMessage {
lowWarningLevel, // OVER,
warningLevel, // OB ..
errorLevel, // connection error
criticalLevel // tqStatus BL, OFF
criticalLevel // Status BL, OFF
};
}

@ -201,7 +201,7 @@ int KNutNet::getUpsVars ( void) {
default:
return 0;
}
if ( readtqStatus() != KNutNet::WAIT) return returnValue;
if ( readStatus() != KNutNet::WAIT) return returnValue;
countWaitRevision--;
if (countWaitRevision) sleep (2);
}
@ -474,7 +474,7 @@ TQString KNutNet::readEnumValueVar (const TQString name, const int valueNumber)
}
int KNutNet::readtqStatus(void) {
int KNutNet::readStatus(void) {
m_error=0;
return m_upsStatusVar;

@ -145,7 +145,7 @@ public:
// this not error
NoListVars}; //upsd doesn't return list of variables, variable for STATUS has got value WAIT
enum typeOftqStatus {
enum typeOfStatus {
NS = 0, // - NONE status of UPS wasn't read
OFF = 1, // - UPS is off (not supplying power)
OL = 2, // - UPS is online (supplying power from the line/mains)
@ -481,7 +481,7 @@ bool switchedToTCP ( void );
*
* @since 0.5
**/
int readtqStatus(void);
int readStatus(void);
/**

@ -156,7 +156,7 @@ void KNutPanelMeter::activateAnalogs (void) {
//qDebug ( "KNutPanelMeter::activateAnalogs 1" );
m_analogArea->tqrepaint(); //tqrepaint all analog panels, background was made already
//qDebug ("KNutPanelMeter::activateAnalogs - end");
// analogSV->resizeContents(tqsizeHint().width(),tqsizeHint().height());
// analogSV->resizeContents(sizeHint().width(),sizeHint().height());
}
@ -334,7 +334,7 @@ void KNutPanelMeter::zeroingPanels (void) {
TQSize KNutPanelMeter::tqsizeHint (void){
TQSize KNutPanelMeter::sizeHint (void){
return TQSize(m_widthArea,m_heightArea);
}

@ -161,7 +161,7 @@ public:
*
* @since 0.1
**/
virtual TQSize tqsizeHint (void);
virtual TQSize sizeHint (void);
public slots:

@ -630,7 +630,7 @@ void KNutPrefDlg::initUps () {
// makes box for names of UPS's / Vytvorime box pro jmena UPS-ek
m_listBox2 = new KListBox( page, "ListBox2" );
m_listBox2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, m_listBox2->sizePolicy().hasHeightForWidth() ) );
m_listBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, m_listBox2->sizePolicy().hasHeightForWidth() ) );
m_listBox2->setFrameShape( TQListBox::StyledPanel );
m_listBox2->setFrameShadow( TQListBox::Sunken );
m_listBox2->setMinimumSize (100,100);

@ -54,7 +54,7 @@ KNutRWVar::KNutRWVar(TQString* userName, TQString* userPassword, const TQString
TQFrame *page = plainPage();
TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
TQLabel *label1 = new TQLabel (i18n("SET RW VARIABLE"),page,"label1");
label1->tqsetAlignment(TQt::AlignHCenter);
label1->setAlignment(TQt::AlignHCenter);
topLayout->addWidget(label1);

Loading…
Cancel
Save