Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/8/head
Michele Calgaro 7 months ago
parent ba71773a92
commit c5554a5f82
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -437,7 +437,7 @@ SliderWidget::SliderWidget( TQWidget *parent )
Slider::Slider( const TQString & id, CNItem * parent, const TQRect & r, TQCanvas * canvas ) Slider::Slider( const TQString & id, CNItem * parent, const TQRect & r, TQCanvas * canvas )
: Widget( id, parent, r, canvas ) : Widget( id, parent, r, canvas )
{ {
m_orientation = Qt::Vertical; m_orientation = TQt::Vertical;
m_slider = new SliderWidget(0l); m_slider = new SliderWidget(0l);
m_slider->setPaletteBackgroundColor(TQt::white); m_slider->setPaletteBackgroundColor(TQt::white);
m_slider->setPaletteForegroundColor(TQt::white); m_slider->setPaletteForegroundColor(TQt::white);
@ -531,7 +531,7 @@ void Slider::slotValueChanged( int value )
parent()->sliderValueChanged(id(),value); parent()->sliderValueChanged(id(),value);
} }
void Slider::setOrientation( Qt::Orientation o ) void Slider::setOrientation( TQt::Orientation o )
{ {
m_orientation = o; m_orientation = o;
posChanged(); posChanged();
@ -541,11 +541,11 @@ void Slider::posChanged()
{ {
Widget::posChanged(); Widget::posChanged();
if ( m_orientation == Qt::Vertical ) if ( m_orientation == TQt::Vertical )
m_slider->setOrientation( (m_angleDegrees%180 == 0) ? Qt::Vertical : Qt::Horizontal ); m_slider->setOrientation( (m_angleDegrees%180 == 0) ? TQt::Vertical : TQt::Horizontal );
else else
m_slider->setOrientation( (m_angleDegrees%180 == 0) ? Qt::Horizontal : Qt::Vertical ); m_slider->setOrientation( (m_angleDegrees%180 == 0) ? TQt::Horizontal : TQt::Vertical );
} }
//END Class Slider //END Class Slider

@ -278,7 +278,7 @@ class Slider : public Widget
virtual TQWidget *widget() const; virtual TQWidget *widget() const;
int value() const; int value() const;
void setValue( int value ); void setValue( int value );
void setOrientation( Qt::Orientation o ); void setOrientation( TQt::Orientation o );
protected: protected:
virtual void posChanged(); virtual void posChanged();
@ -288,7 +288,7 @@ class Slider : public Widget
private: private:
SliderWidget *m_slider; SliderWidget *m_slider;
Qt::Orientation m_orientation; TQt::Orientation m_orientation;
}; };
#endif #endif

@ -156,7 +156,7 @@ Button* CIWidgetMgr::addButton( const TQString &id, const TQRect & pos, TQPixmap
} }
Slider* CIWidgetMgr::addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const TQRect & pos ) Slider* CIWidgetMgr::addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, TQt::Orientation orientation, const TQRect & pos )
{ {
Slider *slider = new Slider( id, p_cnItem, pos, p_canvas ); Slider *slider = new Slider( id, p_cnItem, pos, p_canvas );
TQSlider *qslider = dynamic_cast<TQSlider*>(slider->widget()); TQSlider *qslider = dynamic_cast<TQSlider*>(slider->widget());

@ -50,7 +50,7 @@ public:
/** /**
* Adds a slider with the given id and values to the position * Adds a slider with the given id and values to the position
*/ */
Slider* addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, const TQRect & pos ); Slider* addSlider( const TQString &id, int minValue, int maxValue, int pageStep, int value, TQt::Orientation orientation, const TQRect & pos );
/** /**
* Essentially the same as addDisplayText, but displays a button with * Essentially the same as addDisplayText, but displays a button with
* text on it. The virtual functions buttonPressed( const TQString &id ) and * text on it. The virtual functions buttonPressed( const TQString &id ) and

@ -39,7 +39,7 @@ public:
Node *node; //Pointer to the node Node *node; //Pointer to the node
double x; // X position relative to item double x; // X position relative to item
double y; // Y position relative to item double y; // Y position relative to item
int orientation; // Qt::Orientation relative to item int orientation; // TQt::Orientation relative to item
}; };
typedef TQMap<TQString, TQString> StringMap; typedef TQMap<TQString, TQString> StringMap;

@ -56,12 +56,12 @@ DPLine::DPLine( ItemDocument *itemDocument, bool newItem, const char *id )
createProperty( "line-style", Variant::Type::PenStyle ); createProperty( "line-style", Variant::Type::PenStyle );
property("line-style")->setCaption( i18n("Line Style") ); property("line-style")->setCaption( i18n("Line Style") );
property("line-style")->setAdvanced(true); property("line-style")->setAdvanced(true);
setDataPenStyle( "line-style", Qt::SolidLine ); setDataPenStyle( "line-style", TQt::SolidLine );
createProperty( "cap-style", Variant::Type::PenCapStyle ); createProperty( "cap-style", Variant::Type::PenCapStyle );
property("cap-style")->setCaption( i18n("Cap Style") ); property("cap-style")->setCaption( i18n("Cap Style") );
property("cap-style")->setAdvanced(true); property("cap-style")->setAdvanced(true);
setDataPenCapStyle( "cap-style", Qt::FlatCap ); setDataPenCapStyle( "cap-style", TQt::FlatCap );
} }
DPLine::~DPLine() DPLine::~DPLine()
@ -84,7 +84,7 @@ void DPLine::dataChanged()
unsigned( dataInt("line-width") ), unsigned( dataInt("line-width") ),
getDataPenStyle("line-style"), getDataPenStyle("line-style"),
getDataPenCapStyle("cap-style"), getDataPenCapStyle("cap-style"),
Qt::MiterJoin ) ); TQt::MiterJoin ) );
postResize(); // in case the pen width has changed postResize(); // in case the pen width has changed
update(); update();
@ -171,7 +171,7 @@ DPArrow::DPArrow( ItemDocument *itemDocument, bool newItem, const char *id )
// We don't want to use the square cap style as it screws up drawing our arrow head // We don't want to use the square cap style as it screws up drawing our arrow head
TQStringList allowed = property("cap-style")->allowed(); TQStringList allowed = property("cap-style")->allowed();
allowed.remove( DrawPart::penCapStyleToName( Qt::SquareCap ) ); allowed.remove( DrawPart::penCapStyleToName( TQt::SquareCap ) );
property("cap-style")->setAllowed(allowed); property("cap-style")->setAllowed(allowed);
} }
@ -211,7 +211,7 @@ void DPArrow::drawShape( TQPainter & p )
// Draw arrowhead // Draw arrowhead
TQPen pen = p.pen(); TQPen pen = p.pen();
pen.setCapStyle( Qt::RoundCap ); pen.setCapStyle( TQt::RoundCap );
p.setPen(pen); p.setPen(pen);
p.setBrush(pen.color()); p.setBrush(pen.color());
TQPointArray pa(3); TQPointArray pa(3);

@ -39,9 +39,9 @@ Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value ty
if ( type == Variant::Type::PenStyle ) if ( type == Variant::Type::PenStyle )
{ {
TQStringList penStyles; TQStringList penStyles;
penStyles << DrawPart::penStyleToName(Qt::SolidLine) << DrawPart::penStyleToName(Qt::DashLine) penStyles << DrawPart::penStyleToName(TQt::SolidLine) << DrawPart::penStyleToName(TQt::DashLine)
<< DrawPart::penStyleToName(Qt::DotLine) << DrawPart::penStyleToName(Qt::DashDotLine) << DrawPart::penStyleToName(TQt::DotLine) << DrawPart::penStyleToName(TQt::DashDotLine)
<< DrawPart::penStyleToName(Qt::DashDotDotLine); << DrawPart::penStyleToName(TQt::DashDotDotLine);
Variant * v = createProperty( id, Variant::Type::String ); Variant * v = createProperty( id, Variant::Type::String );
v->setType( Variant::Type::PenStyle ); v->setType( Variant::Type::PenStyle );
@ -52,8 +52,8 @@ Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value ty
if ( type == Variant::Type::PenCapStyle ) if ( type == Variant::Type::PenCapStyle )
{ {
TQStringList penCapStyles; TQStringList penCapStyles;
penCapStyles << DrawPart::penCapStyleToName(Qt::FlatCap) << DrawPart::penCapStyleToName(Qt::SquareCap) penCapStyles << DrawPart::penCapStyleToName(TQt::FlatCap) << DrawPart::penCapStyleToName(TQt::SquareCap)
<< DrawPart::penCapStyleToName(Qt::RoundCap); << DrawPart::penCapStyleToName(TQt::RoundCap);
Variant * v = createProperty( id, Variant::Type::String ); Variant * v = createProperty( id, Variant::Type::String );
v->setType( Variant::Type::PenCapStyle ); v->setType( Variant::Type::PenCapStyle );
@ -65,19 +65,19 @@ Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value ty
} }
Qt::PenStyle DrawPart::getDataPenStyle( const TQString & id ) TQt::PenStyle DrawPart::getDataPenStyle( const TQString & id )
{ {
return nameToPenStyle( dataString(id) ); return nameToPenStyle( dataString(id) );
} }
Qt::PenCapStyle DrawPart::getDataPenCapStyle( const TQString & id ) TQt::PenCapStyle DrawPart::getDataPenCapStyle( const TQString & id )
{ {
return nameToPenCapStyle( dataString(id) ); return nameToPenCapStyle( dataString(id) );
} }
void DrawPart::setDataPenStyle( const TQString & id, Qt::PenStyle value ) void DrawPart::setDataPenStyle( const TQString & id, TQt::PenStyle value )
{ {
property(id)->setValue( penStyleToName(value) ); property(id)->setValue( penStyleToName(value) );
} }
void DrawPart::setDataPenCapStyle( const TQString & id, Qt::PenCapStyle value ) void DrawPart::setDataPenCapStyle( const TQString & id, TQt::PenCapStyle value )
{ {
property(id)->setValue( penCapStyleToName(value) ); property(id)->setValue( penCapStyleToName(value) );
} }
@ -144,121 +144,121 @@ void DrawPart::restoreFromItemData( const ItemData &itemData )
TQString DrawPart::penStyleToID( Qt::PenStyle style ) TQString DrawPart::penStyleToID( TQt::PenStyle style )
{ {
switch (style) switch (style)
{ {
case Qt::SolidLine: case TQt::SolidLine:
return "SolidLine"; return "SolidLine";
case Qt::NoPen: case TQt::NoPen:
return "NoPen"; return "NoPen";
case Qt::DashLine: case TQt::DashLine:
return "DashLine"; return "DashLine";
case Qt::DotLine: case TQt::DotLine:
return "DotLine"; return "DotLine";
case Qt::DashDotLine: case TQt::DashDotLine:
return "DashDotLine"; return "DashDotLine";
case Qt::DashDotDotLine: case TQt::DashDotDotLine:
return "DashDotDotLine"; return "DashDotDotLine";
case Qt::MPenStyle: case TQt::MPenStyle:
default: default:
return ""; // ?! return ""; // ?!
} }
} }
Qt::PenStyle DrawPart::idToPenStyle( const TQString & id ) TQt::PenStyle DrawPart::idToPenStyle( const TQString & id )
{ {
if ( id == "NoPen" ) if ( id == "NoPen" )
return Qt::NoPen; return TQt::NoPen;
if ( id == "DashLine" ) if ( id == "DashLine" )
return Qt::DashLine; return TQt::DashLine;
if ( id == "DotLine" ) if ( id == "DotLine" )
return Qt::DotLine; return TQt::DotLine;
if ( id == "DashDotLine" ) if ( id == "DashDotLine" )
return Qt::DashDotLine; return TQt::DashDotLine;
if ( id == "DashDotDotLine" ) if ( id == "DashDotDotLine" )
return Qt::DashDotDotLine; return TQt::DashDotDotLine;
return Qt::SolidLine; return TQt::SolidLine;
} }
TQString DrawPart::penCapStyleToID( Qt::PenCapStyle style ) TQString DrawPart::penCapStyleToID( TQt::PenCapStyle style )
{ {
switch (style) switch (style)
{ {
case Qt::FlatCap: case TQt::FlatCap:
return "FlatCap"; return "FlatCap";
case Qt::SquareCap: case TQt::SquareCap:
return "SquareCap"; return "SquareCap";
case Qt::RoundCap: case TQt::RoundCap:
return "RoundCap"; return "RoundCap";
case Qt::MPenCapStyle: case TQt::MPenCapStyle:
default: default:
return ""; // ?! return ""; // ?!
} }
} }
Qt::PenCapStyle DrawPart::idToPenCapStyle( const TQString & id ) TQt::PenCapStyle DrawPart::idToPenCapStyle( const TQString & id )
{ {
if ( id == "SquareCap" ) if ( id == "SquareCap" )
return Qt::SquareCap; return TQt::SquareCap;
if ( id == "RoundCap" ) if ( id == "RoundCap" )
return Qt::RoundCap; return TQt::RoundCap;
return Qt::FlatCap; return TQt::FlatCap;
} }
TQString DrawPart::penStyleToName( Qt::PenStyle style ) TQString DrawPart::penStyleToName( TQt::PenStyle style )
{ {
switch (style) switch (style)
{ {
case Qt::SolidLine: case TQt::SolidLine:
return i18n("Solid"); return i18n("Solid");
case Qt::NoPen: case TQt::NoPen:
return i18n("None"); return i18n("None");
case Qt::DashLine: case TQt::DashLine:
return i18n("Dash"); return i18n("Dash");
case Qt::DotLine: case TQt::DotLine:
return i18n("Dot"); return i18n("Dot");
case Qt::DashDotLine: case TQt::DashDotLine:
return i18n("Dash Dot"); return i18n("Dash Dot");
case Qt::DashDotDotLine: case TQt::DashDotDotLine:
return i18n("Dash Dot Dot"); return i18n("Dash Dot Dot");
case Qt::MPenStyle: case TQt::MPenStyle:
default: default:
return ""; // ?! return ""; // ?!
} }
} }
Qt::PenStyle DrawPart::nameToPenStyle( const TQString & name ) TQt::PenStyle DrawPart::nameToPenStyle( const TQString & name )
{ {
if ( name == i18n("None") ) if ( name == i18n("None") )
return Qt::NoPen; return TQt::NoPen;
if ( name == i18n("Dash") ) if ( name == i18n("Dash") )
return Qt::DashLine; return TQt::DashLine;
if ( name == i18n("Dot") ) if ( name == i18n("Dot") )
return Qt::DotLine; return TQt::DotLine;
if ( name == i18n("Dash Dot") ) if ( name == i18n("Dash Dot") )
return Qt::DashDotLine; return TQt::DashDotLine;
if ( name == i18n("Dash Dot Dot") ) if ( name == i18n("Dash Dot Dot") )
return Qt::DashDotDotLine; return TQt::DashDotDotLine;
return Qt::SolidLine; return TQt::SolidLine;
} }
TQString DrawPart::penCapStyleToName( Qt::PenCapStyle style ) TQString DrawPart::penCapStyleToName( TQt::PenCapStyle style )
{ {
switch (style) switch (style)
{ {
case Qt::FlatCap: case TQt::FlatCap:
return i18n("Flat"); return i18n("Flat");
case Qt::SquareCap: case TQt::SquareCap:
return i18n("Square"); return i18n("Square");
case Qt::RoundCap: case TQt::RoundCap:
return i18n("Round"); return i18n("Round");
case Qt::MPenCapStyle: case TQt::MPenCapStyle:
default: default:
return ""; // ?! return ""; // ?!
} }
} }
Qt::PenCapStyle DrawPart::nameToPenCapStyle( const TQString & name ) TQt::PenCapStyle DrawPart::nameToPenCapStyle( const TQString & name )
{ {
if ( name == i18n("Square") ) if ( name == i18n("Square") )
return Qt::SquareCap; return TQt::SquareCap;
if ( name == i18n("Round") ) if ( name == i18n("Round") )
return Qt::RoundCap; return TQt::RoundCap;
return Qt::FlatCap; return TQt::FlatCap;
} }

@ -43,26 +43,26 @@ class DrawPart : public Item
virtual Variant * createProperty( const TQString & id, Variant::Type::Value type ); virtual Variant * createProperty( const TQString & id, Variant::Type::Value type );
Qt::PenStyle getDataPenStyle( const TQString & id ); TQt::PenStyle getDataPenStyle( const TQString & id );
Qt::PenCapStyle getDataPenCapStyle( const TQString & id ); TQt::PenCapStyle getDataPenCapStyle( const TQString & id );
void setDataPenStyle( const TQString & id, Qt::PenStyle value ); void setDataPenStyle( const TQString & id, TQt::PenStyle value );
void setDataPenCapStyle( const TQString & id, Qt::PenCapStyle value ); void setDataPenCapStyle( const TQString & id, TQt::PenCapStyle value );
virtual ItemData itemData() const; virtual ItemData itemData() const;
virtual void restoreFromItemData( const ItemData &itemData ); virtual void restoreFromItemData( const ItemData &itemData );
// Convention for following functions: name is i18n'd name of style, id is the english one // Convention for following functions: name is i18n'd name of style, id is the english one
static TQString penStyleToID( Qt::PenStyle style ); static TQString penStyleToID( TQt::PenStyle style );
static Qt::PenStyle idToPenStyle( const TQString & id ); static TQt::PenStyle idToPenStyle( const TQString & id );
static TQString penCapStyleToID( Qt::PenCapStyle style ); static TQString penCapStyleToID( TQt::PenCapStyle style );
static Qt::PenCapStyle idToPenCapStyle( const TQString & id ); static TQt::PenCapStyle idToPenCapStyle( const TQString & id );
static TQString penStyleToName( Qt::PenStyle style ); static TQString penStyleToName( TQt::PenStyle style );
static Qt::PenStyle nameToPenStyle( const TQString & name ); static TQt::PenStyle nameToPenStyle( const TQString & name );
static TQString penCapStyleToName( Qt::PenCapStyle style ); static TQString penCapStyleToName( TQt::PenCapStyle style );
static Qt::PenCapStyle nameToPenCapStyle( const TQString & name ); static TQt::PenCapStyle nameToPenCapStyle( const TQString & name );
}; };
#endif #endif

@ -65,7 +65,7 @@ DPRectangle::DPRectangle( ItemDocument *itemDocument, bool newItem, const char *
createProperty( "line-style", Variant::Type::PenStyle ); createProperty( "line-style", Variant::Type::PenStyle );
property("line-style")->setAdvanced(true); property("line-style")->setAdvanced(true);
setDataPenStyle( "line-style", Qt::SolidLine ); setDataPenStyle( "line-style", TQt::SolidLine );
} }
DPRectangle::~DPRectangle() DPRectangle::~DPRectangle()
@ -87,14 +87,14 @@ void DPRectangle::dataChanged()
bool displayBackground = dataBool("background"); bool displayBackground = dataBool("background");
TQColor line_color = dataColor("line-color"); TQColor line_color = dataColor("line-color");
unsigned width = unsigned( dataInt("line-width") ); unsigned width = unsigned( dataInt("line-width") );
Qt::PenStyle style = getDataPenStyle("line-style"); TQt::PenStyle style = getDataPenStyle("line-style");
setPen( TQPen( line_color, width, style ) ); setPen( TQPen( line_color, width, style ) );
if (displayBackground) if (displayBackground)
setBrush( dataColor("background-color") ); setBrush( dataColor("background-color") );
else else
setBrush( Qt::NoBrush ); setBrush( TQt::NoBrush );
postResize(); postResize();
update(); update();

@ -48,7 +48,7 @@ ECPotentiometer::ECPotentiometer( ICNDocument *icnDocument, bool newItem, const
m_r1 = createResistance( createPin( -8, -24, 90, "n1" ), m_p1, 1. ); m_r1 = createResistance( createPin( -8, -24, 90, "n1" ), m_p1, 1. );
m_r2 = createResistance( createPin( -8, 24, 270, "n2" ), m_p1, 1. ); m_r2 = createResistance( createPin( -8, 24, 270, "n2" ), m_p1, 1. );
Slider * s = addSlider( "slider", 0, 100, 5, 50, Qt::Vertical, TQRect( 0, -16, 16, 32 ) ); Slider * s = addSlider( "slider", 0, 100, 5, 50, TQt::Vertical, TQRect( 0, -16, 16, 32 ) );
m_pSlider = static_cast<TQSlider*>(s->widget()); m_pSlider = static_cast<TQSlider*>(s->widget());
createProperty( "resistance", Variant::Type::Double ); createProperty( "resistance", Variant::Type::Double );

@ -30,7 +30,7 @@ EventInfo::EventInfo( ItemView *itemView, TQMouseEvent *e )
{ {
pos = e->pos()/itemView->zoomLevel(); pos = e->pos()/itemView->zoomLevel();
globalPos = e->globalPos(); globalPos = e->globalPos();
isRightClick = e->button() == Qt::RightButton; isRightClick = e->button() == TQt::RightButton;
ctrlPressed = e->state() & TQt::ControlButton; ctrlPressed = e->state() & TQt::ControlButton;
shiftPressed = e->state() & TQt::ShiftButton; shiftPressed = e->state() & TQt::ShiftButton;
altPressed = e->state() & TQt::AltButton; altPressed = e->state() & TQt::AltButton;
@ -38,7 +38,7 @@ EventInfo::EventInfo( ItemView *itemView, TQMouseEvent *e )
qcanvasItemClickedOn = id->itemAtTop(pos); qcanvasItemClickedOn = id->itemAtTop(pos);
itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None; itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None;
scrollDelta = 0; scrollDelta = 0;
scrollOrientation = Qt::Vertical; scrollOrientation = TQt::Vertical;
} }
@ -69,7 +69,7 @@ void EventInfo::reset()
qcanvasItemClickedOn = 0l; qcanvasItemClickedOn = 0l;
itemRtti = ItemDocument::RTTI::None; itemRtti = ItemDocument::RTTI::None;
scrollDelta = 0; scrollDelta = 0;
scrollOrientation = Qt::Vertical; scrollOrientation = TQt::Vertical;
} }
@ -77,8 +77,8 @@ TQMouseEvent *EventInfo::mousePressEvent( int dx, int dy ) const
{ {
return new TQMouseEvent( TQEvent::MouseButtonPress, return new TQMouseEvent( TQEvent::MouseButtonPress,
pos + TQPoint( dx, dy ), pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton), (isRightClick ? TQt::RightButton : TQt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) | (isRightClick ? TQt::RightButton : TQt::LeftButton) |
(ctrlPressed ? TQt::ControlButton : 0 ) | (ctrlPressed ? TQt::ControlButton : 0 ) |
(shiftPressed ? TQt::ShiftButton : 0 ) | (shiftPressed ? TQt::ShiftButton : 0 ) |
(altPressed ? TQt::AltButton : 0 ) ); (altPressed ? TQt::AltButton : 0 ) );
@ -89,8 +89,8 @@ TQMouseEvent *EventInfo::mouseReleaseEvent( int dx, int dy ) const
{ {
return new TQMouseEvent( TQEvent::MouseButtonRelease, return new TQMouseEvent( TQEvent::MouseButtonRelease,
pos + TQPoint( dx, dy ), pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton), (isRightClick ? TQt::RightButton : TQt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) | (isRightClick ? TQt::RightButton : TQt::LeftButton) |
(ctrlPressed ? TQt::ControlButton : 0 ) | (ctrlPressed ? TQt::ControlButton : 0 ) |
(shiftPressed ? TQt::ShiftButton : 0 ) | (shiftPressed ? TQt::ShiftButton : 0 ) |
(altPressed ? TQt::AltButton : 0 ) ); (altPressed ? TQt::AltButton : 0 ) );
@ -101,8 +101,8 @@ TQMouseEvent *EventInfo::mouseDoubleClickEvent( int dx, int dy ) const
{ {
return new TQMouseEvent( TQEvent::MouseButtonDblClick, return new TQMouseEvent( TQEvent::MouseButtonDblClick,
pos + TQPoint( dx, dy ), pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton), (isRightClick ? TQt::RightButton : TQt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) | (isRightClick ? TQt::RightButton : TQt::LeftButton) |
(ctrlPressed ? TQt::ControlButton : 0 ) | (ctrlPressed ? TQt::ControlButton : 0 ) |
(shiftPressed ? TQt::ShiftButton : 0 ) | (shiftPressed ? TQt::ShiftButton : 0 ) |
(altPressed ? TQt::AltButton : 0 ) ); (altPressed ? TQt::AltButton : 0 ) );
@ -113,7 +113,7 @@ TQMouseEvent *EventInfo::mouseMoveEvent( int dx, int dy ) const
{ {
return new TQMouseEvent( TQEvent::MouseMove, return new TQMouseEvent( TQEvent::MouseMove,
pos + TQPoint( dx, dy ), pos + TQPoint( dx, dy ),
Qt::NoButton, TQt::NoButton,
(ctrlPressed ? TQt::ControlButton : 0 ) | (ctrlPressed ? TQt::ControlButton : 0 ) |
(shiftPressed ? TQt::ShiftButton : 0 ) | (shiftPressed ? TQt::ShiftButton : 0 ) |
(altPressed ? TQt::AltButton : 0 ) ); (altPressed ? TQt::AltButton : 0 ) );

@ -45,7 +45,7 @@ public:
TQCanvasItem *qcanvasItemClickedOn; TQCanvasItem *qcanvasItemClickedOn;
int itemRtti; int itemRtti;
short scrollDelta; short scrollDelta;
Qt::Orientation scrollOrientation; TQt::Orientation scrollOrientation;
bool isRightClick:1; bool isRightClick:1;
bool ctrlPressed:1; bool ctrlPressed:1;
bool shiftPressed:1; bool shiftPressed:1;

@ -66,7 +66,7 @@ ItemEditor::ItemEditor( KateMDI::ToolView * parent )
connect(m_mergeBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(mergeProperties())); connect(m_mergeBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(mergeProperties()));
h1Layout->addWidget(m_mergeBtn); h1Layout->addWidget(m_mergeBtn);
// Qt::Orientation widget stuff // TQt::Orientation widget stuff
TQHBoxLayout *h2Layout = new TQHBoxLayout( vlayout, 6 ); TQHBoxLayout *h2Layout = new TQHBoxLayout( vlayout, 6 );
TQSpacerItem *spacer2 = new TQSpacerItem( 1, 1 ); TQSpacerItem *spacer2 = new TQSpacerItem( 1, 1 );
h2Layout->addItem(spacer2); h2Layout->addItem(spacer2);

@ -23,7 +23,7 @@
#include <tqwhatsthis.h> #include <tqwhatsthis.h>
MicroSelectWidget::MicroSelectWidget( TQWidget* parent, const char* name, WFlags ) MicroSelectWidget::MicroSelectWidget( TQWidget* parent, const char* name, WFlags )
: TQGroupBox( 4, Qt::Horizontal, i18n("Microprocessor"), parent, name ) : TQGroupBox( 4, TQt::Horizontal, i18n("Microprocessor"), parent, name )
{ {
m_allowedAsmSet = AsmInfo::AsmSetAll; m_allowedAsmSet = AsmInfo::AsmSetAll;
m_allowedGpsimSupport = m_allowedFlowCodeSupport = m_allowedMicrobeSupport = MicroInfo::AllSupport; m_allowedGpsimSupport = m_allowedFlowCodeSupport = m_allowedMicrobeSupport = MicroInfo::AllSupport;

@ -68,7 +68,7 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, TQWidget *par
TQGroupBox * groupBox = new TQGroupBox( *it, m_pWidget->portsGroupBox ); TQGroupBox * groupBox = new TQGroupBox( *it, m_pWidget->portsGroupBox );
groupBox->setColumnLayout(0, Qt::Vertical ); groupBox->setColumnLayout(0, TQt::Vertical );
groupBox->layout()->setSpacing( 6 ); groupBox->layout()->setSpacing( 6 );
groupBox->layout()->setMargin( 11 ); groupBox->layout()->setMargin( 11 );
TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->layout() ); TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->layout() );

@ -109,7 +109,7 @@ void OscilloscopeView::mousePressEvent( TQMouseEvent *event )
{ {
switch ( event->button() ) switch ( event->button() )
{ {
case Qt::LeftButton: case TQt::LeftButton:
{ {
event->accept(); event->accept();
m_clickOffsetPos = event->pos().x(); m_clickOffsetPos = event->pos().x();
@ -118,7 +118,7 @@ void OscilloscopeView::mousePressEvent( TQMouseEvent *event )
return; return;
} }
case Qt::RightButton: case TQt::RightButton:
{ {
event->accept(); event->accept();

@ -35,7 +35,7 @@ namespace KateMDI {
//BEGIN SPLITTER //BEGIN SPLITTER
Splitter::Splitter(Qt::Orientation o, TQWidget* parent, const char* name) Splitter::Splitter(TQt::Orientation o, TQWidget* parent, const char* name)
: TQSplitter(o, parent, name) : TQSplitter(o, parent, name)
{ {
} }
@ -222,7 +222,7 @@ void Sidebar::setSidebarStyle( KMultiTabBarStyle style )
void Sidebar::setSplitter (Splitter *sp) void Sidebar::setSplitter (Splitter *sp)
{ {
m_splitter = sp; m_splitter = sp;
m_ownSplit = new Splitter ((sidebarPosition() == KMultiTabBar::Top || sidebarPosition() == KMultiTabBar::Bottom) ? Qt::Horizontal : Qt::Vertical, m_splitter); m_ownSplit = new Splitter ((sidebarPosition() == KMultiTabBar::Top || sidebarPosition() == KMultiTabBar::Bottom) ? TQt::Horizontal : TQt::Vertical, m_splitter);
m_ownSplit->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_ownSplit->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_ownSplit->setChildrenCollapsible( false ); m_ownSplit->setChildrenCollapsible( false );
m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize ); m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize );
@ -599,7 +599,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb); m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb);
m_hSplitter = new Splitter (Qt::Horizontal, hb); m_hSplitter = new Splitter (TQt::Horizontal, hb);
m_hSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_hSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter); m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter);
@ -609,7 +609,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name)
m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb); m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb);
m_vSplitter = new Splitter (Qt::Vertical, vb); m_vSplitter = new Splitter (TQt::Vertical, vb);
m_vSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_vSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() );
m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter); m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter);

@ -39,7 +39,7 @@ class Splitter : public TQSplitter
public: public:
Splitter(Qt::Orientation o, TQWidget* parent=0, const char* name=0); Splitter(TQt::Orientation o, TQWidget* parent=0, const char* name=0);
~Splitter(); ~Splitter();
/** Since there is supposed to be only 2 childs of a katesplitter, /** Since there is supposed to be only 2 childs of a katesplitter,

@ -410,7 +410,7 @@ ViewArea *ViewArea::createViewArea( Position position, uint id )
return 0l; return 0l;
} }
setOrientation( ( position == Right ) ? Qt::Horizontal : Qt::Vertical ); setOrientation( ( position == Right ) ? TQt::Horizontal : TQt::Vertical );
p_viewArea1 = new ViewArea(this, p_viewContainer, m_id, TQString("viewarea_%1").arg(TQString::number(m_id)).latin1()); p_viewArea1 = new ViewArea(this, p_viewContainer, m_id, TQString("viewarea_%1").arg(TQString::number(m_id)).latin1());
p_viewArea2 = new ViewArea(this, p_viewContainer, id, TQString("viewarea_%1").arg(TQString::number(id)).latin1()); p_viewArea2 = new ViewArea(this, p_viewContainer, id, TQString("viewarea_%1").arg(TQString::number(id)).latin1());
@ -424,7 +424,7 @@ ViewArea *ViewArea::createViewArea( Position position, uint id )
m_id = p_viewContainer->uniqueParentId(); m_id = p_viewContainer->uniqueParentId();
TQValueList<int> splitPos; TQValueList<int> splitPos;
int pos = ((orientation() == Qt::Horizontal) ? width()/2 : height()/2); int pos = ((orientation() == TQt::Horizontal) ? width()/2 : height()/2);
splitPos << pos << pos; splitPos << pos << pos;
setSizes(splitPos); setSizes(splitPos);
@ -499,7 +499,7 @@ void ViewArea::saveState( TDEConfig *config )
if ( va1Ok || va2Ok ) if ( va1Ok || va2Ok )
{ {
config->writeEntry( orientationKey(m_id), (orientation() == Qt::Horizontal) ? "LeftRight" : "TopBottom" ); config->writeEntry( orientationKey(m_id), (orientation() == TQt::Horizontal) ? "LeftRight" : "TopBottom" );
TQValueList<int> contains; TQValueList<int> contains;
if (va1Ok) if (va1Ok)
@ -542,7 +542,7 @@ void ViewArea::restoreState( TDEConfig *config, int id, const TQString &groupNam
if ( config->hasKey( orientationKey(id) ) ) if ( config->hasKey( orientationKey(id) ) )
{ {
TQString orientation = config->readEntry( orientationKey(m_id) ); TQString orientation = config->readEntry( orientationKey(m_id) );
setOrientation( (orientation == "LeftRight") ? Qt::Horizontal : Qt::Vertical ); setOrientation( (orientation == "LeftRight") ? TQt::Horizontal : TQt::Vertical );
} }
config->setGroup(groupName); config->setGroup(groupName);

Loading…
Cancel
Save