Rename old tq methods that no longer need a unique name

pull/1/head
Timothy Pearson 13 years ago
parent c1ef065782
commit abb8cd68f8

@ -352,17 +352,17 @@ bool Button::state() const
TQRect Button::recommendedRect() const TQRect Button::recommendedRect() const
{ {
TQSize tqsizeHint = m_button->tqsizeHint(); TQSize sizeHint = m_button->sizeHint();
if ( tqsizeHint.width() < m_originalRect.width() ) if ( sizeHint.width() < m_originalRect.width() )
tqsizeHint.setWidth( m_originalRect.width() ); sizeHint.setWidth( m_originalRect.width() );
// Hmm...for now, lets just keep the recomended rect the same height as the original rect // Hmm...for now, lets just keep the recomended rect the same height as the original rect
tqsizeHint.setHeight( m_originalRect.height() ); sizeHint.setHeight( m_originalRect.height() );
int hdw = (tqsizeHint.width() - m_originalRect.width())/2; int hdw = (sizeHint.width() - m_originalRect.width())/2;
int hdh = (tqsizeHint.height() - m_originalRect.height())/2; int hdh = (sizeHint.height() - m_originalRect.height())/2;
return TQRect( m_originalRect.x()-hdw, m_originalRect.y()-hdh, tqsizeHint.width(), tqsizeHint.height() ); return TQRect( m_originalRect.x()-hdw, m_originalRect.y()-hdh, sizeHint.width(), sizeHint.height() );
} }

@ -62,8 +62,8 @@ CircuitView::CircuitView( CircuitDocument * circuitDocument, ViewContainer *view
m_pViewIface = new CircuitViewIface(this); m_pViewIface = new CircuitViewIface(this);
m_statusBar->insertItem( "", ViewStatusBar::SimulationState ); m_statusBar->insertItem( "", ViewStatusBar::SimulationState );
connect( Simulator::self(), TQT_SIGNAL(simulatingStateChanged(bool )), this, TQT_SLOT(slotUpdateRunningtqStatus(bool )) ); connect( Simulator::self(), TQT_SIGNAL(simulatingStateChanged(bool )), this, TQT_SLOT(slotUpdateRunningStatus(bool )) );
slotUpdateRunningtqStatus( Simulator::self()->isSimulating() ); slotUpdateRunningStatus( Simulator::self()->isSimulating() );
} }
@ -74,7 +74,7 @@ CircuitView::~CircuitView()
} }
void CircuitView::slotUpdateRunningtqStatus( bool isRunning ) void CircuitView::slotUpdateRunningStatus( bool isRunning )
{ {
m_statusBar->changeItem( isRunning ? i18n("Simulation Running") : i18n("Simulation Paused"), ViewStatusBar::SimulationState ); m_statusBar->changeItem( isRunning ? i18n("Simulation Running") : i18n("Simulation Paused"), ViewStatusBar::SimulationState );
} }

@ -27,7 +27,7 @@ public:
~CircuitView(); ~CircuitView();
public slots: public slots:
virtual void slotUpdateRunningtqStatus( bool isRunning ); virtual void slotUpdateRunningStatus( bool isRunning );
protected: protected:
virtual void dragEnterEvent( TQDragEnterEvent * e ); virtual void dragEnterEvent( TQDragEnterEvent * e );

@ -65,8 +65,8 @@ int CNItem::rtti() const
bool CNItem::preResize( TQRect sizeRect ) bool CNItem::preResize( TQRect sizeRect )
{ {
if ( (std::abs((double)sizeRect.width()) < tqminimumSize().width()) || if ( (std::abs((double)sizeRect.width()) < minimumSize().width()) ||
(std::abs((double)sizeRect.height()) < tqminimumSize().height()) ) (std::abs((double)sizeRect.height()) < minimumSize().height()) )
return false; return false;
updateConnectorPoints(false); updateConnectorPoints(false);
@ -84,16 +84,16 @@ void CNItem::setVisible( bool yes )
{ {
if (b_deleted) if (b_deleted)
{ {
Item::tqsetVisible(false); Item::setVisible(false);
return; return;
} }
Item::tqsetVisible(yes); Item::setVisible(yes);
const TextMap::iterator textMapEnd = m_textMap.end(); const TextMap::iterator textMapEnd = m_textMap.end();
for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it ) for ( TextMap::iterator it = m_textMap.begin(); it != textMapEnd; ++it )
{ {
it.data()->tqsetVisible(yes); it.data()->setVisible(yes);
} }
const NodeMap::iterator nodeMapEnd = m_nodeMap.end(); const NodeMap::iterator nodeMapEnd = m_nodeMap.end();

@ -585,7 +585,7 @@ void Connector::setVisible( bool yes )
if ( !canvas() || isVisible() == yes ) if ( !canvas() || isVisible() == yes )
return; return;
TQCanvasPolygon::tqsetVisible(yes); TQCanvasPolygon::setVisible(yes);
updateConnectorLines(); updateConnectorLines();
} }
@ -616,7 +616,7 @@ void Connector::updateConnectorLines()
item->setZ(z); item->setZ(z);
item->setPen(pen); item->setPen(pen);
item->setBrush(color); item->setBrush(color);
item->tqsetVisible( isVisible() ); item->setVisible( isVisible() );
} }
} }

@ -97,7 +97,7 @@ void DPText::postResize()
} }
TQSize DPText::tqminimumSize() const TQSize DPText::minimumSize() const
{ {
return TQSize( 48, 24 ); return TQSize( 48, 24 );
} }

@ -29,7 +29,7 @@ public:
virtual void setSelected( bool yes ); virtual void setSelected( bool yes );
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
protected: protected:
virtual void postResize(); virtual void postResize();

@ -101,7 +101,7 @@ void DPRectangle::dataChanged()
} }
TQSize DPRectangle::tqminimumSize() const TQSize DPRectangle::minimumSize() const
{ {
int side = TQMAX(16, pen().width()+2); int side = TQMAX(16, pen().width()+2);
return TQSize( side, side ); return TQSize( side, side );

@ -30,7 +30,7 @@ class DPRectangle : public DrawPart
virtual void setSelected( bool yes ); virtual void setSelected( bool yes );
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
protected: protected:
virtual void drawShape( TQPainter &p ); virtual void drawShape( TQPainter &p );

@ -98,7 +98,7 @@ void ECPotentiometer::drawShape( TQPainter &p )
pa[1] = TQPoint( 4, -3 ); pa[1] = TQPoint( 4, -3 );
pa[2] = TQPoint( 4, 3 ); pa[2] = TQPoint( 4, 3 );
int space = m_pSlider->tqstyle().tqpixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider ); int space = m_pSlider->tqstyle().pixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp ); int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp );
pa.translate( _x+16, base_y ); pa.translate( _x+16, base_y );

@ -99,20 +99,20 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//END Data register //END Data register
//BEGIN tqStatus register //BEGIN Status register
TQString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" }; TQString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
// The statusIDs are referenced in the save file and must not change // The statusIDs are referenced in the save file and must not change
TQString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" }; TQString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
// Bits 0...2 in the tqStatus register are not used // Bits 0...2 in the Status register are not used
for ( int i = 3; i < 8; ++i ) for ( int i = 3; i < 8; ++i )
{ {
TQString id = statusIDs[i-3]; TQString id = statusIDs[i-3];
TQString name = statusNames[i-3]; TQString name = statusNames[i-3];
// Bit 3 (pin 15) doesn't not follow the same positioning pattern as // Bit 3 (pin 15) doesn't not follow the same positioning pattern as
// the other pins in the tqStatus register. // the other pins in the Status register.
if ( i == 3 ) if ( i == 3 )
{ {
pin = createPin( 40, -72, 180, id ); pin = createPin( 40, -72, 180, id );
@ -126,7 +126,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
m_pLogic[i+8] = createLogicOut( pin, false ); m_pLogic[i+8] = createLogicOut( pin, false );
} }
//END tqStatus register //END Status register
//BEGIN Control register //BEGIN Control register
@ -228,8 +228,8 @@ void ParallelPortComponent::controlCallback( bool )
void ParallelPortComponent::stepNonLogic() void ParallelPortComponent::stepNonLogic()
{ {
uchar status = m_pParallelPort->readFromRegister( ParallelPort::tqStatus ); uchar status = m_pParallelPort->readFromRegister( ParallelPort::Status );
// Bits 0...2 in the tqStatus register are not used // Bits 0...2 in the Status register are not used
for ( int i = 3; i < 8; ++i ) for ( int i = 3; i < 8; ++i )
m_pLogic[i + 8]->setHigh( status | (1 << i) ); m_pLogic[i + 8]->setHigh( status | (1 << i) );
} }

@ -40,7 +40,7 @@ class ParallelPortComponent : public CallbackClass, public Component
void dataCallback( bool ); void dataCallback( bool );
void controlCallback( bool ); void controlCallback( bool );
/// Registers: { Data[0...7], tqStatus[0...5], 0[6...7], Control[0...4], 0[5...7] } /// Registers: { Data[0...7], Status[0...5], 0[6...7], Control[0...4], 0[5...7] }
LogicOut * m_pLogic[24]; LogicOut * m_pLogic[24];
ParallelPort * m_pParallelPort; ParallelPort * m_pParallelPort;

@ -375,7 +375,7 @@ void PICComponent::slotCODCreationSucceeded()
delete m_pGpsim; delete m_pGpsim;
m_pGpsim = new GpsimProcessor(m_symbolFile); m_pGpsim = new GpsimProcessor(m_symbolFile);
if ( m_pGpsim->codLoadtqStatus() == GpsimProcessor::CodSuccess ) if ( m_pGpsim->codLoadStatus() == GpsimProcessor::CodSuccess )
{ {
MicroInfo * microInfo = m_pGpsim->microInfo(); MicroInfo * microInfo = m_pGpsim->microInfo();
property("lastPackage")->setValue( microInfo->id() ); property("lastPackage")->setValue( microInfo->id() );
@ -387,7 +387,7 @@ void PICComponent::slotCODCreationSucceeded()
else else
{ {
m_pGpsim->displayCodLoadtqStatus(); m_pGpsim->displayCodLoadStatus();
delete m_pGpsim; delete m_pGpsim;
m_pGpsim = 0l; m_pGpsim = 0l;
} }

@ -175,7 +175,7 @@ void ECNode::drawShape( TQPainter &p )
{ {
bool drawDivPoint; bool drawDivPoint;
TQPoint divPoint = findConnectorDivergePoint(&drawDivPoint); TQPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
m_pinPoint->tqsetVisible(drawDivPoint); m_pinPoint->setVisible(drawDivPoint);
m_pinPoint->move( divPoint.x()-1, divPoint.y()-1 ); m_pinPoint->move( divPoint.x()-1, divPoint.y()-1 );
} }

@ -89,7 +89,7 @@ GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *parent )
m_bCanExecuteNextCycle = true; m_bCanExecuteNextCycle = true;
m_bIsRunning = false; m_bIsRunning = false;
m_pPicProcessor = 0l; m_pPicProcessor = 0l;
m_codLoadtqStatus = CodUnknown; m_codLoadStatus = CodUnknown;
m_pRegisterMemory = 0l; m_pRegisterMemory = 0l;
m_debugMode = GpsimDebugger::AsmDebugger; m_debugMode = GpsimDebugger::AsmDebugger;
m_pDebugger[0] = m_pDebugger[1] = 0l; m_pDebugger[0] = m_pDebugger[1] = 0l;
@ -101,37 +101,37 @@ GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *parent )
switch ( (cod_errors)load_symbol_file( &tempProcessor, fileName ) ) switch ( (cod_errors)load_symbol_file( &tempProcessor, fileName ) )
{ {
case COD_SUCCESS: case COD_SUCCESS:
m_codLoadtqStatus = CodSuccess; m_codLoadStatus = CodSuccess;
break; break;
case COD_FILE_NOT_FOUND: case COD_FILE_NOT_FOUND:
m_codLoadtqStatus = CodFileNotFound; m_codLoadStatus = CodFileNotFound;
break; break;
case COD_UNRECOGNIZED_PROCESSOR: case COD_UNRECOGNIZED_PROCESSOR:
m_codLoadtqStatus = CodUnrecognizedProcessor; m_codLoadStatus = CodUnrecognizedProcessor;
break; break;
case COD_FILE_NAME_TOO_LONG: case COD_FILE_NAME_TOO_LONG:
m_codLoadtqStatus = CodFileNameTooLong; m_codLoadStatus = CodFileNameTooLong;
break; break;
case COD_LST_NOT_FOUND: case COD_LST_NOT_FOUND:
m_codLoadtqStatus = CodLstNotFound; m_codLoadStatus = CodLstNotFound;
break; break;
case COD_BAD_FILE: case COD_BAD_FILE:
m_codLoadtqStatus = CodBadFile; m_codLoadStatus = CodBadFile;
break; break;
default: default:
m_codLoadtqStatus = CodUnknown; m_codLoadStatus = CodUnknown;
} }
#else // GPSIM_0_21_11+ #else // GPSIM_0_21_11+
FILE * pFile = fopen( fileName, "r" ); FILE * pFile = fopen( fileName, "r" );
if ( !pFile ) if ( !pFile )
m_codLoadtqStatus = CodFileUnreadable; m_codLoadStatus = CodFileUnreadable;
else else
m_codLoadtqStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure; m_codLoadStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
#endif #endif
m_pPicProcessor = dynamic_cast<pic_processor*>(tempProcessor); m_pPicProcessor = dynamic_cast<pic_processor*>(tempProcessor);
if ( codLoadtqStatus() == CodSuccess ) if ( codLoadStatus() == CodSuccess )
{ {
m_pRegisterMemory = new RegisterSet( m_pPicProcessor ); m_pRegisterMemory = new RegisterSet( m_pPicProcessor );
m_pDebugger[0] = new GpsimDebugger( GpsimDebugger::AsmDebugger, this ); m_pDebugger[0] = new GpsimDebugger( GpsimDebugger::AsmDebugger, this );
@ -154,9 +154,9 @@ GpsimProcessor::~GpsimProcessor()
} }
void GpsimProcessor::displayCodLoadtqStatus( ) void GpsimProcessor::displayCodLoadStatus( )
{ {
switch (m_codLoadtqStatus) switch (m_codLoadStatus)
{ {
case CodSuccess: case CodSuccess:
break; break;

@ -252,7 +252,7 @@ class GpsimProcessor : public TQObject
public: public:
/** /**
* Create a new gpsim processor. After calling this constructor, you * Create a new gpsim processor. After calling this constructor, you
* should always call codLoadtqStatus() to ensure that the cod file was * should always call codLoadStatus() to ensure that the cod file was
* loaded successfully. * loaded successfully.
*/ */
GpsimProcessor( TQString symbolFile, TQObject *parent = 0 ); GpsimProcessor( TQString symbolFile, TQObject *parent = 0 );
@ -261,7 +261,7 @@ class GpsimProcessor : public TQObject
void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; } void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; }
GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; } GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; }
enum CodLoadtqStatus enum CodLoadStatus
{ {
CodSuccess, CodSuccess,
CodFileNotFound, CodFileNotFound,
@ -284,14 +284,14 @@ class GpsimProcessor : public TQObject
/** /**
* @return status of opening the COD file * @return status of opening the COD file
* @see displayCodLoadtqStatus * @see displayCodLoadStatus
*/ */
CodLoadtqStatus codLoadtqStatus() const { return m_codLoadtqStatus; } CodLoadStatus codLoadStatus() const { return m_codLoadStatus; }
/** /**
* Popups a messagebox to the user according to the CodLoadtqStatus. Will * Popups a messagebox to the user according to the CodLoadStatus. Will
* only popup a messagebox if the CodLoadtqStatus wasn't CodSuccess. * only popup a messagebox if the CodLoadStatus wasn't CodSuccess.
*/ */
void displayCodLoadtqStatus(); void displayCodLoadStatus();
/** /**
* Returns a list of source files for the currently running program. * Returns a list of source files for the currently running program.
*/ */
@ -373,7 +373,7 @@ class GpsimProcessor : public TQObject
void emitLineReached(); void emitLineReached();
pic_processor * m_pPicProcessor; pic_processor * m_pPicProcessor;
CodLoadtqStatus m_codLoadtqStatus; CodLoadStatus m_codLoadStatus;
const TQString m_symbolFile; const TQString m_symbolFile;
RegisterSet * m_pRegisterMemory; RegisterSet * m_pRegisterMemory;
GpsimDebugger::Type m_debugMode; GpsimDebugger::Type m_debugMode;

@ -277,7 +277,7 @@ void ParallelPort::reset()
{ {
m_file = -1; m_file = -1;
m_reg[Data] = 0; m_reg[Data] = 0;
m_reg[tqStatus] = 0; m_reg[Status] = 0;
m_reg[Control] = 0; m_reg[Control] = 0;
m_outputPins = INPUT_MODE_BIT | IRTQ_MODE_BIT; m_outputPins = INPUT_MODE_BIT | IRTQ_MODE_BIT;
m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRTQ_MODE_BIT; m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRTQ_MODE_BIT;
@ -309,7 +309,7 @@ int ParallelPort::pinState( int pins )
value |= ((readFromRegister( Data ) & ((pins & DATA_PINS) >> 0)) << 0); value |= ((readFromRegister( Data ) & ((pins & DATA_PINS) >> 0)) << 0);
if ( pins & STATUS_PINS ) if ( pins & STATUS_PINS )
value |= ((readFromRegister( tqStatus ) & ((pins & STATUS_PINS) >> 8)) << 8); value |= ((readFromRegister( Status ) & ((pins & STATUS_PINS) >> 8)) << 8);
if ( pins & CONTROL_PINS ) if ( pins & CONTROL_PINS )
value |= ((readFromRegister( Control ) & ((pins & CONTROL_PINS) >> 16)) << 16); value |= ((readFromRegister( Control ) & ((pins & CONTROL_PINS) >> 16)) << 16);

@ -120,7 +120,7 @@ class ParallelPort : public Port
DATA_PINS = PIN02 | PIN03 | PIN04 | PIN05 | PIN06 DATA_PINS = PIN02 | PIN03 | PIN04 | PIN05 | PIN06
| PIN07 | PIN08 | PIN09, | PIN07 | PIN08 | PIN09,
// tqStatus Register // Status Register
// Offset: Base + 1 // Offset: Base + 1
// Read only // Read only
PIN15 = 1 << 11, // Error PIN15 = 1 << 11, // Error
@ -146,7 +146,7 @@ class ParallelPort : public Port
enum Register enum Register
{ {
Data = 0, Data = 0,
tqStatus = 1, Status = 1,
Control = 2, Control = 2,
}; };

@ -101,9 +101,9 @@ void Capacitance::time_step()
i_eq_old = i_eq_new; i_eq_old = i_eq_new;
} }
bool Capacitance::updatetqStatus() bool Capacitance::updateStatus()
{ {
b_status = Reactive::updatetqStatus(); b_status = Reactive::updateStatus();
if ( m_method == Capacitance::m_none ) b_status = false; if ( m_method == Capacitance::m_none ) b_status = false;
return b_status; return b_status;
} }
@ -111,7 +111,7 @@ bool Capacitance::updatetqStatus()
void Capacitance::setMethod( Method m ) void Capacitance::setMethod( Method m )
{ {
m_method = m; m_method = m;
updatetqStatus(); updateStatus();
} }

@ -42,7 +42,7 @@ public:
protected: protected:
virtual void updateCurrents(); virtual void updateCurrents();
virtual bool updatetqStatus(); virtual bool updateStatus();
private: private:
double m_cap; // Capacitance double m_cap; // Capacitance

@ -55,7 +55,7 @@ void Element::setElementSet( ElementSet *c )
p_eSet = c; p_eSet = c;
p_A = p_eSet->matrix(); p_A = p_eSet->matrix();
p_b = p_eSet->b(); p_b = p_eSet->b();
updatetqStatus(); updateStatus();
} }
void Element::componentDeleted() void Element::componentDeleted()
@ -113,7 +113,7 @@ void Element::setCNodes( const int n0, const int n1, const int n2, const int n3
p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l); p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l);
p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l); p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l);
p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l); p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l);
updatetqStatus(); updateStatus();
} }
void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 ) void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 )
@ -128,10 +128,10 @@ void Element::setCBranches( const int b0, const int b1, const int b2, const int
p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l; p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l;
p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l; p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l;
p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l; p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l;
updatetqStatus(); updateStatus();
} }
bool Element::updatetqStatus() bool Element::updateStatus()
{ {
// First, set status to false if all nodes in use are ground // First, set status to false if all nodes in use are ground
b_status = false; b_status = false;

@ -188,7 +188,7 @@ protected:
/** /**
* Update the status, returning b_status * Update the status, returning b_status
*/ */
virtual bool updatetqStatus(); virtual bool updateStatus();
/** /**
* Set by child class - the number of branches that the element uses * Set by child class - the number of branches that the element uses
* Typically, this is 0, but could be 1 (e.g. independent voltage source) * Typically, this is 0, but could be 1 (e.g. independent voltage source)

@ -109,9 +109,9 @@ void Inductance::time_step()
} }
bool Inductance::updatetqStatus() bool Inductance::updateStatus()
{ {
b_status = Reactive::updatetqStatus(); b_status = Reactive::updateStatus();
if ( m_method == Inductance::m_none ) if ( m_method == Inductance::m_none )
b_status = false; b_status = false;
return b_status; return b_status;
@ -121,6 +121,6 @@ bool Inductance::updatetqStatus()
void Inductance::setMethod( Method m ) void Inductance::setMethod( Method m )
{ {
m_method = m; m_method = m;
updatetqStatus(); updateStatus();
} }

@ -42,7 +42,7 @@ class Inductance : public Reactive
protected: protected:
virtual void updateCurrents(); virtual void updateCurrents();
virtual bool updatetqStatus(); virtual bool updateStatus();
private: private:
double m_inductance; // Inductance double m_inductance; // Inductance

@ -26,11 +26,11 @@ Reactive::~Reactive()
void Reactive::setDelta( double delta ) void Reactive::setDelta( double delta )
{ {
m_delta = delta; m_delta = delta;
updatetqStatus(); updateStatus();
} }
bool Reactive::updatetqStatus() bool Reactive::updateStatus()
{ {
return Element::updatetqStatus(); return Element::updateStatus();
} }

@ -34,7 +34,7 @@ public:
virtual void time_step() = 0; virtual void time_step() = 0;
protected: protected:
virtual bool updatetqStatus(); virtual bool updateStatus();
double m_delta; // Delta time interval double m_delta; // Delta time interval
}; };

@ -101,7 +101,7 @@ void FlowContainer::createBotContainerNode()
} }
TQSize FlowContainer::tqminimumSize() const TQSize FlowContainer::minimumSize() const
{ {
return TQSize( 160, 64 ); return TQSize( 160, 64 );
} }
@ -165,7 +165,7 @@ void FlowContainer::childRemoved( Item *child )
FlowPart::childRemoved(child); FlowPart::childRemoved(child);
if (!b_expanded) if (!b_expanded)
child->tqsetVisible(true); child->setVisible(true);
disconnect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) ); disconnect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) );
} }
@ -378,7 +378,7 @@ void FlowContainer::updateContainedVisibility()
for ( ItemList::iterator it = m_tqchildren.begin(); it != cEnd; ++it ) for ( ItemList::iterator it = m_tqchildren.begin(); it != cEnd; ++it )
{ {
if (*it) if (*it)
(*it)->tqsetVisible( isVisible() && b_expanded ); (*it)->setVisible( isVisible() && b_expanded );
} }
m_rectangularOverlay->setVisible( isVisible() && b_expanded ); m_rectangularOverlay->setVisible( isVisible() && b_expanded );

@ -47,7 +47,7 @@ public:
virtual void setSelected( bool yes ); virtual void setSelected( bool yes );
virtual void setVisible( bool yes ); virtual void setVisible( bool yes );
virtual TQSize tqminimumSize() const; virtual TQSize minimumSize() const;
/** /**
* Update the visibility of items, connectors, nodes in the flowcontainer * Update the visibility of items, connectors, nodes in the flowcontainer
*/ */

@ -185,7 +185,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>484</height> <height>484</height>

@ -50,7 +50,7 @@ ContextHelp::ContextHelp( KateMDI::ToolView * parent )
m_info = new TQTextBrowser( this, "" ); m_info = new TQTextBrowser( this, "" );
vtqlayout->addWidget(m_info); vtqlayout->addWidget(m_info);
m_info->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ); m_info->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Preferred ); TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Preferred );
vtqlayout->addItem(spacer3); vtqlayout->addItem(spacer3);

@ -81,7 +81,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>

@ -40,7 +40,7 @@ DoubleSpinBox::DoubleSpinBox( double lower, double upper, double minAbs, double
m_minAbsValue = minAbs; m_minAbsValue = minAbs;
m_queuedSuffix = TQString(); m_queuedSuffix = TQString();
editor()->tqsetAlignment( TQt::AlignRight ); editor()->setAlignment( TQt::AlignRight );
connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(checkIfChanged()) ); connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(checkIfChanged()) );
TQSpinBox::setMinValue( -(1<<30) ); TQSpinBox::setMinValue( -(1<<30) );
@ -129,7 +129,7 @@ double DoubleSpinBox::getMult()
if ( text.length() == 0 ) if ( text.length() == 0 )
return 1.0; return 1.0;
if ( text.tqendsWith( m_unit, false ) ) if ( text.endsWith( m_unit, false ) )
text = text.remove( text.length() - m_unit.length(), m_unit.length() ); text = text.remove( text.length() - m_unit.length(), m_unit.length() );
text.stripWhiteSpace(); text.stripWhiteSpace();

@ -233,7 +233,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>40</height>

@ -87,7 +87,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>
@ -207,7 +207,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -224,7 +224,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -241,7 +241,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>

@ -253,7 +253,7 @@ These values will apply to all components, apart from the PIC, whose pins' imped
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>

@ -35,13 +35,13 @@ MicroSelectWidget::MicroSelectWidget( TQWidget* parent, const char* name, WFlags
m_pMicroFamilyLabel->setText( i18n("Family") ); m_pMicroFamilyLabel->setText( i18n("Family") );
m_pMicroFamily = new KComboBox( FALSE, this, "m_pMicroFamily" ); m_pMicroFamily = new KComboBox( FALSE, this, "m_pMicroFamily" );
m_pMicroFamily->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); m_pMicroFamily->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
m_pMicroLabel = new TQLabel( this, "m_pMicroLabel" ); m_pMicroLabel = new TQLabel( this, "m_pMicroLabel" );
m_pMicroLabel->setText( i18n("Micro") ); m_pMicroLabel->setText( i18n("Micro") );
m_pMicro = new KComboBox( FALSE, this, "m_pMicro" ); m_pMicro = new KComboBox( FALSE, this, "m_pMicro" );
m_pMicro->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); m_pMicro->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
m_pMicro->setEditable( TRUE ); m_pMicro->setEditable( TRUE );
m_pMicro->setAutoCompletion(true); m_pMicro->setAutoCompletion(true);
updateFromAllowed(); updateFromAllowed();

@ -72,7 +72,7 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, TQWidget *par
groupBox->tqlayout()->setSpacing( 6 ); groupBox->tqlayout()->setSpacing( 6 );
groupBox->tqlayout()->setMargin( 11 ); groupBox->tqlayout()->setMargin( 11 );
TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() ); TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() );
groupBoxLayout->tqsetAlignment( TQt::AlignTop ); groupBoxLayout->setAlignment( TQt::AlignTop );
// TODO: replace this with i18n( "the type", "Type (TRIS register):" ); // TODO: replace this with i18n( "the type", "Type (TRIS register):" );
groupBoxLayout->addWidget( new TQLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 ); groupBoxLayout->addWidget( new TQLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 );
@ -370,7 +370,7 @@ void MicroSettingsDlg::savePort( int row )
TQString typeText = m_portTypeEdit[row]->text(); TQString typeText = m_portTypeEdit[row]->text();
bool typeOk = true; bool typeOk = true;
if ( typeText.tqstartsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 ); if ( typeText.startsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 );
else if ( typeText.contains( TQRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 ); else if ( typeText.contains( TQRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 );
else type = typeText.toInt( &typeOk, 2 ); else type = typeText.toInt( &typeOk, 2 );
@ -383,7 +383,7 @@ void MicroSettingsDlg::savePort( int row )
TQString stateText = m_portStateEdit[row]->text(); TQString stateText = m_portStateEdit[row]->text();
bool stateOk = true; bool stateOk = true;
if ( stateText.tqstartsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 ); if ( stateText.startsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 );
else if ( stateText.contains( TQRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 ); else if ( stateText.contains( TQRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 );
else state = stateText.toInt( &stateOk, 2 ); else state = stateText.toInt( &stateOk, 2 );
@ -406,7 +406,7 @@ void MicroSettingsDlg::saveVariable( int row )
TQString valueText = m_pWidget->variables->text( row, 1 ); TQString valueText = m_pWidget->variables->text( row, 1 );
int value; int value;
bool ok = true; bool ok = true;
if ( valueText.tqstartsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 ); if ( valueText.startsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 );
else value = valueText.toInt( &ok, 10 ); else value = valueText.toInt( &ok, 10 );
if (!ok) if (!ok)

@ -96,7 +96,7 @@ Drag it to set the type (input/output).</string>
<property name="name"> <property name="name">
<cstring>variables</cstring> <cstring>variables</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>64</height> <height>64</height>
@ -145,7 +145,7 @@ Drag it to set the type (input/output).</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>60</width> <width>60</width>
<height>20</height> <height>20</height>

@ -75,7 +75,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>500</width> <width>500</width>
<height>150</height> <height>150</height>
@ -128,13 +128,13 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>32767</width> <width>32767</width>
<height>32767</height> <height>32767</height>
@ -151,7 +151,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>0</height>

@ -64,7 +64,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
@ -83,7 +83,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>300</width> <width>300</width>
<height>0</height> <height>0</height>
@ -112,7 +112,7 @@
<property name="name"> <property name="name">
<cstring>typeCombo</cstring> <cstring>typeCombo</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>0</height> <height>0</height>

@ -48,7 +48,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>

@ -67,13 +67,13 @@
<property name="name"> <property name="name">
<cstring>probePositioner</cstring> <cstring>probePositioner</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>16</width> <width>16</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="tqmaximumSize"> <property name="maximumSize">
<size> <size>
<width>16</width> <width>16</width>
<height>32767</height> <height>32767</height>
@ -150,7 +150,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>MinimumExpanding</enum> <enum>MinimumExpanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>30</height> <height>30</height>
@ -178,7 +178,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>6</height> <height>6</height>
@ -216,7 +216,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>6</width> <width>6</width>
<height>6</height> <height>6</height>
@ -233,7 +233,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>6</width> <width>6</width>
<height>6</height> <height>6</height>

@ -20,7 +20,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>450</width> <width>450</width>
<height>0</height> <height>0</height>
@ -115,7 +115,7 @@
<property name="name"> <property name="name">
<cstring>m_pMicroSelect</cstring> <cstring>m_pMicroSelect</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -132,7 +132,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>0</height>

@ -43,7 +43,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>295</width> <width>295</width>
<height>20</height> <height>20</height>
@ -249,7 +249,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>

@ -26,7 +26,7 @@
<property name="name"> <property name="name">
<cstring>m_pMicroSelect</cstring> <cstring>m_pMicroSelect</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -43,7 +43,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>

@ -50,7 +50,7 @@
<property name="name"> <property name="name">
<cstring>m_pMicroSelect</cstring> <cstring>m_pMicroSelect</cstring>
</property> </property>
<property name="tqminimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>0</height> <height>0</height>
@ -83,7 +83,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>0</height>

@ -191,18 +191,18 @@ void PropertiesListView::slotSelectionChanged(TQListViewItem *item)
connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),this,TQT_SLOT(slotDataChanged(const TQString&,TQVariant))); connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),this,TQT_SLOT(slotDataChanged(const TQString&,TQVariant)));
int x = columnWidth(0); int x = columnWidth(0);
int y = viewportToContents(TQPoint(0,tqitemRect(p_lastItem).y())).y(); int y = viewportToContents(TQPoint(0,itemRect(p_lastItem).y())).y();
addChild(m_editor,x,y); addChild(m_editor,x,y);
m_editor->setFocus(); m_editor->setFocus();
m_editor->show(); m_editor->show();
m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height())); m_editor->setGeometry(TQRect(x,y,columnWidth(1),itemRect(p_lastItem).height()));
if(p_lastItem->data()->type() == Variant::Type::FileName) if(p_lastItem->data()->type() == Variant::Type::FileName)
{ {
// The folder button in the KURLComboBox has a minimum size taller than // The folder button in the KURLComboBox has a minimum size taller than
// the height of the ListViewItems so this is a temporary kludge to // the height of the ListViewItems so this is a temporary kludge to
// make it look slightly acceptable. // make it look slightly acceptable.
m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()+7)); m_editor->setGeometry(TQRect(x,y,columnWidth(1),itemRect(p_lastItem).height()+7));
} }
// Active the editor as appropriate // Active the editor as appropriate

@ -111,7 +111,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -225,7 +225,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -397,7 +397,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -537,7 +537,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -570,7 +570,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>16</height> <height>16</height>

@ -1142,7 +1142,7 @@ void ICNDocument::requestRerouteInvalidatedConnectors()
} }
void ICNDocument::rerouteInvalidatedConnectors() void ICNDocument::rerouteInvalidatedConnectors()
{ {
tqApp->tqprocessEvents(300); tqApp->processEvents(300);
// We only ever need to add the connector points for CNItem's when we're about to reroute... // We only ever need to add the connector points for CNItem's when we're about to reroute...
addAllItemConnectorPoints(); addAllItemConnectorPoints();

@ -173,7 +173,7 @@ public:
* Reinherit this function if you want to determine what the minimum size is * Reinherit this function if you want to determine what the minimum size is
* that this item can be resized to. * that this item can be resized to.
*/ */
virtual TQSize tqminimumSize() const { return TQSize(0,0); } virtual TQSize minimumSize() const { return TQSize(0,0); }
int offsetX() const { return m_sizeRect.x(); } int offsetX() const { return m_sizeRect.x(); }
int offsetY() const { return m_sizeRect.y(); } int offsetY() const { return m_sizeRect.y(); }
int width() const { return m_sizeRect.width(); } int width() const { return m_sizeRect.width(); }

@ -266,7 +266,7 @@ void ItemDocument::print()
p.setClipRect( 0, 0, w, h, TQPainter::CoordPainter ); p.setClipRect( 0, 0, w, h, TQPainter::CoordPainter );
// Send off the painter for drawing // Send off the painter for drawing
m_canvas->tqsetBackgroundPixmap( 0 ); m_canvas->setBackgroundPixmap( 0 );
TQRect bounding = canvasBoundingRect(); TQRect bounding = canvasBoundingRect();
unsigned int rows = (unsigned) std::ceil( double( bounding.height() ) / double( h ) ); unsigned int rows = (unsigned) std::ceil( double( bounding.height() ) / double( h ) );
@ -672,7 +672,7 @@ void ItemDocument::updateBackground()
} }
pm.setDefaultOptimization( TQPixmap::BestOptim ); pm.setDefaultOptimization( TQPixmap::BestOptim );
m_canvas->tqsetBackgroundPixmap(pm); // and the finale. m_canvas->setBackgroundPixmap(pm); // and the finale.
} }
@ -894,7 +894,7 @@ void ItemDocument::exportToImage()
TQPainter p(outputImage); TQPainter p(outputImage);
m_canvas->tqsetBackgroundPixmap(TQPixmap()); m_canvas->setBackgroundPixmap(TQPixmap());
m_canvas->drawArea( saveArea, &p ); m_canvas->drawArea( saveArea, &p );
updateBackground(); updateBackground();
@ -1304,9 +1304,9 @@ void Canvas::drawForeground ( TQPainter &p, const TQRect & clip )
return; return;
} }
p.setBrush( firstView->tqcolorGroup().background() ); p.setBrush( firstView->colorGroup().background() );
p.drawRoundRect( x, y, w+2*b, h+2*b, (8*200)/(w+2*b), (8*200)/(h+2*b) ); p.drawRoundRect( x, y, w+2*b, h+2*b, (8*200)/(w+2*b), (8*200)/(h+2*b) );
t->draw( &p, x+b, y+b, TQRect(), firstView->tqcolorGroup() ); t->draw( &p, x+b, y+b, TQRect(), firstView->colorGroup() );
delete t; delete t;
} }

@ -148,19 +148,19 @@ void ItemGroup::registerItem( Item *item )
} }
m_itemList += item; m_itemList += item;
updateAreSametqStatus(); updateAreSameStatus();
} }
void ItemGroup::unregisterItem( Item *item ) void ItemGroup::unregisterItem( Item *item )
{ {
if ( m_itemList.remove(item) > 0 ) { if ( m_itemList.remove(item) > 0 ) {
updateAreSametqStatus(); updateAreSameStatus();
} }
} }
void ItemGroup::updateAreSametqStatus() void ItemGroup::updateAreSameStatus()
{ {
b_itemsAreSameType = true; b_itemsAreSameType = true;

@ -124,7 +124,7 @@ protected:
* Subclasses must call this to unregister the item with the data interface * Subclasses must call this to unregister the item with the data interface
*/ */
void unregisterItem( Item *item ); void unregisterItem( Item *item );
void updateAreSametqStatus(); void updateAreSameStatus();
ItemList m_itemList; ItemList m_itemList;
bool b_itemsAreSameType; bool b_itemsAreSameType;

@ -237,7 +237,7 @@ TQWidget * ItemInterface::configWidget()
// Create new widget with the toolbar or dialog as the parent // Create new widget with the toolbar or dialog as the parent
TQWidget * configWidget = new TQWidget( parent, "tbConfigWidget" ); TQWidget * configWidget = new TQWidget( parent, "tbConfigWidget" );
configWidget->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1 ) ); configWidget->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1 ) );
TQHBoxLayout * configLayout = new TQHBoxLayout( configWidget ); TQHBoxLayout * configLayout = new TQHBoxLayout( configWidget );
// configLayout->setAutoAdd( true ); // configLayout->setAutoAdd( true );
@ -396,7 +396,7 @@ TQWidget * ItemInterface::configWidget()
{ {
TQSizePolicy p( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 1, 1 ); TQSizePolicy p( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 1, 1 );
editWidget->tqsetSizePolicy( p ); editWidget->setSizePolicy( p );
editWidget->setMaximumWidth( 250 ); editWidget->setMaximumWidth( 250 );
break; break;
} }

@ -86,8 +86,8 @@ ItemView::ItemView( ItemDocument * itemDocument, ViewContainer *viewContainer, u
setXMLFile( "ktechlabitemviewui.rc" ); setXMLFile( "ktechlabitemviewui.rc" );
m_pUpdateStatusTmr = new TQTimer(this); m_pUpdateStatusTmr = new TQTimer(this);
connect( m_pUpdateStatusTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updatetqStatus()) ); connect( m_pUpdateStatusTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateStatus()) );
connect( this, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(stopUpdatingtqStatus()) ); connect( this, TQT_SIGNAL(viewUnfocused()), this, TQT_SLOT(stopUpdatingStatus()) );
p_itemDocument = itemDocument; p_itemDocument = itemDocument;
m_zoomLevel = 1.; m_zoomLevel = 1.;
@ -198,7 +198,7 @@ void ItemView::dropEvent( TQDropEvent *event )
return; return;
TQString text; TQString text;
TQDataStream stream( event->tqencodedData(event->format()), IO_ReadOnly ); TQDataStream stream( event->encodedData(event->format()), IO_ReadOnly );
stream >> text; stream >> text;
TQPoint position = event->pos(); TQPoint position = event->pos();
@ -278,7 +278,7 @@ void ItemView::contentsMouseMoveEvent( TQMouseEvent *e )
p_itemDocument->m_cmManager->mouseMoveEvent( EventInfo( this, e ) ); p_itemDocument->m_cmManager->mouseMoveEvent( EventInfo( this, e ) );
if ( !m_pUpdateStatusTmr->isActive() ) if ( !m_pUpdateStatusTmr->isActive() )
startUpdatingtqStatus(); startUpdatingStatus();
} }
@ -306,7 +306,7 @@ void ItemView::contentsWheelEvent( TQWheelEvent *e )
void ItemView::dragEnterEvent( TQDragEnterEvent *event ) void ItemView::dragEnterEvent( TQDragEnterEvent *event )
{ {
startUpdatingtqStatus(); startUpdatingStatus();
KURL::List urls; KURL::List urls;
if ( KURLDrag::decode( event, urls ) ) if ( KURLDrag::decode( event, urls ) )
@ -321,14 +321,14 @@ void ItemView::dragEnterEvent( TQDragEnterEvent *event )
void ItemView::enterEvent( TQEvent * e ) void ItemView::enterEvent( TQEvent * e )
{ {
Q_UNUSED(e); Q_UNUSED(e);
startUpdatingtqStatus(); startUpdatingStatus();
} }
void ItemView::leaveEvent( TQEvent * e ) void ItemView::leaveEvent( TQEvent * e )
{ {
Q_UNUSED(e); Q_UNUSED(e);
stopUpdatingtqStatus(); stopUpdatingStatus();
// Cleanup // Cleanup
setCursor(TQt::ArrowCursor); setCursor(TQt::ArrowCursor);
@ -337,7 +337,7 @@ void ItemView::leaveEvent( TQEvent * e )
p_ktechlab->slotChangeStatusbar(TQString()); p_ktechlab->slotChangeStatusbar(TQString());
if ( p_itemDocument ) if ( p_itemDocument )
p_itemDocument->m_canvasTip->tqsetVisible(false); p_itemDocument->m_canvasTip->setVisible(false);
} }
@ -347,24 +347,24 @@ void ItemView::slotUpdateConfiguration()
m_CVBEditor->setEraseColor( TQt::white ); m_CVBEditor->setEraseColor( TQt::white );
if ( m_pUpdateStatusTmr->isActive() ) if ( m_pUpdateStatusTmr->isActive() )
startUpdatingtqStatus(); startUpdatingStatus();
} }
void ItemView::startUpdatingtqStatus() void ItemView::startUpdatingStatus()
{ {
m_pUpdateStatusTmr->stop(); m_pUpdateStatusTmr->stop();
m_pUpdateStatusTmr->start( int(1000./KTLConfig::refreshRate()) ); m_pUpdateStatusTmr->start( int(1000./KTLConfig::refreshRate()) );
} }
void ItemView::stopUpdatingtqStatus() void ItemView::stopUpdatingStatus()
{ {
m_pUpdateStatusTmr->stop(); m_pUpdateStatusTmr->stop();
} }
void ItemView::updatetqStatus() void ItemView::updateStatus()
{ {
TQPoint pos = (m_CVBEditor->mapFromGlobal( TQCursor::pos() ) + TQPoint( m_CVBEditor->contentsX(), m_CVBEditor->contentsY() )) / zoomLevel(); TQPoint pos = (m_CVBEditor->mapFromGlobal( TQCursor::pos() ) + TQPoint( m_CVBEditor->contentsX(), m_CVBEditor->contentsY() )) / zoomLevel();
@ -456,7 +456,7 @@ void ItemView::updatetqStatus()
if (p_ktechlab) if (p_ktechlab)
p_ktechlab->slotChangeStatusbar(statusbar); p_ktechlab->slotChangeStatusbar(statusbar);
canvasTip->tqsetVisible(displayTip); canvasTip->setVisible(displayTip);
} }
//END class ItemView //END class ItemView

@ -44,15 +44,15 @@ class ItemView : public View
void zoomIn(); void zoomIn();
void zoomOut(); void zoomOut();
void scrollToMouse( const TQPoint &pos ); void scrollToMouse( const TQPoint &pos );
virtual void updatetqStatus(); virtual void updateStatus();
protected slots: protected slots:
/** /**
* Called when the user changes the configuration. * Called when the user changes the configuration.
*/ */
virtual void slotUpdateConfiguration(); virtual void slotUpdateConfiguration();
void startUpdatingtqStatus(); void startUpdatingStatus();
void stopUpdatingtqStatus(); void stopUpdatingStatus();
protected: protected:
void updateZoomActions(); void updateZoomActions();

@ -105,7 +105,7 @@ void KTechlab::show()
void KTechlab::load( const KURL & url ) void KTechlab::load( const KURL & url )
{ {
if ( url.url().tqendsWith( ".ktechlab", false ) ) if ( url.url().endsWith( ".ktechlab", false ) )
{ {
// This is a ktechlab project; it has to be handled separetly from a // This is a ktechlab project; it has to be handled separetly from a
// normal file. // normal file.
@ -647,8 +647,8 @@ void KTechlab::saveProperties( KConfig *conf )
conf->setGroup("KateMDI"); conf->setGroup("KateMDI");
int scnum = TQApplication::desktop()->screenNumber(parentWidget()); int scnum = TQApplication::desktop()->screenNumber(parentWidget());
TQRect desk = TQApplication::desktop()->screenGeometry(scnum); TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
conf->deleteEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()) ); conf->deleteEntry( TQString::fromLatin1("Width %1").tqarg(desk.width()) );
conf->deleteEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()) ); conf->deleteEntry( TQString::fromLatin1("Height %1").tqarg(desk.height()) );
conf->sync(); conf->sync();
} }

@ -83,7 +83,7 @@ void Node::setVisible( bool yes )
if ( isVisible() == yes ) if ( isVisible() == yes )
return; return;
TQCanvasPolygon::tqsetVisible(yes); TQCanvasPolygon::setVisible(yes);
const ConnectorList::iterator inputEnd = m_inputConnectorList.end(); const ConnectorList::iterator inputEnd = m_inputConnectorList.end();
for ( ConnectorList::iterator it = m_inputConnectorList.begin(); it != inputEnd; ++it ) for ( ConnectorList::iterator it = m_inputConnectorList.begin(); it != inputEnd; ++it )

@ -377,10 +377,10 @@ void PicItem::updateVisibility()
const PinItemList::iterator end = m_pinItemList.end(); const PinItemList::iterator end = m_pinItemList.end();
for ( PinItemList::iterator it = m_pinItemList.begin(); it != end; ++it ) for ( PinItemList::iterator it = m_pinItemList.begin(); it != end; ++it )
(*it)->tqsetVisible(m_bExpanded); (*it)->setVisible(m_bExpanded);
if ( Button * btn = button("settings") ) if ( Button * btn = button("settings") )
btn->tqsetVisible(m_bExpanded); btn->setVisible(m_bExpanded);
} }

@ -45,7 +45,7 @@ void ResizeOverlay::showResizeHandles( bool show )
const ResizeHandleMap::iterator end = m_resizeHandleMap.end(); const ResizeHandleMap::iterator end = m_resizeHandleMap.end();
for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it ) for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it )
{ {
it.data()->tqsetVisible(b_showResizeHandles && b_visible); it.data()->setVisible(b_showResizeHandles && b_visible);
} }
} }
@ -56,7 +56,7 @@ void ResizeOverlay::setVisible( bool visible )
const ResizeHandleMap::iterator end = m_resizeHandleMap.end(); const ResizeHandleMap::iterator end = m_resizeHandleMap.end();
for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it ) for ( ResizeHandleMap::iterator it = m_resizeHandleMap.begin(); it != end; ++it )
{ {
it.data()->tqsetVisible(b_showResizeHandles && b_visible); it.data()->setVisible(b_showResizeHandles && b_visible);
} }
} }
@ -345,8 +345,8 @@ TQRect RectangularOverlay::getSizeRect( bool *ok, bool *widthOk, bool *heightOk
int(m_tl->y() - p_item->y()), int(m_tl->y() - p_item->y()),
width, height ); width, height );
*widthOk = sizeRect.width() >= p_item->tqminimumSize().width(); *widthOk = sizeRect.width() >= p_item->minimumSize().width();
*heightOk = sizeRect.height() >= p_item->tqminimumSize().height(); *heightOk = sizeRect.height() >= p_item->minimumSize().height();
*ok = *widthOk && *heightOk; *ok = *widthOk && *heightOk;
return sizeRect; return sizeRect;

@ -369,7 +369,7 @@ void TextView::slotWordUnhovered()
//BEGIN class TextViewEventFilter //BEGIN class TextViewEventFilter
TextViewEventFilter::TextViewEventFilter( TextView * textView ) TextViewEventFilter::TextViewEventFilter( TextView * textView )
{ {
m_hovertqStatus = Sleeping; m_hoverStatus = Sleeping;
m_pTextView = textView; m_pTextView = textView;
m_lastLine = m_lastCol = -1; m_lastLine = m_lastCol = -1;
@ -410,14 +410,14 @@ bool TextViewEventFilter::eventFilter( TQObject *, TQEvent * e )
void TextViewEventFilter::hoverTimeout() void TextViewEventFilter::hoverTimeout()
{ {
m_pSleepTimer->stop(); m_pSleepTimer->stop();
m_hovertqStatus = Active; m_hoverStatus = Active;
emit wordHoveredOver( m_lastWord, m_lastLine, m_lastCol ); emit wordHoveredOver( m_lastWord, m_lastLine, m_lastCol );
} }
void TextViewEventFilter::gotoSleep() void TextViewEventFilter::gotoSleep()
{ {
m_hovertqStatus = Sleeping; m_hoverStatus = Sleeping;
m_lastWord = TQString(); m_lastWord = TQString();
emit wordUnhovered(); emit wordUnhovered();
m_pHoverTimer->stop(); m_pHoverTimer->stop();
@ -441,8 +441,8 @@ void TextViewEventFilter::updateHovering( const TQString & currentWord, int line
if ( currentWord.isEmpty() ) if ( currentWord.isEmpty() )
{ {
if ( m_hovertqStatus == Active ) if ( m_hoverStatus == Active )
m_hovertqStatus = Hidden; m_hoverStatus = Hidden;
emit wordUnhovered(); emit wordUnhovered();
if ( !m_pSleepTimer->isActive() ) if ( !m_pSleepTimer->isActive() )
@ -451,7 +451,7 @@ void TextViewEventFilter::updateHovering( const TQString & currentWord, int line
return; return;
} }
if ( m_hovertqStatus != Sleeping ) if ( m_hoverStatus != Sleeping )
emit wordHoveredOver( currentWord, line, col ); emit wordHoveredOver( currentWord, line, col );
else else
m_pHoverTimer->start( 700, true ); m_pHoverTimer->start( 700, true );

@ -141,7 +141,7 @@ class TextViewEventFilter : public TQObject
void slotNoWordTimeout(); void slotNoWordTimeout();
protected: protected:
enum HovertqStatus enum HoverStatus
{ {
/** /**
* We are currently hovering - wordHoveredOver was emitted, and * We are currently hovering - wordHoveredOver was emitted, and
@ -186,7 +186,7 @@ class TextViewEventFilter : public TQObject
TQString m_lastWord; TQString m_lastWord;
int m_lastLine; int m_lastLine;
int m_lastCol; int m_lastCol;
HovertqStatus m_hovertqStatus; HoverStatus m_hoverStatus;
}; };
#endif #endif

@ -27,7 +27,7 @@ VariableLabel::VariableLabel( TextView * parent )
setAutoMask( FALSE ); setAutoMask( FALSE );
setFrameStyle( TQFrame::Plain | TQFrame::Box ); setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 ); setLineWidth( 1 );
tqsetAlignment( AlignAuto | AlignTop ); setAlignment( AlignAuto | AlignTop );
setIndent(0); setIndent(0);
polish(); polish();
adjustSize(); adjustSize();

@ -49,9 +49,9 @@ class KVSSBSep : public TQWidget {
void paintEvent( TQPaintEvent *e ) void paintEvent( TQPaintEvent *e )
{ {
TQPainter p( this ); TQPainter p( this );
p.setPen( tqcolorGroup().shadow() ); p.setPen( colorGroup().shadow() );
p.drawLine( e->rect().left(), 0, e->rect().right(), 0 ); p.drawLine( e->rect().left(), 0, e->rect().right(), 0 );
p.setPen( ((View*)parentWidget())->isFocused() ? tqcolorGroup().light() : tqcolorGroup().midlight() ); p.setPen( ((View*)parentWidget())->isFocused() ? colorGroup().light() : colorGroup().midlight() );
p.drawLine( e->rect().left(), 1, e->rect().right(), 1 ); p.drawLine( e->rect().left(), 1, e->rect().right(), 1 );
} }
}; };

Loading…
Cancel
Save