diff options
author | Michele Calgaro <[email protected]> | 2023-11-04 22:03:54 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-11-04 22:03:54 +0900 |
commit | c5554a5f82ebc79fbda3940ee904e71490fb13d6 (patch) | |
tree | c6a2c38cdd7ab8a193f25a0a51ebb5aa7fe8c386 /src/drawparts/drawpart.cpp | |
parent | ba71773a92f2cc979c252f790be280c8486ebfd0 (diff) | |
download | ktechlab-c5554a5f82ebc79fbda3940ee904e71490fb13d6.tar.gz ktechlab-c5554a5f82ebc79fbda3940ee904e71490fb13d6.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/drawparts/drawpart.cpp')
-rw-r--r-- | src/drawparts/drawpart.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/src/drawparts/drawpart.cpp b/src/drawparts/drawpart.cpp index 1ac24cf..2a67a4f 100644 --- a/src/drawparts/drawpart.cpp +++ b/src/drawparts/drawpart.cpp @@ -39,9 +39,9 @@ Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value ty if ( type == Variant::Type::PenStyle ) { TQStringList penStyles; - penStyles << DrawPart::penStyleToName(Qt::SolidLine) << DrawPart::penStyleToName(Qt::DashLine) - << DrawPart::penStyleToName(Qt::DotLine) << DrawPart::penStyleToName(Qt::DashDotLine) - << DrawPart::penStyleToName(Qt::DashDotDotLine); + penStyles << DrawPart::penStyleToName(TQt::SolidLine) << DrawPart::penStyleToName(TQt::DashLine) + << DrawPart::penStyleToName(TQt::DotLine) << DrawPart::penStyleToName(TQt::DashDotLine) + << DrawPart::penStyleToName(TQt::DashDotDotLine); Variant * v = createProperty( id, Variant::Type::String ); v->setType( Variant::Type::PenStyle ); @@ -52,8 +52,8 @@ Variant * DrawPart::createProperty( const TQString & id, Variant::Type::Value ty if ( type == Variant::Type::PenCapStyle ) { TQStringList penCapStyles; - penCapStyles << DrawPart::penCapStyleToName(Qt::FlatCap) << DrawPart::penCapStyleToName(Qt::SquareCap) - << DrawPart::penCapStyleToName(Qt::RoundCap); + penCapStyles << DrawPart::penCapStyleToName(TQt::FlatCap) << DrawPart::penCapStyleToName(TQt::SquareCap) + << DrawPart::penCapStyleToName(TQt::RoundCap); Variant * v = createProperty( id, Variant::Type::String ); 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) ); } -Qt::PenCapStyle DrawPart::getDataPenCapStyle( const TQString & id ) +TQt::PenCapStyle DrawPart::getDataPenCapStyle( const TQString & 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) ); } -void DrawPart::setDataPenCapStyle( const TQString & id, Qt::PenCapStyle value ) +void DrawPart::setDataPenCapStyle( const TQString & id, TQt::PenCapStyle 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) { - case Qt::SolidLine: + case TQt::SolidLine: return "SolidLine"; - case Qt::NoPen: + case TQt::NoPen: return "NoPen"; - case Qt::DashLine: + case TQt::DashLine: return "DashLine"; - case Qt::DotLine: + case TQt::DotLine: return "DotLine"; - case Qt::DashDotLine: + case TQt::DashDotLine: return "DashDotLine"; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: return "DashDotDotLine"; - case Qt::MPenStyle: + case TQt::MPenStyle: default: return ""; // ?! } } -Qt::PenStyle DrawPart::idToPenStyle( const TQString & id ) +TQt::PenStyle DrawPart::idToPenStyle( const TQString & id ) { if ( id == "NoPen" ) - return Qt::NoPen; + return TQt::NoPen; if ( id == "DashLine" ) - return Qt::DashLine; + return TQt::DashLine; if ( id == "DotLine" ) - return Qt::DotLine; + return TQt::DotLine; if ( id == "DashDotLine" ) - return Qt::DashDotLine; + return TQt::DashDotLine; if ( id == "DashDotDotLine" ) - return Qt::DashDotDotLine; - return Qt::SolidLine; + return TQt::DashDotDotLine; + return TQt::SolidLine; } -TQString DrawPart::penCapStyleToID( Qt::PenCapStyle style ) +TQString DrawPart::penCapStyleToID( TQt::PenCapStyle style ) { switch (style) { - case Qt::FlatCap: + case TQt::FlatCap: return "FlatCap"; - case Qt::SquareCap: + case TQt::SquareCap: return "SquareCap"; - case Qt::RoundCap: + case TQt::RoundCap: return "RoundCap"; - case Qt::MPenCapStyle: + case TQt::MPenCapStyle: default: return ""; // ?! } } -Qt::PenCapStyle DrawPart::idToPenCapStyle( const TQString & id ) +TQt::PenCapStyle DrawPart::idToPenCapStyle( const TQString & id ) { if ( id == "SquareCap" ) - return Qt::SquareCap; + return TQt::SquareCap; if ( id == "RoundCap" ) - return Qt::RoundCap; - return Qt::FlatCap; + return TQt::RoundCap; + return TQt::FlatCap; } -TQString DrawPart::penStyleToName( Qt::PenStyle style ) +TQString DrawPart::penStyleToName( TQt::PenStyle style ) { switch (style) { - case Qt::SolidLine: + case TQt::SolidLine: return i18n("Solid"); - case Qt::NoPen: + case TQt::NoPen: return i18n("None"); - case Qt::DashLine: + case TQt::DashLine: return i18n("Dash"); - case Qt::DotLine: + case TQt::DotLine: return i18n("Dot"); - case Qt::DashDotLine: + case TQt::DashDotLine: return i18n("Dash Dot"); - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: return i18n("Dash Dot Dot"); - case Qt::MPenStyle: + case TQt::MPenStyle: default: return ""; // ?! } } -Qt::PenStyle DrawPart::nameToPenStyle( const TQString & name ) +TQt::PenStyle DrawPart::nameToPenStyle( const TQString & name ) { if ( name == i18n("None") ) - return Qt::NoPen; + return TQt::NoPen; if ( name == i18n("Dash") ) - return Qt::DashLine; + return TQt::DashLine; if ( name == i18n("Dot") ) - return Qt::DotLine; + return TQt::DotLine; if ( name == i18n("Dash Dot") ) - return Qt::DashDotLine; + return TQt::DashDotLine; if ( name == i18n("Dash Dot Dot") ) - return Qt::DashDotDotLine; - return Qt::SolidLine; + return TQt::DashDotDotLine; + return TQt::SolidLine; } -TQString DrawPart::penCapStyleToName( Qt::PenCapStyle style ) +TQString DrawPart::penCapStyleToName( TQt::PenCapStyle style ) { switch (style) { - case Qt::FlatCap: + case TQt::FlatCap: return i18n("Flat"); - case Qt::SquareCap: + case TQt::SquareCap: return i18n("Square"); - case Qt::RoundCap: + case TQt::RoundCap: return i18n("Round"); - case Qt::MPenCapStyle: + case TQt::MPenCapStyle: default: return ""; // ?! } } -Qt::PenCapStyle DrawPart::nameToPenCapStyle( const TQString & name ) +TQt::PenCapStyle DrawPart::nameToPenCapStyle( const TQString & name ) { if ( name == i18n("Square") ) - return Qt::SquareCap; + return TQt::SquareCap; if ( name == i18n("Round") ) - return Qt::RoundCap; - return Qt::FlatCap; + return TQt::RoundCap; + return TQt::FlatCap; } |