Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/28/head
Michele Calgaro 1 year ago
parent 402e94ba9d
commit c8e3d1d47d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -150,7 +150,7 @@ void blinken::paintEvent(TQPaintEvent *)
p.drawLine(169, 250, 469, 250); p.drawLine(169, 250, 469, 250);
// draw the two squares of the options // draw the two squares of the options
p.setPen(TQPen(m_fontColor, 2, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin)); p.setPen(TQPen(m_fontColor, 2, TQt::SolidLine, TQt::SquareCap, TQt::MiterJoin));
m_soundRect = TQRect(181, 209, 25, 25); m_soundRect = TQRect(181, 209, 25, 25);
m_fontRect = TQRect(432, 209, 25, 25); m_fontRect = TQRect(432, 209, 25, 25);

@ -417,7 +417,7 @@ void PerodicTableView::paintCurrentSelection()
p.begin(table); p.begin(table);
TQPen pen; TQPen pen;
pen.setStyle( Qt::DotLine ); pen.setStyle( TQt::DotLine );
pen.setWidth( 4 ); pen.setWidth( 4 );
pen.setColor( TQt::blue ); pen.setColor( TQt::blue );
p.setPen( pen ); p.setPen( pen );

@ -320,9 +320,9 @@ void SpectrumWidget::mouseMoveEvent( TQMouseEvent *e )
void SpectrumWidget::mousePressEvent( TQMouseEvent *e ) void SpectrumWidget::mousePressEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::LeftButton ) if ( e->button() == TQt::LeftButton )
m_LMBPointPress = e->pos(); m_LMBPointPress = e->pos();
if ( e->button() == Qt::RightButton ) if ( e->button() == TQt::RightButton )
slotZoomOut(); slotZoomOut();
//FIXME //FIXME
//the tooltip is not really working. Better to not have it //the tooltip is not really working. Better to not have it
@ -391,7 +391,7 @@ void SpectrumWidget::drawTooltip( TQPainter *p )
void SpectrumWidget::mouseReleaseEvent( TQMouseEvent *e ) void SpectrumWidget::mouseReleaseEvent( TQMouseEvent *e )
{ {
if ( e->button() == Qt::LeftButton ) if ( e->button() == TQt::LeftButton )
{ {
int left = (int)Wavelength( ( double )m_LMBPointPress.x()/width() ); int left = (int)Wavelength( ( double )m_LMBPointPress.x()/width() );
int right = (int)Wavelength( ( double )e->pos().x()/width() ); int right = (int)Wavelength( ( double )e->pos().x()/width() );

@ -432,7 +432,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e)
if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos())) if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos()))
{ {
if(!(e->button() == Qt::RightButton)) if(!(e->button() == TQt::RightButton))
m_game->nextVocab(); m_game->nextVocab();
else else
m_game->previousVocab(); m_game->previousVocab();
@ -723,7 +723,7 @@ void Kanagram::drawTextNew(TQPainter &p, const TQString &text, int textAlign, in
void Kanagram::checkWord() void Kanagram::checkWord()
{ {
TQPoint p = m_upRect.topLeft() + TQPoint( 1, 1 ); TQPoint p = m_upRect.topLeft() + TQPoint( 1, 1 );
TQMouseEvent *e = new TQMouseEvent( TQEvent::MouseButtonPress, p, Qt::LeftButton, Qt::NoButton ); TQMouseEvent *e = new TQMouseEvent( TQEvent::MouseButtonPress, p, TQt::LeftButton, TQt::NoButton );
mousePressEvent(e); mousePressEvent(e);
} }

@ -53,17 +53,17 @@
<entry name="numberColor" type="Color"> <entry name="numberColor" type="Color">
<label>Color of the numbers in the task view</label> <label>Color of the numbers in the task view</label>
<whatsthis>Color of the numbers in the task view</whatsthis> <whatsthis>Color of the numbers in the task view</whatsthis>
<default code="true">Qt::darkGreen</default> <default code="true">TQt::darkGreen</default>
</entry> </entry>
<entry name="operationColor" type="Color"> <entry name="operationColor" type="Color">
<label>Color of the operation signs in the task view</label> <label>Color of the operation signs in the task view</label>
<whatsthis>Color of the operation signs in the task view</whatsthis> <whatsthis>Color of the operation signs in the task view</whatsthis>
<default code="true">Qt::blue</default> <default code="true">TQt::blue</default>
</entry> </entry>
<entry name="fractionBarColor" type="Color"> <entry name="fractionBarColor" type="Color">
<label>Color of the fraction bars in the task view</label> <label>Color of the fraction bars in the task view</label>
<whatsthis>Color of the fraction bars in the task view</whatsthis> <whatsthis>Color of the fraction bars in the task view</whatsthis>
<default code="true">Qt::red</default> <default code="true">TQt::red</default>
</entry> </entry>
<entry type="Font" key="taskFont"> <entry type="Font" key="taskFont">
<label>Font used for the task view</label> <label>Font used for the task view</label>

@ -62,7 +62,7 @@ MainQtWidget::MainQtWidget()
// we split the main view into 2 parts, one for the tasks, one for the // we split the main view into 2 parts, one for the tasks, one for the
// statistics // statistics
TQSplitter* splitter = new TQSplitter(Qt::Horizontal, this,"TQSplitter"); TQSplitter* splitter = new TQSplitter(TQt::Horizontal, this,"TQSplitter");
setCentralWidget(splitter); setCentralWidget(splitter);
// the iconlist, where the user can choose the different exercises // the iconlist, where the user can choose the different exercises

@ -44,7 +44,7 @@ void KEducaPrefs::setPageGeneral()
TQButtonGroup *buttonGroup1 = new TQButtonGroup( mainFrame, "ButtonGroup1" ); TQButtonGroup *buttonGroup1 = new TQButtonGroup( mainFrame, "ButtonGroup1" );
buttonGroup1->setTitle( i18n( "General" ) ); buttonGroup1->setTitle( i18n( "General" ) );
buttonGroup1->setColumnLayout(0, Qt::Vertical ); buttonGroup1->setColumnLayout(0, TQt::Vertical );
buttonGroup1->layout()->setSpacing( 0 ); buttonGroup1->layout()->setSpacing( 0 );
buttonGroup1->layout()->setMargin( 0 ); buttonGroup1->layout()->setMargin( 0 );
TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() ); TQVBoxLayout *buttonGroup1Layout = new TQVBoxLayout( buttonGroup1->layout() );
@ -62,7 +62,7 @@ void KEducaPrefs::setPageGeneral()
TQGroupBox *GroupBox1 = new TQGroupBox( mainFrame, "GroupBox7" ); TQGroupBox *GroupBox1 = new TQGroupBox( mainFrame, "GroupBox7" );
GroupBox1->setTitle( i18n( "Order" ) ); GroupBox1->setTitle( i18n( "Order" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical ); GroupBox1->setColumnLayout(0, TQt::Vertical );
GroupBox1->layout()->setSpacing( 0 ); GroupBox1->layout()->setSpacing( 0 );
GroupBox1->layout()->setMargin( 0 ); GroupBox1->layout()->setMargin( 0 );
TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() ); TQVBoxLayout *GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );

@ -74,7 +74,7 @@ void KEducaView::init()
// Question Widget // Question Widget
_questionWidget = new TQVBox( this, "questionWidget" ); _questionWidget = new TQVBox( this, "questionWidget" );
_split = new TQSplitter( Qt::Vertical, _questionWidget ); _split = new TQSplitter( TQt::Vertical, _questionWidget );
_questionText = new KQuestion( _split, "kquestion" ); _questionText = new KQuestion( _split, "kquestion" );
_buttonGroup = new KGroupEduca( _split, "ButtonGroup" ); _buttonGroup = new KGroupEduca( _split, "ButtonGroup" );
_buttonGroup->setRadioButtonExclusive( true ); _buttonGroup->setRadioButtonExclusive( true );

@ -81,7 +81,7 @@ void KControlHeader::init()
TQGroupBox *GroupBox7 = new TQGroupBox( mainView, "GroupBox7" ); TQGroupBox *GroupBox7 = new TQGroupBox( mainView, "GroupBox7" );
GroupBox7->setTitle( i18n( "Description" ) ); GroupBox7->setTitle( i18n( "Description" ) );
GroupBox7->setColumnLayout(0, Qt::Vertical ); GroupBox7->setColumnLayout(0, TQt::Vertical );
GroupBox7->layout()->setSpacing( 0 ); GroupBox7->layout()->setSpacing( 0 );
GroupBox7->layout()->setMargin( 0 ); GroupBox7->layout()->setMargin( 0 );
TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->layout() ); TQVBoxLayout *GroupBox7Layout = new TQVBoxLayout( GroupBox7->layout() );
@ -146,7 +146,7 @@ void KControlHeader::init()
TQGroupBox *GroupBox8 = new TQGroupBox( mainView, "GroupBox8" ); TQGroupBox *GroupBox8 = new TQGroupBox( mainView, "GroupBox8" );
GroupBox8->setTitle( i18n( "Picture" ) ); GroupBox8->setTitle( i18n( "Picture" ) );
GroupBox8->setColumnLayout(0, Qt::Vertical ); GroupBox8->setColumnLayout(0, TQt::Vertical );
GroupBox8->layout()->setSpacing( 0 ); GroupBox8->layout()->setSpacing( 0 );
GroupBox8->layout()->setMargin( 0 ); GroupBox8->layout()->setMargin( 0 );
TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->layout() ); TQHBoxLayout *GroupBox8Layout = new TQHBoxLayout( GroupBox8->layout() );
@ -164,7 +164,7 @@ void KControlHeader::init()
TQGroupBox *GroupBox6 = new TQGroupBox( mainView, "GroupBox6" ); TQGroupBox *GroupBox6 = new TQGroupBox( mainView, "GroupBox6" );
GroupBox6->setTitle( i18n( "Author" ) ); GroupBox6->setTitle( i18n( "Author" ) );
GroupBox6->setColumnLayout(0, Qt::Vertical ); GroupBox6->setColumnLayout(0, TQt::Vertical );
GroupBox6->layout()->setSpacing( 0 ); GroupBox6->layout()->setSpacing( 0 );
GroupBox6->layout()->setMargin( 0 ); GroupBox6->layout()->setMargin( 0 );
TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->layout() ); TQGridLayout *GroupBox6Layout = new TQGridLayout( GroupBox6->layout() );

@ -88,7 +88,7 @@ void KEducaBuilder::init()
form2Layout->setMargin( 0 ); form2Layout->setMargin( 0 );
_split = new TQSplitter( mainView ); _split = new TQSplitter( mainView );
_split->setOrientation( Qt::Vertical ); _split->setOrientation( TQt::Vertical );
_listAnswer = new TDEListBox( _split, "_listAnswer" ); _listAnswer = new TDEListBox( _split, "_listAnswer" );
_listAnswer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) ); _listAnswer->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, _listAnswer->sizePolicy().hasHeightForWidth() ) );

@ -27,9 +27,9 @@ mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint cou
p_mapWidget = new mapWidget(this); p_mapWidget = new mapWidget(this);
lay -> addWidget(p_mapWidget, 0, 0); lay -> addWidget(p_mapWidget, 0, 0);
p_hsb = new TQScrollBar(Qt::Horizontal, this); p_hsb = new TQScrollBar(TQt::Horizontal, this);
lay -> addWidget(p_hsb, 1, 0); lay -> addWidget(p_hsb, 1, 0);
p_vsb = new TQScrollBar(Qt::Vertical, this); p_vsb = new TQScrollBar(TQt::Vertical, this);
lay -> addWidget(p_vsb, 0, 1); lay -> addWidget(p_vsb, 0, 1);
lay -> setRowStretch(2, 1); lay -> setRowStretch(2, 1);

@ -80,7 +80,7 @@ void mapWidget::updateVPosition(int value)
void mapWidget::mousePressEvent(TQMouseEvent *e) void mapWidget::mousePressEvent(TQMouseEvent *e)
{ {
if (e -> button() == Qt::LeftButton) if (e -> button() == TQt::LeftButton)
{ {
if (p_wantZoom) if (p_wantZoom)
{ {

@ -228,7 +228,7 @@ void KHangMan::setLanguages()
for (uint i=0; i<m_languages.count(); i++) { for (uint i=0; i<m_languages.count(); i++) {
TQString tmp = m_languages[i]; TQString tmp = m_languages[i];
if (!config->readEntry(tmp)) if (!config->readEntry(tmp))
config->writeEntry(tmp, TQString(TQDate::currentDate().toString(Qt::ISODate))); config->writeEntry(tmp, TQString(TQDate::currentDate().toString(TQt::ISODate)));
} }
// We look in $TDEDIR/share/locale/all_languages from // We look in $TDEDIR/share/locale/all_languages from

@ -190,7 +190,7 @@ bool KHangManView::containsChar(const TQString &sChar)
void KHangManView::mousePressEvent(TQMouseEvent *mouse) void KHangManView::mousePressEvent(TQMouseEvent *mouse)
{ {
if (mouse->button() == Qt::RightButton && m_hintExists && Prefs::hint()) { if (mouse->button() == TQt::RightButton && m_hintExists && Prefs::hint()) {
KPassivePopup *myPopup = new KPassivePopup( m_letterInput); KPassivePopup *myPopup = new KPassivePopup( m_letterInput);
myPopup->setView(i18n("Hint"), m_hint ); myPopup->setView(i18n("Hint"), m_hint );

@ -343,12 +343,12 @@ KigDocument* KigFilterCabri::load( const TQString& file )
return 0; return 0;
// reading linestyle // reading linestyle
Qt::PenStyle ls = Qt::SolidLine; TQt::PenStyle ls = TQt::SolidLine;
if ( ( obj.lineSegLength > 1 ) && ( obj.lineSegLength < 6 ) && if ( ( obj.lineSegLength > 1 ) && ( obj.lineSegLength < 6 ) &&
( obj.lineSegSplit > 1 ) && ( obj.lineSegSplit <= 10 ) ) ( obj.lineSegSplit > 1 ) && ( obj.lineSegSplit <= 10 ) )
ls = Qt::DotLine; ls = TQt::DotLine;
else if ( ( obj.lineSegLength >= 6 ) && ( obj.lineSegSplit > 10 ) ) else if ( ( obj.lineSegLength >= 6 ) && ( obj.lineSegSplit > 10 ) )
ls = Qt::DashLine; ls = TQt::DashLine;
int ps = 0; int ps = 0;
args.clear(); args.clear();

@ -729,7 +729,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co
// Normal -> the medium // Normal -> the medium
// Thick -> the biggest one // Thick -> the biggest one
int w = -1; int w = -1;
Qt::PenStyle s = Qt::SolidLine; TQt::PenStyle s = TQt::SolidLine;
if ( domelem.tagName() == "point" ) if ( domelem.tagName() == "point" )
{ {
if ( domelem.attribute( "thickness" ) == "Normal" ) if ( domelem.attribute( "thickness" ) == "Normal" )
@ -740,7 +740,7 @@ KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, co
else else
{ {
if ( domelem.attribute( "thickness" ) == "Dashed" ) if ( domelem.attribute( "thickness" ) == "Dashed" )
s = Qt::DotLine; s = TQt::DotLine;
if ( domelem.attribute( "thickness" ) == "Thick" ) if ( domelem.attribute( "thickness" ) == "Thick" )
w = 2; w = 2;
} }

@ -126,7 +126,7 @@ private:
* Draws a line (segment) or a vector if vector is true. * Draws a line (segment) or a vector if vector is true.
*/ */
void emitLine( const Coordinate& a, const Coordinate& b, const int width, void emitLine( const Coordinate& a, const Coordinate& b, const int width,
const Qt::PenStyle s, bool vector = false ); const TQt::PenStyle s, bool vector = false );
/** /**
* Sends a new line character ( \n ) to stream. * Sends a new line character ( \n ) to stream.
*/ */
@ -144,7 +144,7 @@ private:
/** /**
* Converts a pen style into latex style string. * Converts a pen style into latex style string.
*/ */
TQString writeStyle( Qt::PenStyle style ); TQString writeStyle( TQt::PenStyle style );
/** /**
* Plots a generic curve though its points calc'ed with getPoint. * Plots a generic curve though its points calc'ed with getPoint.
*/ */
@ -157,7 +157,7 @@ void LatexExportImpVisitor::emitCoord( const Coordinate& c )
} }
void LatexExportImpVisitor::emitLine( const Coordinate& a, const Coordinate& b, void LatexExportImpVisitor::emitLine( const Coordinate& a, const Coordinate& b,
const int width, const Qt::PenStyle s, const int width, const TQt::PenStyle s,
bool vector ) bool vector )
{ {
mstream << "\\psline[linecolor=" << mcurcolorid << ",linewidth=" << width / 100.0 mstream << "\\psline[linecolor=" << mcurcolorid << ",linewidth=" << width / 100.0
@ -210,7 +210,7 @@ double LatexExportImpVisitor::dimRealToCoord( int dim )
return fabs( r.width() ); return fabs( r.width() );
} }
TQString LatexExportImpVisitor::writeStyle( Qt::PenStyle style ) TQString LatexExportImpVisitor::writeStyle( TQt::PenStyle style )
{ {
TQString ret( "linestyle=" ); TQString ret( "linestyle=" );
if ( style == TQt::DashLine ) if ( style == TQt::DashLine )

@ -536,7 +536,7 @@ KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement&
if ( ! ok ) width = -1; if ( ! ok ) width = -1;
tmp = e.attribute( "style" ); tmp = e.attribute( "style" );
Qt::PenStyle style = ObjectDrawer::styleFromString( tmp ); TQt::PenStyle style = ObjectDrawer::styleFromString( tmp );
tmp = e.attribute( "point-style" ); tmp = e.attribute( "point-style" );
int pointstyle = ObjectDrawer::pointStyleFromString( tmp ); int pointstyle = ObjectDrawer::pointStyleFromString( tmp );

@ -89,32 +89,32 @@ void KigWidget::paintEvent(TQPaintEvent*)
void KigWidget::mousePressEvent (TQMouseEvent* e) void KigWidget::mousePressEvent (TQMouseEvent* e)
{ {
if( e->button() & Qt::LeftButton ) if( e->button() & TQt::LeftButton )
return mpart->mode()->leftClicked( e, this ); return mpart->mode()->leftClicked( e, this );
if ( e->button() & Qt::MidButton ) if ( e->button() & TQt::MidButton )
return mpart->mode()->midClicked( e, this ); return mpart->mode()->midClicked( e, this );
if ( e->button() & Qt::RightButton ) if ( e->button() & TQt::RightButton )
return mpart->mode()->rightClicked( e, this ); return mpart->mode()->rightClicked( e, this );
} }
void KigWidget::mouseMoveEvent (TQMouseEvent* e) void KigWidget::mouseMoveEvent (TQMouseEvent* e)
{ {
if( e->state() & Qt::LeftButton ) if( e->state() & TQt::LeftButton )
return mpart->mode()->leftMouseMoved( e, this ); return mpart->mode()->leftMouseMoved( e, this );
if ( e->state() & Qt::MidButton ) if ( e->state() & TQt::MidButton )
return mpart->mode()->midMouseMoved( e, this ); return mpart->mode()->midMouseMoved( e, this );
if ( e->state() & Qt::RightButton ) if ( e->state() & TQt::RightButton )
return mpart->mode()->rightMouseMoved( e, this ); return mpart->mode()->rightMouseMoved( e, this );
return mpart->mode()->mouseMoved( e, this ); return mpart->mode()->mouseMoved( e, this );
} }
void KigWidget::mouseReleaseEvent (TQMouseEvent* e) void KigWidget::mouseReleaseEvent (TQMouseEvent* e)
{ {
if( e->state() & Qt::LeftButton ) if( e->state() & TQt::LeftButton )
return mpart->mode()->leftReleased( e, this ); return mpart->mode()->leftReleased( e, this );
if ( e->state() & Qt::MidButton ) if ( e->state() & TQt::MidButton )
return mpart->mode()->midReleased( e, this ); return mpart->mode()->midReleased( e, this );
if ( e->state() & Qt::RightButton ) if ( e->state() & TQt::RightButton )
return mpart->mode()->rightReleased( e, this ); return mpart->mode()->rightReleased( e, this );
} }
@ -297,14 +297,14 @@ KigView::KigView( KigPart* part,
connect( part, TQT_SIGNAL( recenterScreen() ), this, TQT_SLOT( slotInternalRecenterScreen() ) ); connect( part, TQT_SIGNAL( recenterScreen() ), this, TQT_SLOT( slotInternalRecenterScreen() ) );
mlayout = new TQGridLayout( this, 2, 2 ); mlayout = new TQGridLayout( this, 2, 2 );
mrightscroll = new TQScrollBar(Qt::Vertical, this, "Right Scrollbar" ); mrightscroll = new TQScrollBar(TQt::Vertical, this, "Right Scrollbar" );
// TODO: make this configurable... // TODO: make this configurable...
mrightscroll->setTracking( true ); mrightscroll->setTracking( true );
connect( mrightscroll, TQT_SIGNAL( valueChanged( int ) ), connect( mrightscroll, TQT_SIGNAL( valueChanged( int ) ),
this, TQT_SLOT( slotRightScrollValueChanged( int ) ) ); this, TQT_SLOT( slotRightScrollValueChanged( int ) ) );
connect( mrightscroll, TQT_SIGNAL( sliderReleased() ), connect( mrightscroll, TQT_SIGNAL( sliderReleased() ),
this, TQT_SLOT( updateScrollBars() ) ); this, TQT_SLOT( updateScrollBars() ) );
mbottomscroll = new TQScrollBar(Qt::Horizontal, this, "Bottom Scrollbar" ); mbottomscroll = new TQScrollBar(TQt::Horizontal, this, "Bottom Scrollbar" );
connect( mbottomscroll, TQT_SIGNAL( valueChanged( int ) ), connect( mbottomscroll, TQT_SIGNAL( valueChanged( int ) ),
this, TQT_SLOT( slotBottomScrollValueChanged( int ) ) ); this, TQT_SLOT( slotBottomScrollValueChanged( int ) ) );
connect( mbottomscroll, TQT_SIGNAL( sliderReleased() ), connect( mbottomscroll, TQT_SIGNAL( sliderReleased() ),
@ -451,8 +451,8 @@ TQSize KigWidget::sizeHint() const
void KigWidget::wheelEvent( TQWheelEvent* e ) void KigWidget::wheelEvent( TQWheelEvent* e )
{ {
int delta = e->delta(); int delta = e->delta();
Qt::Orientation orient = e->orientation(); TQt::Orientation orient = e->orientation();
if ( orient == Qt::Vertical ) if ( orient == TQt::Vertical )
mview->scrollVertical( delta ); mview->scrollVertical( delta );
else else
mview->scrollHorizontal( delta ); mview->scrollHorizontal( delta );

@ -43,10 +43,10 @@ KigPainter::KigPainter( const ScreenInfo& si, TQPaintDevice* device,
const KigDocument& doc, bool no ) const KigDocument& doc, bool no )
: mP ( device ), : mP ( device ),
color( TQt::blue ), color( TQt::blue ),
style( Qt::SolidLine ), style( TQt::SolidLine ),
pointstyle( 0 ), pointstyle( 0 ),
width( -1 ), width( -1 ),
brushStyle( Qt::NoBrush ), brushStyle( TQt::NoBrush ),
brushColor( TQt::blue ), brushColor( TQt::blue ),
mdoc( doc ), mdoc( doc ),
msi( si ), msi( si ),
@ -101,7 +101,7 @@ void KigPainter::drawFatPoint( const Coordinate& p )
case 0: case 0:
{ {
double radius = twidth * pixelWidth(); double radius = twidth * pixelWidth();
setBrushStyle( Qt::SolidPattern ); setBrushStyle( TQt::SolidPattern );
Coordinate rad( radius, radius ); Coordinate rad( radius, radius );
rad /= 2; rad /= 2;
Coordinate tl = p - rad; Coordinate tl = p - rad;
@ -115,7 +115,7 @@ void KigPainter::drawFatPoint( const Coordinate& p )
case 1: case 1:
{ {
double radius = twidth * pixelWidth(); double radius = twidth * pixelWidth();
setBrushStyle( Qt::NoBrush ); setBrushStyle( TQt::NoBrush );
Coordinate rad( radius, radius ); Coordinate rad( radius, radius );
rad /= 2; rad /= 2;
Coordinate tl = p - rad; Coordinate tl = p - rad;
@ -218,7 +218,7 @@ void KigPainter::setColor( const TQColor& c )
mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) );
} }
void KigPainter::setStyle( const Qt::PenStyle c ) void KigPainter::setStyle( const TQt::PenStyle c )
{ {
style = c; style = c;
mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) );
@ -251,7 +251,7 @@ void KigPainter::setBrush( const TQBrush& b )
mP.setBrush( b ); mP.setBrush( b );
} }
void KigPainter::setBrushStyle( const Qt::BrushStyle c ) void KigPainter::setBrushStyle( const TQt::BrushStyle c )
{ {
brushStyle = c; brushStyle = c;
mP.setBrush( TQBrush( brushColor, brushStyle ) ); mP.setBrush( TQBrush( brushColor, brushStyle ) );
@ -291,7 +291,7 @@ void KigPainter::drawPolygon( const std::vector<TQPoint>& pts,
TQPen oldpen = mP.pen(); TQPen oldpen = mP.pen();
TQBrush oldbrush = mP.brush(); TQBrush oldbrush = mP.brush();
setBrush( TQBrush( color, Dense4Pattern ) ); setBrush( TQBrush( color, Dense4Pattern ) );
setPen( Qt::NoPen ); setPen( TQt::NoPen );
// i know this isn't really fast, but i blame it all on TQt with its // i know this isn't really fast, but i blame it all on TQt with its
// stupid container classes... what's wrong with the STL ? // stupid container classes... what's wrong with the STL ?
TQPointArray t( pts.size() ); TQPointArray t( pts.size() );
@ -314,7 +314,7 @@ void KigPainter::drawArea( const std::vector<Coordinate>& pts, bool border )
if ( border ) if ( border )
setPen( TQPen( color, width == -1 ? 1 : width ) ); setPen( TQPen( color, width == -1 ? 1 : width ) );
else else
setPen( Qt::NoPen ); setPen( TQt::NoPen );
TQPointArray t( pts.size() ); TQPointArray t( pts.size() );
int c = 0; int c = 0;
for( std::vector<Coordinate>::const_iterator i = pts.begin(); i != pts.end(); ++i ) for( std::vector<Coordinate>::const_iterator i = pts.begin(); i != pts.end(); ++i )
@ -512,7 +512,7 @@ void KigPainter::drawTextStd( const TQPoint& p, const TQString& s )
int tf = AlignLeft | AlignTop | DontClip | WordBreak; int tf = AlignLeft | AlignTop | DontClip | WordBreak;
// we need the rect where we're going to paint text // we need the rect where we're going to paint text
setPen(TQPen(TQt::blue, 1, SolidLine)); setPen(TQPen(TQt::blue, 1, SolidLine));
setBrush(Qt::NoBrush); setBrush(TQt::NoBrush);
drawText( Rect( drawText( Rect(
msi.fromScreen(p), window().bottomRight() msi.fromScreen(p), window().bottomRight()
).normalized(), s, tf ); ).normalized(), s, tf );
@ -643,7 +643,7 @@ void KigPainter::drawAngle( const Coordinate& cpoint, const double dstartangle,
// arrow.push_back( end + orthvect + vect ); // arrow.push_back( end + orthvect + vect );
// arrow.push_back( end + orthvect - vect ); // arrow.push_back( end + orthvect - vect );
setBrushStyle( Qt::SolidPattern ); setBrushStyle( TQt::SolidPattern );
// drawPolygon( arrow ); // drawPolygon( arrow );
mP.drawPolygon( arrow, false, 0, -1 ); mP.drawPolygon( arrow, false, 0, -1 );

@ -59,10 +59,10 @@ protected:
mutable TQPainter mP; mutable TQPainter mP;
TQColor color; TQColor color;
Qt::PenStyle style; TQt::PenStyle style;
int pointstyle; int pointstyle;
int width; int width;
Qt::BrushStyle brushStyle; TQt::BrushStyle brushStyle;
TQColor brushColor; TQColor brushColor;
const KigDocument& mdoc; const KigDocument& mdoc;
@ -94,7 +94,7 @@ public:
Rect fromScreen( const TQRect& r ) const; Rect fromScreen( const TQRect& r ) const;
// colors and stuff... // colors and stuff...
void setStyle( const Qt::PenStyle c ); void setStyle( const TQt::PenStyle c );
void setColor( const TQColor& c ); void setColor( const TQColor& c );
/** /**
* setting this to -1 means to use the default width for the object * setting this to -1 means to use the default width for the object
@ -103,7 +103,7 @@ public:
void setWidth( const int c ); void setWidth( const int c );
void setPointStyle( const int p ); void setPointStyle( const int p );
void setPen( const TQPen& p ); void setPen( const TQPen& p );
void setBrushStyle( const Qt::BrushStyle c ); void setBrushStyle( const TQt::BrushStyle c );
void setBrush( const TQBrush& b ); void setBrush( const TQBrush& b );
void setBrushColor( const TQColor& c ); void setBrushColor( const TQColor& c );

@ -101,7 +101,7 @@ void StandardConstructorBase::handlePrelim(
{ {
assert ( margsparser.check( os ) != ArgsParser::Invalid ); assert ( margsparser.check( os ) != ArgsParser::Invalid );
std::vector<ObjectCalcer*> args = margsparser.parse( os ); std::vector<ObjectCalcer*> args = margsparser.parse( os );
p.setBrushStyle( Qt::NoBrush ); p.setBrushStyle( TQt::NoBrush );
p.setBrushColor( TQt::red ); p.setBrushColor( TQt::red );
p.setPen( TQPen ( TQt::red, 1) ); p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being p.setWidth( -1 ); // -1 means the default width for the object being

@ -349,7 +349,7 @@ void PolygonBNPTypeConstructor::handlePrelim(
} }
std::vector<ObjectCalcer*> args = os; std::vector<ObjectCalcer*> args = os;
p.setBrushStyle( Qt::NoBrush ); p.setBrushStyle( TQt::NoBrush );
p.setBrushColor( TQt::red ); p.setBrushColor( TQt::red );
p.setPen( TQPen ( TQt::red, 1) ); p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being p.setWidth( -1 ); // -1 means the default width for the object being
@ -658,7 +658,7 @@ void PolygonBCVConstructor::handlePrelim(
args.push_back( ns ); args.push_back( ns );
} }
p.setBrushStyle( Qt::NoBrush ); p.setBrushStyle( TQt::NoBrush );
p.setBrushColor( TQt::red ); p.setBrushColor( TQt::red );
p.setPen( TQPen ( TQt::red, 1) ); p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being p.setWidth( -1 ); // -1 means the default width for the object being
@ -685,7 +685,7 @@ void PolygonBCVConstructor::handlePrelim(
text = TextImp( TQString( "(%1)" ).arg(i), where, false ); text = TextImp( TQString( "(%1)" ).arg(i), where, false );
text.draw( p ); text.draw( p );
} }
p.setStyle( Qt::DotLine ); p.setStyle( TQt::DotLine );
p.setWidth( 1 ); p.setWidth( 1 );
double radius = ( v - c ).length(); double radius = ( v - c ).length();
CircleImp circle = CircleImp( c, radius ); CircleImp circle = CircleImp( c, radius );
@ -1178,7 +1178,7 @@ void MeasureTransportConstructor::handlePrelim(
const KigDocument& d, const KigWidget& const KigDocument& d, const KigWidget&
) const ) const
{ {
p.setBrushStyle( Qt::NoBrush ); p.setBrushStyle( TQt::NoBrush );
p.setBrushColor( TQt::red ); p.setBrushColor( TQt::red );
p.setPen( TQPen ( TQt::red, 1) ); p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being p.setWidth( -1 ); // -1 means the default width for the object being

@ -472,21 +472,21 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in
ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() ); ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() );
KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false );
PointImp pt( Coordinate( 0, 0 ) ); PointImp pt( Coordinate( 0, 0 ) );
ObjectDrawer d( color, -1, true, Qt::SolidLine, i ); ObjectDrawer d( color, -1, true, TQt::SolidLine, i );
d.draw( pt, ptr, false ); d.draw( pt, ptr, false );
popup.addAction( menu, p, nextfree++ ); popup.addAction( menu, p, nextfree++ );
} }
else else
{ {
Qt::PenStyle penstyles[] = {Qt::SolidLine, Qt::DashLine, Qt::DashDotLine, Qt::DashDotDotLine, Qt::DotLine}; TQt::PenStyle penstyles[] = {TQt::SolidLine, TQt::DashLine, TQt::DashDotLine, TQt::DashDotDotLine, TQt::DotLine};
for ( int i = 0; i < (int) ( sizeof( penstyles ) / sizeof( Qt::PenStyle ) ); ++i ) for ( int i = 0; i < (int) ( sizeof( penstyles ) / sizeof( TQt::PenStyle ) ); ++i )
{ {
TQPixmap p( 50, 20 ); TQPixmap p( 50, 20 );
p.fill( popup.eraseColor() ); p.fill( popup.eraseColor() );
ScreenInfo si( Rect( -2.5, -1, 5, 2 ), p.rect() ); ScreenInfo si( Rect( -2.5, -1, 5, 2 ), p.rect() );
KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false ); KigPainter ptr( si, TQT_TQPAINTDEVICE(&p), popup.part().document(), false );
LineImp line( Coordinate( -1, 0 ), Coordinate( 1, 0 ) ); LineImp line( Coordinate( -1, 0 ), Coordinate( 1, 0 ) );
Qt::PenStyle ps = penstyles[i]; TQt::PenStyle ps = penstyles[i];
ObjectDrawer d( color, -1, true, ps, 1 ); ObjectDrawer d( color, -1, true, ps, 1 );
d.draw( line, ptr, false ); d.draw( line, ptr, false );
popup.addAction( menu, p, nextfree++ ); popup.addAction( menu, p, nextfree++ );
@ -712,9 +712,9 @@ bool BuiltinObjectActionsProvider::executeAction(
} }
else else
{ {
Qt::PenStyle penstyles[] = {Qt::SolidLine, Qt::DashLine, Qt::DashDotLine, Qt::DashDotDotLine, Qt::DotLine}; TQt::PenStyle penstyles[] = {TQt::SolidLine, TQt::DashLine, TQt::DashDotLine, TQt::DashDotDotLine, TQt::DotLine};
assert( id < (int)( sizeof( penstyles ) / sizeof( Qt::PenStyle ) ) ); assert( id < (int)( sizeof( penstyles ) / sizeof( TQt::PenStyle ) ) );
Qt::PenStyle p = penstyles[id]; TQt::PenStyle p = penstyles[id];
KigCommand* kc = new KigCommand( doc, i18n( "Change Object Style" ) ); KigCommand* kc = new KigCommand( doc, i18n( "Change Object Style" ) );
for ( std::vector<ObjectHolder*>::const_iterator i = os.begin(); i != os.end(); ++i ) for ( std::vector<ObjectHolder*>::const_iterator i = os.begin(); i != os.end(); ++i )
if ( ! (*i)->imp()->inherits( PointImp::stype() ) ) if ( ! (*i)->imp()->inherits( PointImp::stype() ) )

@ -31,7 +31,7 @@ void ObjectDrawer::draw( const ObjectImp& imp, KigPainter& p, bool sel ) const
bool nv = p.getNightVision( ); bool nv = p.getNightVision( );
if ( mshown || nv ) if ( mshown || nv )
{ {
p.setBrushStyle( Qt::NoBrush ); p.setBrushStyle( TQt::NoBrush );
p.setBrushColor( sel ? TQt::red : ( mshown?mcolor:TQt::gray ) ); p.setBrushColor( sel ? TQt::red : ( mshown?mcolor:TQt::gray ) );
p.setPen( TQPen ( sel ? TQt::red : ( mshown?mcolor:TQt::gray ), 1) ); p.setPen( TQPen ( sel ? TQt::red : ( mshown?mcolor:TQt::gray ), 1) );
p.setWidth( mwidth ); p.setWidth( mwidth );
@ -90,7 +90,7 @@ ObjectDrawer* ObjectDrawer::getCopyWidth( int w ) const
return ret; return ret;
} }
ObjectDrawer* ObjectDrawer::getCopyStyle( Qt::PenStyle s ) const ObjectDrawer* ObjectDrawer::getCopyStyle( TQt::PenStyle s ) const
{ {
ObjectDrawer* ret = new ObjectDrawer; ObjectDrawer* ret = new ObjectDrawer;
ret->mcolor = mcolor; ret->mcolor = mcolor;
@ -117,7 +117,7 @@ int ObjectDrawer::width() const
return mwidth; return mwidth;
} }
Qt::PenStyle ObjectDrawer::style() const TQt::PenStyle ObjectDrawer::style() const
{ {
return mstyle; return mstyle;
} }
@ -127,13 +127,13 @@ int ObjectDrawer::pointStyle() const
return mpointstyle; return mpointstyle;
} }
ObjectDrawer::ObjectDrawer( const TQColor& color, int width, bool shown, Qt::PenStyle style, int pointStyle ) ObjectDrawer::ObjectDrawer( const TQColor& color, int width, bool shown, TQt::PenStyle style, int pointStyle )
: mcolor( color ), mshown( shown ), mwidth( width ), mstyle( style ), mpointstyle( pointStyle ) : mcolor( color ), mshown( shown ), mwidth( width ), mstyle( style ), mpointstyle( pointStyle )
{ {
} }
ObjectDrawer::ObjectDrawer() ObjectDrawer::ObjectDrawer()
: mcolor( TQt::blue ), mshown( true ), mwidth( -1 ), mstyle( Qt::SolidLine ), mpointstyle( 0 ) : mcolor( TQt::blue ), mshown( true ), mwidth( -1 ), mstyle( TQt::SolidLine ), mpointstyle( 0 )
{ {
} }
@ -173,19 +173,19 @@ TQString ObjectDrawer::pointStyleToString() const
return TQString(); return TQString();
} }
Qt::PenStyle ObjectDrawer::styleFromString( const TQString& style ) TQt::PenStyle ObjectDrawer::styleFromString( const TQString& style )
{ {
if ( style == "SolidLine" ) if ( style == "SolidLine" )
return Qt::SolidLine; return TQt::SolidLine;
else if ( style == "DashLine" ) else if ( style == "DashLine" )
return Qt::DashLine; return TQt::DashLine;
else if ( style == "DotLine" ) else if ( style == "DotLine" )
return Qt::DotLine; return TQt::DotLine;
else if ( style == "DashDotLine" ) else if ( style == "DashDotLine" )
return Qt::DashDotLine; return TQt::DashDotLine;
else if ( style == "DashDotDotLine" ) else if ( style == "DashDotDotLine" )
return Qt::DashDotDotLine; return TQt::DashDotDotLine;
else return Qt::SolidLine; else return TQt::SolidLine;
} }
TQString ObjectDrawer::styleToString() const TQString ObjectDrawer::styleToString() const

@ -48,7 +48,7 @@ class ObjectDrawer
TQColor mcolor; TQColor mcolor;
bool mshown; bool mshown;
int mwidth; int mwidth;
Qt::PenStyle mstyle; TQt::PenStyle mstyle;
int mpointstyle; int mpointstyle;
public: public:
/** /**
@ -57,7 +57,7 @@ public:
* and pointstyle ( 0 ) * and pointstyle ( 0 )
*/ */
ObjectDrawer(); ObjectDrawer();
ObjectDrawer( const TQColor& color, int width = -1, bool shown = true, Qt::PenStyle = Qt::SolidLine, int pointStyle = 0 ); ObjectDrawer( const TQColor& color, int width = -1, bool shown = true, TQt::PenStyle = TQt::SolidLine, int pointStyle = 0 );
/** /**
* Draw the object \p imp on kigpainter \p p . If \p selected is true, it is * Draw the object \p imp on kigpainter \p p . If \p selected is true, it is
* drawn in red, otherwise in its normal color. * drawn in red, otherwise in its normal color.
@ -91,7 +91,7 @@ public:
/** /**
* return PenStyle for all objects except points * return PenStyle for all objects except points
*/ */
Qt::PenStyle style() const; TQt::PenStyle style() const;
/** /**
* return pointStyle for points * return pointStyle for points
*/ */
@ -123,7 +123,7 @@ public:
* returns a new ObjectDrawer that is identical to this one.. except * returns a new ObjectDrawer that is identical to this one.. except
* that the PenStyle state is set to \p s .. * that the PenStyle state is set to \p s ..
*/ */
ObjectDrawer* getCopyStyle( Qt::PenStyle s ) const; ObjectDrawer* getCopyStyle( TQt::PenStyle s ) const;
/** /**
* returns a new ObjectDrawer that is identical to this one.. except * returns a new ObjectDrawer that is identical to this one.. except
* that the pointStyle state is set to \p p .. * that the pointStyle state is set to \p p ..
@ -140,7 +140,7 @@ public:
* given \p style string is unknown. In that case it returns a default * given \p style string is unknown. In that case it returns a default
* value. * value.
*/ */
static Qt::PenStyle styleFromString( const TQString& style ); static TQt::PenStyle styleFromString( const TQString& style );
}; };
#endif #endif

@ -74,7 +74,7 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name)
veryTop->addWidget(Tabs); veryTop->addWidget(Tabs);
listTop = new TQSplitter(Tabs); listTop = new TQSplitter(Tabs);
listTop->setOrientation(Qt::Vertical); listTop->setOrientation(TQt::Vertical);
quizTop = new TQWidget(Tabs); quizTop = new TQWidget(Tabs);
Tabs->addTab(listTop, i18n("&List")); Tabs->addTab(listTop, i18n("&List"));
Tabs->addTab(quizTop, i18n("&Quiz")); Tabs->addTab(quizTop, i18n("&Quiz"));
@ -146,7 +146,7 @@ Learn::Learn(Dict::Index *parentDict, TQWidget *parent, const char *name)
hlayout->addStretch(); hlayout->addStretch();
quizLayout->addStretch(); quizLayout->addStretch();
answers = new TQButtonGroup(1,Qt::Horizontal, quizTop); answers = new TQButtonGroup(1,TQt::Horizontal, quizTop);
for (int i = 0; i < numberOfAnswers; ++i) for (int i = 0; i < numberOfAnswers; ++i)
answers->insert(new KPushButton(answers), i); answers->insert(new KPushButton(answers), i);
quizLayout->addWidget(answers); quizLayout->addWidget(answers);

@ -226,7 +226,7 @@ RadWidget::RadWidget(Rad *_rad, TQWidget *parent, const char *name) : TQWidget(p
TQHBoxLayout *hlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQHBoxLayout *hlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint()); TQVBoxLayout *vlayout = new TQVBoxLayout(hlayout, KDialog::spacingHint());
hotlistGroup = new TQButtonGroup(1,Qt::Horizontal, i18n("Hotlist"), this); hotlistGroup = new TQButtonGroup(1,TQt::Horizontal, i18n("Hotlist"), this);
//hotlistGroup->setRadioButtonExclusive(true); //hotlistGroup->setRadioButtonExclusive(true);
vlayout->addWidget(hotlistGroup); vlayout->addWidget(hotlistGroup);

@ -231,7 +231,7 @@ void View::plotfkt(Ufkt *ufkt, TQPainter *pDC)
double x, y, dmin, dmax; double x, y, dmin, dmax;
TQPoint p1, p2; TQPoint p1, p2;
TQPen pen; TQPen pen;
pen.setCapStyle(Qt::RoundCap); pen.setCapStyle(TQt::RoundCap);
iy=0; iy=0;
y=0.0; y=0.0;
@ -605,7 +605,7 @@ void View::mouseMoveEvent(TQMouseEvent *e)
{ {
if ( isDrawing) if ( isDrawing)
return; return;
if (zoom_mode==4 && e->stateAfter() != Qt::NoButton) if (zoom_mode==4 && e->stateAfter() != TQt::NoButton)
{ {
TQPainter p; TQPainter p;
p.begin(this); p.begin(this);
@ -616,7 +616,7 @@ void View::mouseMoveEvent(TQMouseEvent *e)
TQPen pen(TQt::white, 1, TQt::DotLine); TQPen pen(TQt::white, 1, TQt::DotLine);
painter.setRasterOp (TQt::XorROP); painter.setRasterOp (TQt::XorROP);
painter.setPen(pen); painter.setPen(pen);
painter.setBackgroundMode (Qt::OpaqueMode); painter.setBackgroundMode (TQt::OpaqueMode);
painter.setBackgroundColor (TQt::blue); painter.setBackgroundColor (TQt::blue);
painter.drawRect(rectangle_point.x(), rectangle_point.y(), e->pos().x()-rectangle_point.x(), e->pos().y()-rectangle_point.y()); painter.drawRect(rectangle_point.x(), rectangle_point.y(), e->pos().x()-rectangle_point.x(), e->pos().y()-rectangle_point.y());
@ -639,7 +639,7 @@ void View::mouseMoveEvent(TQMouseEvent *e)
csflg=0; csflg=0;
} }
if(area.contains(e->pos()) || (e->button()==Qt::LeftButton && e->state()==Qt::LeftButton && csxpos>xmin && csxpos<xmax)) if(area.contains(e->pos()) || (e->button()==TQt::LeftButton && e->state()==TQt::LeftButton && csxpos>xmin && csxpos<xmax))
{ {
TQPoint ptd, ptl; TQPoint ptd, ptl;
TQPainter DC; TQPainter DC;
@ -862,7 +862,7 @@ void View::mousePressEvent(TQMouseEvent *e)
} }
double const g=tlgy*double(xmax-xmin)/(2*double(ymax-ymin)); double const g=tlgy*double(xmax-xmin)/(2*double(ymax-ymin));
if( !m_readonly && e->button()==Qt::RightButton) //clicking with the right mouse button if( !m_readonly && e->button()==TQt::RightButton) //clicking with the right mouse button
{ {
char function_type; char function_type;
for( TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it) for( TQValueVector<Ufkt>::iterator it = m_parser->ufkt.begin(); it != m_parser->ufkt.end(); ++it)
@ -969,7 +969,7 @@ void View::mousePressEvent(TQMouseEvent *e)
} }
return; return;
} }
if(e->button()!=Qt::LeftButton) return ; if(e->button()!=TQt::LeftButton) return ;
if(csmode>=0) //disable trace mode if trace mode is enable if(csmode>=0) //disable trace mode if trace mode is enable
{ {
csmode=-1; csmode=-1;
@ -1471,9 +1471,9 @@ void View::keyPressEvent( TQKeyEvent * e)
TQMouseEvent *event; TQMouseEvent *event;
if (e->key() == TQt::Key_Left ) if (e->key() == TQt::Key_Left )
event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx-1,fcy-1),Qt::LeftButton,Qt::LeftButton); event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx-1,fcy-1),TQt::LeftButton,TQt::LeftButton);
else if (e->key() == TQt::Key_Right ) else if (e->key() == TQt::Key_Right )
event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx+1,fcy+1),Qt::LeftButton,Qt::LeftButton); event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx+1,fcy+1),TQt::LeftButton,TQt::LeftButton);
else if (e->key() == TQt::Key_Up || e->key() == TQt::Key_Down) //switch graph in trace mode else if (e->key() == TQt::Key_Up || e->key() == TQt::Key_Down) //switch graph in trace mode
{ {
TQValueVector<Ufkt>::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)]; TQValueVector<Ufkt>::iterator it = &m_parser->ufkt[m_parser->ixValue(csmode)];
@ -1573,18 +1573,18 @@ void View::keyPressEvent( TQKeyEvent * e)
break; break;
} }
} }
event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton); event = new TQMouseEvent(TQEvent::MouseMove,TQPoint(fcx,fcy),TQt::LeftButton,TQt::LeftButton);
} }
else if ( e->key() == TQt::Key_Space ) else if ( e->key() == TQt::Key_Space )
{ {
event = new TQMouseEvent(TQEvent::MouseButtonPress,TQCursor::pos(),Qt::RightButton,Qt::RightButton); event = new TQMouseEvent(TQEvent::MouseButtonPress,TQCursor::pos(),TQt::RightButton,TQt::RightButton);
mousePressEvent(event); mousePressEvent(event);
delete event; delete event;
return; return;
} }
else else
{ {
event = new TQMouseEvent(TQEvent::MouseButtonPress,TQPoint(fcx,fcy),Qt::LeftButton,Qt::LeftButton); event = new TQMouseEvent(TQEvent::MouseButtonPress,TQPoint(fcx,fcy),TQt::LeftButton,TQt::LeftButton);
mousePressEvent(event); mousePressEvent(event);
delete event; delete event;
return; return;
@ -1876,7 +1876,7 @@ void View::mnuHide_clicked()
if ( !ufkt->f_mode && !ufkt->f1_mode && !ufkt->f2_mode) //all graphs for the function are hidden if ( !ufkt->f_mode && !ufkt->f1_mode && !ufkt->f2_mode) //all graphs for the function are hidden
{ {
csmode=-1; csmode=-1;
TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),Qt::LeftButton,Qt::LeftButton); TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),TQt::LeftButton,TQt::LeftButton);
mousePressEvent(event); //leave trace mode mousePressEvent(event); //leave trace mode
delete event; delete event;
return; return;
@ -1904,7 +1904,7 @@ void View::mnuRemove_clicked()
if (csmode!=-1) // if trace mode is enabled if (csmode!=-1) // if trace mode is enabled
{ {
csmode=-1; csmode=-1;
TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),Qt::LeftButton,Qt::LeftButton); TQMouseEvent *event = new TQMouseEvent(TQMouseEvent::KeyPress,TQCursor::pos(),TQt::LeftButton,TQt::LeftButton);
mousePressEvent(event); //leave trace mode mousePressEvent(event); //leave trace mode
delete event; delete event;
} }

@ -82,7 +82,7 @@ bool KSliderWindow::eventFilter( TQObject *obj, TQEvent *ev )
if (ev->type() == TQEvent::MouseButtonPress) if (ev->type() == TQEvent::MouseButtonPress)
{ {
TQMouseEvent *e = (TQMouseEvent *)ev; TQMouseEvent *e = (TQMouseEvent *)ev;
if (e->button() != Qt::RightButton) if (e->button() != TQt::RightButton)
return SliderWindow::eventFilter( obj, ev ); return SliderWindow::eventFilter( obj, ev );
m_popupmenu->exec(TQCursor::pos()); m_popupmenu->exec(TQCursor::pos());
return true; return true;

@ -83,7 +83,7 @@ signals:
void clicked(); void clicked();
protected: protected:
void mousePressEvent( TQMouseEvent *e ) { if ( e->button() == Qt::LeftButton ) emit clicked(); } void mousePressEvent( TQMouseEvent *e ) { if ( e->button() == TQt::LeftButton ) emit clicked(); }
}; };
/**@class DetailDialog is a window showing detailed information for a selected object. /**@class DetailDialog is a window showing detailed information for a selected object.

@ -287,7 +287,7 @@ void INDI_E::setupElementScale(int length)
int steps = (int) ((max - min) / step); int steps = (int) ((max - min) / step);
spin_w = new KDoubleSpinBox(min, max, step, value, 2, pp->pg->propertyContainer ); spin_w = new KDoubleSpinBox(min, max, step, value, 2, pp->pg->propertyContainer );
slider_w = new TQSlider(0, steps, 1, (int) ((value - min) / step), Qt::Horizontal, pp->pg->propertyContainer ); slider_w = new TQSlider(0, steps, 1, (int) ((value - min) / step), TQt::Horizontal, pp->pg->propertyContainer );
connect(spin_w, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(spinChanged(double ))); connect(spin_w, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(spinChanged(double )));
connect(slider_w, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderChanged(int ))); connect(slider_w, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderChanged(int )));

@ -98,7 +98,7 @@ class INDI_E : public TQObject
PState state; /* control on/off t/f etc */ PState state; /* control on/off t/f etc */
INDI_P *pp; /* parent property */ INDI_P *pp; /* parent property */
TQHBoxLayout *EHBox; /*Qt::Horizontal layout */ TQHBoxLayout *EHBox; /* Horizontal layout */
/* GUI widgets, only malloced when needed */ /* GUI widgets, only malloced when needed */
KSqueezedTextLabel *label_w; // label KSqueezedTextLabel *label_w; // label

@ -35,7 +35,7 @@ class INDI_G
INDI_D *dp; /* Parent device */ INDI_D *dp; /* Parent device */
TQFrame *propertyContainer; /* Properties container */ TQFrame *propertyContainer; /* Properties container */
TQVBoxLayout *propertyLayout; /* Properties layout */ TQVBoxLayout *propertyLayout; /* Properties layout */
TQSpacerItem *VerticalSpacer; /*Qt::Vertical spacer */ TQSpacerItem *VerticalSpacer; /* Vertical spacer */
TQPtrList<INDI_P> pl; /* malloced list of pointers to properties */ TQPtrList<INDI_P> pl; /* malloced list of pointers to properties */

@ -57,9 +57,9 @@ class INDI_P : public TQObject
TQLabel *label_w; /* Label widget */ TQLabel *label_w; /* Label widget */
TQPushButton *set_w; /* set button */ TQPushButton *set_w; /* set button */
TQSpacerItem *HorSpacer; /*Qt::Horizontal spacer */ TQSpacerItem *HorSpacer; /* Horizontal spacer */
TQHBoxLayout *PHBox; /*Qt::Horizontal container */ TQHBoxLayout *PHBox; /* Horizontal container */
TQVBoxLayout *PVBox; /*Qt::Vertical container */ TQVBoxLayout *PVBox; /* Vertical container */
TQButtonGroup *groupB; /* group button for radio and check boxes (Elements) */ TQButtonGroup *groupB; /* group button for radio and check boxes (Elements) */
KComboBox *om_w; /* Combo box for menu */ KComboBox *om_w; /* Combo box for menu */

@ -111,13 +111,13 @@ int main(int argc, char *argv[])
if ( ! datestring.isEmpty() ) { if ( ! datestring.isEmpty() ) {
if ( datestring.contains( "-" ) ) { //assume ISODate format if ( datestring.contains( "-" ) ) { //assume ISODate format
if ( datestring.contains( ":" ) ) { //also includes time if ( datestring.contains( ":" ) ) { //also includes time
kdt = KStarsDateTime::fromString( datestring, Qt::ISODate ); kdt = KStarsDateTime::fromString( datestring, TQt::ISODate );
} else { //string probably contains date only } else { //string probably contains date only
kdt.setDate( ExtDate::fromString( datestring, Qt::ISODate ) ); kdt.setDate( ExtDate::fromString( datestring, TQt::ISODate ) );
kdt.setTime( TQTime( 0, 0, 0 ) ); kdt.setTime( TQTime( 0, 0, 0 ) );
} }
} else { //assume Text format for date string } else { //assume Text format for date string
kdt = dat->geo()->LTtoUT( KStarsDateTime::fromString( datestring, Qt::TextDate ) ); kdt = dat->geo()->LTtoUT( KStarsDateTime::fromString( datestring, TQt::TextDate ) );
} }
if ( ! kdt.isValid() ) { if ( ! kdt.isValid() ) {

@ -629,12 +629,12 @@ void SkyMap::mouseReleaseEvent( TQMouseEvent * ) {
void SkyMap::mousePressEvent( TQMouseEvent *e ) { void SkyMap::mousePressEvent( TQMouseEvent *e ) {
//did we Grab an infoBox? //did we Grab an infoBox?
if ( e->button() == Qt::LeftButton && infoBoxes()->grabBox( e ) ) { if ( e->button() == TQt::LeftButton && infoBoxes()->grabBox( e ) ) {
update(); //refresh without redrawing skymap update(); //refresh without redrawing skymap
return; return;
} }
if ( (e->state() & ControlButton) && (e->button() == Qt::LeftButton) ) { if ( (e->state() & ControlButton) && (e->button() == TQt::LeftButton) ) {
ZoomRect.moveCenter( e->pos() ); ZoomRect.moveCenter( e->pos() );
setZoomMouseCursor(); setZoomMouseCursor();
update(); //refresh without redrawing skymap update(); //refresh without redrawing skymap
@ -649,13 +649,13 @@ void SkyMap::mousePressEvent( TQMouseEvent *e ) {
double dy = ( 0.5*height() - e->y() )/Options::zoomFactor(); double dy = ( 0.5*height() - e->y() )/Options::zoomFactor();
if (unusablePoint (dx, dy)) return; // break if point is unusable if (unusablePoint (dx, dy)) return; // break if point is unusable
if ( !midMouseButtonDown && e->button() == Qt::MidButton ) { if ( !midMouseButtonDown && e->button() == TQt::MidButton ) {
y0 = 0.5*height() - e->y(); //record y pixel coordinate for middle-button zooming y0 = 0.5*height() - e->y(); //record y pixel coordinate for middle-button zooming
midMouseButtonDown = true; midMouseButtonDown = true;
} }
if ( !mouseButtonDown ) { if ( !mouseButtonDown ) {
if ( e->button()==Qt::LeftButton ) { if ( e->button()==TQt::LeftButton ) {
mouseButtonDown = true; mouseButtonDown = true;
scrollCount = 0; scrollCount = 0;
} }
@ -671,11 +671,11 @@ void SkyMap::mousePressEvent( TQMouseEvent *e ) {
if ( clickedObject() ) { if ( clickedObject() ) {
setClickedPoint( clickedObject() ); setClickedPoint( clickedObject() );
if ( e->button() == Qt::RightButton ) { if ( e->button() == TQt::RightButton ) {
clickedObject()->showPopupMenu( pmenu, TQCursor::pos() ); clickedObject()->showPopupMenu( pmenu, TQCursor::pos() );
} }
if ( ksw && e->button() == Qt::LeftButton ) { if ( ksw && e->button() == TQt::LeftButton ) {
ksw->statusBar()->changeItem( clickedObject()->translatedLongName(), 0 ); ksw->statusBar()->changeItem( clickedObject()->translatedLongName(), 0 );
} }
} else { } else {
@ -684,10 +684,10 @@ void SkyMap::mousePressEvent( TQMouseEvent *e ) {
setClickedObject( NULL ); setClickedObject( NULL );
switch (e->button()) { switch (e->button()) {
case Qt::LeftButton: case TQt::LeftButton:
if ( ksw ) ksw->statusBar()->changeItem( i18n( "Empty sky" ), 0 ); if ( ksw ) ksw->statusBar()->changeItem( i18n( "Empty sky" ), 0 );
break; break;
case Qt::RightButton: case TQt::RightButton:
{ {
SkyObject *nullObj = new SkyObject( SkyObject::TYPE_UNKNOWN, clickedPoint()->ra()->Hours(), clickedPoint()->dec()->Degrees() ); SkyObject *nullObj = new SkyObject( SkyObject::TYPE_UNKNOWN, clickedPoint()->ra()->Hours(), clickedPoint()->dec()->Degrees() );
pmenu->createEmptyMenu( nullObj ); pmenu->createEmptyMenu( nullObj );
@ -706,7 +706,7 @@ void SkyMap::mousePressEvent( TQMouseEvent *e ) {
void SkyMap::mouseDoubleClickEvent( TQMouseEvent *e ) { void SkyMap::mouseDoubleClickEvent( TQMouseEvent *e ) {
//Was the event inside an infoBox? If so, shade the box. //Was the event inside an infoBox? If so, shade the box.
if ( e->button() == Qt::LeftButton ) { if ( e->button() == TQt::LeftButton ) {
if ( infoBoxes()->shadeBox( e ) ) { if ( infoBoxes()->shadeBox( e ) ) {
update(); update();
return; return;

@ -130,7 +130,7 @@ void ThumbImage::paintEvent( TQPaintEvent* ) {
} }
void ThumbImage::mousePressEvent( TQMouseEvent *e ) { void ThumbImage::mousePressEvent( TQMouseEvent *e ) {
if ( e->button() == Qt::LeftButton && CropRect->contains( e->pos() ) ) { if ( e->button() == TQt::LeftButton && CropRect->contains( e->pos() ) ) {
bMouseButtonDown = true; bMouseButtonDown = true;
//The Anchor tells how far from the CropRect corner we clicked //The Anchor tells how far from the CropRect corner we clicked

@ -68,7 +68,7 @@ void LCGenerator::createGUI()
SDLayout = new TQHBoxLayout( 0, 0, 6, "SDLayout"); SDLayout = new TQHBoxLayout( 0, 0, 6, "SDLayout");
StarInfoBox = new TQGroupBox( page, "StarInfoBox" ); StarInfoBox = new TQGroupBox( page, "StarInfoBox" );
StarInfoBox->setColumnLayout(0, Qt::Vertical ); StarInfoBox->setColumnLayout(0, TQt::Vertical );
StarInfoBox->layout()->setSpacing( 6 ); StarInfoBox->layout()->setSpacing( 6 );
StarInfoBox->layout()->setMargin( 11 ); StarInfoBox->layout()->setMargin( 11 );
StarInfoBoxLayout = new TQVBoxLayout( StarInfoBox->layout() ); StarInfoBoxLayout = new TQVBoxLayout( StarInfoBox->layout() );
@ -124,7 +124,7 @@ void LCGenerator::createGUI()
SDLayout->addWidget( StarInfoBox ); SDLayout->addWidget( StarInfoBox );
DataSelectBox = new TQGroupBox( page, "DataSelectBox" ); DataSelectBox = new TQGroupBox( page, "DataSelectBox" );
DataSelectBox->setColumnLayout(0, Qt::Vertical ); DataSelectBox->setColumnLayout(0, TQt::Vertical );
DataSelectBox->layout()->setSpacing( 6 ); DataSelectBox->layout()->setSpacing( 6 );
DataSelectBox->layout()->setMargin( 11 ); DataSelectBox->layout()->setMargin( 11 );
DataSelectBoxLayout = new TQVBoxLayout( DataSelectBox->layout() ); DataSelectBoxLayout = new TQVBoxLayout( DataSelectBox->layout() );

@ -212,10 +212,10 @@ void modCalcEquinox::processLines( TQTextStream &istream ) {
KStarsDateTime dta( jdau ); KStarsDateTime dta( jdau );
KStarsDateTime dtw( jdwin ); KStarsDateTime dtw( jdwin );
ostream << dts.toString(Qt::ISODate) << space << (float)(jdsu - jdsp) << space ostream << dts.toString(TQt::ISODate) << space << (float)(jdsu - jdsp) << space
<< dtu.toString(Qt::ISODate) << space << (float)(jdau - jdsu) << space << dtu.toString(TQt::ISODate) << space << (float)(jdau - jdsu) << space
<< dta.toString(Qt::ISODate) << space << (float)(jdwin - jdau) << space << dta.toString(TQt::ISODate) << space << (float)(jdwin - jdau) << space
<< dtw.toString(Qt::ISODate) << space << (float)(jdsp1 - jdwin) << endl; << dtw.toString(TQt::ISODate) << space << (float)(jdsp1 - jdwin) << endl;
} }

@ -459,7 +459,7 @@ void modCalcPlanets::processLines( TQTextStream &istream ) {
// Read date and write in ostream if corresponds // Read date and write in ostream if corresponds
if(dateCheckBatch->isChecked() ) { if(dateCheckBatch->isChecked() ) {
dtB = ExtDate::fromString( fields[i], Qt::ISODate ); dtB = ExtDate::fromString( fields[i], TQt::ISODate );
if ( !dtB.isValid() ) { if ( !dtB.isValid() ) {
kdWarning() << i18n( "Line %1 contains an invalid date: " ).arg(nline) << kdWarning() << i18n( "Line %1 contains an invalid date: " ).arg(nline) <<
fields[i] << endl ; fields[i] << endl ;

@ -82,7 +82,7 @@ WUTDialog::WUTDialog(KStars *ks) :
if ( ! geo->translatedProvince().isEmpty() ) sGeo += ", " + geo->translatedProvince(); if ( ! geo->translatedProvince().isEmpty() ) sGeo += ", " + geo->translatedProvince();
sGeo += ", " + geo->translatedCountry(); sGeo += ", " + geo->translatedCountry();
WUT->LocationLabel->setText( i18n( "at %1" ).arg( sGeo ) ); WUT->LocationLabel->setText( i18n( "at %1" ).arg( sGeo ) );
WUT->DateLabel->setText( i18n( "The night of %1" ).arg( Evening.date().toString( Qt::LocalDate ) ) ); WUT->DateLabel->setText( i18n( "The night of %1" ).arg( Evening.date().toString( TQt::LocalDate ) ) );
initCategories(); initCategories();

@ -121,8 +121,8 @@ class KTouchSlideLine : public TQWidget {
TQColor m_cursorBackground; ///< Defines the background colour of the cursor (when turned off). TQColor m_cursorBackground; ///< Defines the background colour of the cursor (when turned off).
// variables depending on size of widget, will be updated in resizeEvent() // variables depending on size of widget, will be updated in resizeEvent()
int m_marginVerWidget; ///<Qt::Vertical margin between widget boundary and sliding line in pixels. int m_marginVerWidget; ///< Vertical margin between widget boundary and sliding line in pixels.
int m_slideLineDist; ///<Qt::Vertical distance between sliding lines in pixels. int m_slideLineDist; ///< Vertical distance between sliding lines in pixels.
int m_slideLineHeight; ///< Height of a sliding line in pixels. int m_slideLineHeight; ///< Height of a sliding line in pixels.
int m_marginCursor; ///< The margin for cursor movement (minimum distance from left and right ends of slide line boundaries). int m_marginCursor; ///< The margin for cursor movement (minimum distance from left and right ends of slide line boundaries).
@ -133,7 +133,7 @@ class KTouchSlideLine : public TQWidget {
int m_yCursorStudent; ///< Cursor top y coordinate (from top of visible area) in the student line. int m_yCursorStudent; ///< Cursor top y coordinate (from top of visible area) in the student line.
// newly defined variables, will be updated on the setNewText() and partially in setStudentText() // newly defined variables, will be updated on the setNewText() and partially in setStudentText()
int m_marginHorWidget; ///<Qt::Horizontal margin between widget boundary and sliding line in pixels. int m_marginHorWidget; ///< Horizontal margin between widget boundary and sliding line in pixels.
int m_slideLineWidth; ///< The length of the sliding line in pixels. int m_slideLineWidth; ///< The length of the sliding line in pixels.
int m_cursorRangeLen; ///< Length (in pixel) that the cursor can move between left and right margin. int m_cursorRangeLen; ///< Length (in pixel) that the cursor can move between left and right margin.

@ -94,7 +94,7 @@ bool KTouchLevelStats::read(TQDomNode in) {
if (!n.isNull()) { if (!n.isNull()) {
TQString timestring = n.firstChild().nodeValue(); TQString timestring = n.firstChild().nodeValue();
if (timestring != TQString()) if (timestring != TQString())
m_timeRecorded = TQDateTime::fromString(timestring, Qt::ISODate); m_timeRecorded = TQDateTime::fromString(timestring, TQt::ISODate);
} }
// read characters // read characters
n = in.namedItem("CharStats"); n = in.namedItem("CharStats");
@ -121,7 +121,7 @@ void KTouchLevelStats::write(TQDomDocument& doc, TQDomElement& root) const {
level.setAttribute("Words", m_words); level.setAttribute("Words", m_words);
// add time // add time
TQDomElement e = doc.createElement("Time"); TQDomElement e = doc.createElement("Time");
TQDomText tn = doc.createTextNode(m_timeRecorded.toString(Qt::ISODate)); TQDomText tn = doc.createTextNode(m_timeRecorded.toString(TQt::ISODate));
e.appendChild(tn); e.appendChild(tn);
level.appendChild(e); level.appendChild(e);
// add char stats // add char stats
@ -236,7 +236,7 @@ bool KTouchSessionStats::read(TQDomNode in) {
if (!n.isNull()) { if (!n.isNull()) {
TQString timestring = n.firstChild().nodeValue(); TQString timestring = n.firstChild().nodeValue();
if (timestring != TQString()) if (timestring != TQString())
m_timeRecorded = TQDateTime::fromString(timestring, Qt::ISODate); m_timeRecorded = TQDateTime::fromString(timestring, TQt::ISODate);
} }
// read level numbers // read level numbers
n = in.namedItem("LevelNums"); n = in.namedItem("LevelNums");
@ -272,7 +272,7 @@ void KTouchSessionStats::write(TQDomDocument& doc, TQDomElement& root) const {
session.setAttribute("Words", m_words); session.setAttribute("Words", m_words);
// add time // add time
TQDomElement e = doc.createElement("Time"); TQDomElement e = doc.createElement("Time");
TQDomText tn = doc.createTextNode(m_timeRecorded.toString(Qt::ISODate)); TQDomText tn = doc.createTextNode(m_timeRecorded.toString(TQt::ISODate));
e.appendChild(tn); e.appendChild(tn);
session.appendChild(e); session.appendChild(e);
// add levels // add levels

@ -876,7 +876,7 @@ void MainWindow::slotSettings()
general = new TQWidget(); general = new TQWidget();
TQGridLayout *generalLayout = new TQGridLayout( general, 1, 1, 11, 6, "generalLayout"); TQGridLayout *generalLayout = new TQGridLayout( general, 1, 1, 11, 6, "generalLayout");
WidthHeightBox = new TQGroupBox( i18n("Initial Canvas Size"), general ); WidthHeightBox = new TQGroupBox( i18n("Initial Canvas Size"), general );
WidthHeightBox->setColumnLayout(0, Qt::Vertical ); WidthHeightBox->setColumnLayout(0, TQt::Vertical );
WidthHeightBox->layout()->setSpacing( 6 ); WidthHeightBox->layout()->setSpacing( 6 );
WidthHeightBox->layout()->setMargin( 11 ); WidthHeightBox->layout()->setMargin( 11 );
TQVBoxLayout *WidthHeightBoxLayout = new TQVBoxLayout( WidthHeightBox->layout() ); TQVBoxLayout *WidthHeightBoxLayout = new TQVBoxLayout( WidthHeightBox->layout() );
@ -917,7 +917,7 @@ void MainWindow::slotSettings()
TQWidget *language = new TQWidget(); TQWidget *language = new TQWidget();
TQGridLayout *languageLayout = new TQGridLayout( language, 1, 1, 11, 6, "Form1Layout"); TQGridLayout *languageLayout = new TQGridLayout( language, 1, 1, 11, 6, "Form1Layout");
TQGroupBox *groupBox1 = new TQGroupBox( language, "groupBox1" ); TQGroupBox *groupBox1 = new TQGroupBox( language, "groupBox1" );
groupBox1->setColumnLayout(0, Qt::Vertical ); groupBox1->setColumnLayout(0, TQt::Vertical );
groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setSpacing( 6 );
groupBox1->layout()->setMargin( 11 ); groupBox1->layout()->setMargin( 11 );
TQGridLayout *groupBox1Layout = new TQGridLayout( groupBox1->layout() ); TQGridLayout *groupBox1Layout = new TQGridLayout( groupBox1->layout() );

@ -263,7 +263,7 @@ void KVocTrainTable::menuTriggerTimeout()
if (mt != KV_COL_MARK) if (mt != KV_COL_MARK)
emit rightButtonClicked(mt, mpos.x(), mpos.y()); emit rightButtonClicked(mt, mpos.x(), mpos.y());
TQMouseEvent me(TQEvent::MouseButtonRelease, TQPoint(0, 0), Qt::LeftButton, Qt::LeftButton); TQMouseEvent me(TQEvent::MouseButtonRelease, TQPoint(0, 0), TQt::LeftButton, TQt::LeftButton);
TQApplication::sendEvent(header, &me); TQApplication::sendEvent(header, &me);
} }
@ -538,7 +538,7 @@ void KVocTrainTable::contentsMousePressEvent(TQMouseEvent * e)
for (int i = topCell; i <= lastRowVisible; i++) for (int i = topCell; i <= lastRowVisible; i++)
updateCell(i, KV_COL_ORG); updateCell(i, KV_COL_ORG);
} }
if(e->button() == Qt::LeftButton) if(e->button() == TQt::LeftButton)
setCurrentCell(cr, cc); setCurrentCell(cr, cc);
} }

@ -74,15 +74,15 @@
</entry> </entry>
<entry name="FrontTextColor" type="Color"> <entry name="FrontTextColor" type="Color">
<label>Color used for text on front of flashcard</label> <label>Color used for text on front of flashcard</label>
<default code="true">Qt::black</default> <default code="true">TQt::black</default>
</entry> </entry>
<entry name="FrontCardColor" type="Color"> <entry name="FrontCardColor" type="Color">
<label>Color used for front of flashcard</label> <label>Color used for front of flashcard</label>
<default code="true">Qt::white</default> <default code="true">TQt::white</default>
</entry> </entry>
<entry name="FrontFrameColor" type="Color"> <entry name="FrontFrameColor" type="Color">
<label>Color used for frame on front of flashcard</label> <label>Color used for frame on front of flashcard</label>
<default code="true">Qt::red</default> <default code="true">TQt::red</default>
</entry> </entry>
<entry name="BackFont" type="Font"> <entry name="BackFont" type="Font">
<label>Font used for back of flashcard</label> <label>Font used for back of flashcard</label>
@ -90,15 +90,15 @@
</entry> </entry>
<entry name="BackTextColor" type="Color"> <entry name="BackTextColor" type="Color">
<label>Color used for text on back of flashcard</label> <label>Color used for text on back of flashcard</label>
<default code="true">Qt::black</default> <default code="true">TQt::black</default>
</entry> </entry>
<entry name="BackCardColor" type="Color"> <entry name="BackCardColor" type="Color">
<label>Color used for back of flashcard</label> <label>Color used for back of flashcard</label>
<default code="true">Qt::white</default> <default code="true">TQt::white</default>
</entry> </entry>
<entry name="BackFrameColor" type="Color"> <entry name="BackFrameColor" type="Color">
<label>Color used for frame on back of flashcard</label> <label>Color used for frame on back of flashcard</label>
<default code="true">Qt::blue</default> <default code="true">TQt::blue</default>
</entry> </entry>
</group> </group>
<group name="TDENewStuff"> <group name="TDENewStuff">

@ -33,7 +33,7 @@ WQPrintDialogPage::WQPrintDialogPage(TQWidget *parent, const char *name )
TQGridLayout * l = new TQGridLayout( this, 1, 1, 11, 6); TQGridLayout * l = new TQGridLayout( this, 1, 1, 11, 6);
g = new TQButtonGroup(i18n("Select Type of Printout"), this ); g = new TQButtonGroup(i18n("Select Type of Printout"), this );
g->setColumnLayout(0, Qt::Vertical ); g->setColumnLayout(0, TQt::Vertical );
g->layout()->setSpacing( 6 ); g->layout()->setSpacing( 6 );
g->layout()->setMargin( 11 ); g->layout()->setMargin( 11 );
TQGridLayout * v = new TQGridLayout( g->layout() ); TQGridLayout * v = new TQGridLayout( g->layout() );

@ -448,7 +448,7 @@ ExtDateTable::contentsMousePressEvent(TQMouseEvent *e)
emit tableClicked(); emit tableClicked();
if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) if ( e->button() == TQt::RightButton && d->popupMenuEnabled )
{ {
TDEPopupMenu *menu = new TDEPopupMenu(); TDEPopupMenu *menu = new TDEPopupMenu();
@ -720,7 +720,7 @@ ExtDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
void void
ExtDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) ExtDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e)
{ {
if(!isEnabled() || e->button() != Qt::LeftButton) if(!isEnabled() || e->button() != TQt::LeftButton)
{ {
KNotifyClient::beep(); KNotifyClient::beep();
return; return;
@ -747,7 +747,7 @@ ExtDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e)
void void
ExtDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) ExtDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e)
{ {
if (e->state() & Qt::LeftButton) if (e->state() & TQt::LeftButton)
{ {
int row, col; int row, col;
TQPoint mouseCoord; TQPoint mouseCoord;

@ -241,7 +241,7 @@ TQString ExtDate::longDayName( int weekday ) {return m_longDayNames[weekday-1];}
#ifndef TQT_NO_TEXTSTRING #ifndef TQT_NO_TEXTSTRING
#if !defined(TQT_NO_SPRINTF) #if !defined(TQT_NO_SPRINTF)
TQString ExtDate::toString( Qt::DateFormat f) const TQString ExtDate::toString( TQt::DateFormat f) const
{ {
TQString a_format; TQString a_format;
@ -249,15 +249,15 @@ TQString ExtDate::toString( Qt::DateFormat f) const
switch (f) switch (f)
{ {
case Qt::TextDate : // Sat May 20 1995 case TQt::TextDate : // Sat May 20 1995
a_format = "%a %b %e %Y"; a_format = "%a %b %e %Y";
break; break;
case Qt::ISODate : // YYYY-MM-DD case TQt::ISODate : // YYYY-MM-DD
a_format = "%Y-%m-%d"; a_format = "%Y-%m-%d";
break; break;
case Qt::LocalDate : // local settings case TQt::LocalDate : // local settings
a_format = TDEGlobal::locale()->dateFormat(); a_format = TDEGlobal::locale()->dateFormat();
break; break;
@ -377,7 +377,7 @@ int ExtDate::daysTo( const ExtDate & a_date) const
return a_date.jd() - jd(); return a_date.jd() - jd();
} }
ExtDate ExtDate::currentDate(Qt::TimeSpec ts) ExtDate ExtDate::currentDate(TQt::TimeSpec ts)
{ {
time_t a_current_time; time_t a_current_time;
struct tm a_current_time_tm; struct tm a_current_time_tm;
@ -404,19 +404,19 @@ ExtDate ExtDate::currentDate(Qt::TimeSpec ts)
//Try both DateFormat values //Try both DateFormat values
ExtDate ExtDate::fromString( const TQString& s ) ExtDate ExtDate::fromString( const TQString& s )
{ {
ExtDate dResult = ExtDate::fromString( s, Qt::TextDate ); ExtDate dResult = ExtDate::fromString( s, TQt::TextDate );
if ( dResult.isValid() ) return dResult; if ( dResult.isValid() ) return dResult;
dResult = ExtDate::fromString( s, Qt::ISODate ); dResult = ExtDate::fromString( s, TQt::ISODate );
if ( dResult.isValid() ) return dResult; if ( dResult.isValid() ) return dResult;
else return ExtDate(); //invalid else return ExtDate(); //invalid
} }
ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f ) ExtDate ExtDate::fromString( const TQString& s, TQt::DateFormat f )
{ {
ExtDate dt = ExtDate(); //initialize invalid date ExtDate dt = ExtDate(); //initialize invalid date
if ( s.isEmpty() ) { return dt; } if ( s.isEmpty() ) { return dt; }
if ( f == Qt::LocalDate ) { //can't use LocalFormat if ( f == TQt::LocalDate ) { //can't use LocalFormat
#if defined(TQT_CHECK_RANGE) #if defined(TQT_CHECK_RANGE)
tqWarning( "TQDate::fromString: Parameter out of range" ); tqWarning( "TQDate::fromString: Parameter out of range" );
#endif #endif
@ -424,7 +424,7 @@ ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f )
} }
switch( f ) { switch( f ) {
case Qt::ISODate : case TQt::ISODate :
{ {
int year( s.mid( 0, 4 ).toInt() ); int year( s.mid( 0, 4 ).toInt() );
int month( s.mid( 5, 2 ).toInt() ); int month( s.mid( 5, 2 ).toInt() );
@ -437,7 +437,7 @@ ExtDate ExtDate::fromString( const TQString& s, Qt::DateFormat f )
default : default :
#ifndef TQT_NO_TEXTDATE #ifndef TQT_NO_TEXTDATE
case Qt::TextDate : case TQt::TextDate :
{ {
//Three possible date formats: //Three possible date formats:
//dd mth yyyy; mth dd yyyy; wkd mth dd yyyy //dd mth yyyy; mth dd yyyy; wkd mth dd yyyy
@ -706,7 +706,7 @@ uint ExtDateTime::toTime_t() const
void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC ) void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC )
{ {
setTime_t( secsSince1Jan1970UTC, Qt::LocalTime ); setTime_t( secsSince1Jan1970UTC, TQt::LocalTime );
} }
/*! /*!
@ -721,7 +721,7 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC )
\sa toTime_t() \sa toTime_t()
*/ */
void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts ) void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, TQt::TimeSpec ts )
{ {
time_t tmp = (time_t) secsSince1Jan1970UTC; time_t tmp = (time_t) secsSince1Jan1970UTC;
tm *brokenDown = 0; tm *brokenDown = 0;
@ -771,16 +771,16 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts )
Returns the datetime as a string. The \a f parameter determines Returns the datetime as a string. The \a f parameter determines
the format of the string. the format of the string.
If \a f is \c Qt::TextDate, the string format is "Wed May 20 If \a f is \c TQt::TextDate, the string format is "Wed May 20
03:40:13 1998" (using ExtDate::shortDayName(), ExtDate::shortMonthName(), 03:40:13 1998" (using ExtDate::shortDayName(), ExtDate::shortMonthName(),
and TQTime::toString() to generate the string, so the day and month and TQTime::toString() to generate the string, so the day and month
names will have localized names). names will have localized names).
If \a f is \c Qt::ISODate, the string format corresponds to the If \a f is \c TQt::ISODate, the string format corresponds to the
ISO 8601 extended specification for representations of dates and ISO 8601 extended specification for representations of dates and
times, which is YYYY-MM-DDTHH:MM:SS. times, which is YYYY-MM-DDTHH:MM:SS.
If \a f is \c Qt::LocalDate, the string format depends on the If \a f is \c TQt::LocalDate, the string format depends on the
locale settings of the system. locale settings of the system.
If the format \a f is invalid or the datetime is invalid, toString() If the format \a f is invalid or the datetime is invalid, toString()
@ -789,20 +789,20 @@ void ExtDateTime::setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ts )
\sa ExtDate::toString() TQTime::toString() \sa ExtDate::toString() TQTime::toString()
*/ */
TQString ExtDateTime::toString( Qt::DateFormat f ) const TQString ExtDateTime::toString( TQt::DateFormat f ) const
{ {
if ( !isValid() ) if ( !isValid() )
return TQString(); return TQString();
if ( f == Qt::ISODate ) { if ( f == TQt::ISODate ) {
return d.toString( Qt::ISODate ) + "T" + t.toString( Qt::ISODate ); return d.toString( TQt::ISODate ) + "T" + t.toString( TQt::ISODate );
} }
#ifndef TQT_NO_TEXTDATE #ifndef TQT_NO_TEXTDATE
else if ( f == Qt::TextDate ) { else if ( f == TQt::TextDate ) {
return toString( "%a %b %e %Y %H:%M:%S" ); return toString( "%a %b %e %Y %H:%M:%S" );
} }
#endif #endif
else if ( f == Qt::LocalDate ) { else if ( f == TQt::LocalDate ) {
return toString( TDEGlobal::locale()->dateFormat() return toString( TDEGlobal::locale()->dateFormat()
+ " " + TDEGlobal::locale()->timeFormat() ); + " " + TDEGlobal::locale()->timeFormat() );
} }
@ -1028,17 +1028,17 @@ bool ExtDateTime::operator>=( const ExtDateTime &dt ) const
ExtDateTime ExtDateTime::currentDateTime() ExtDateTime ExtDateTime::currentDateTime()
{ {
return currentDateTime( Qt::LocalTime ); return currentDateTime( TQt::LocalTime );
} }
/*! /*!
Returns the current datetime, as reported by the system clock, for the Returns the current datetime, as reported by the system clock, for the
TimeSpec \a ts. The default TimeSpec is LocalTime. TimeSpec \a ts. The default TimeSpec is LocalTime.
\sa ExtDate::currentDate(), TQTime::currentTime(), Qt::TimeSpec \sa ExtDate::currentDate(), TQTime::currentTime(), TQt::TimeSpec
*/ */
ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts ) ExtDateTime ExtDateTime::currentDateTime( TQt::TimeSpec ts )
{ {
ExtDateTime dt; ExtDateTime dt;
dt.setDate( ExtDate::currentDate(ts) ); dt.setDate( ExtDate::currentDate(ts) );
@ -1054,28 +1054,28 @@ ExtDateTime ExtDateTime::currentDateTime( Qt::TimeSpec ts )
Returns the ExtDateTime represented by the string \a s, using the Returns the ExtDateTime represented by the string \a s, using the
format \a f, or an invalid datetime if this is not possible. format \a f, or an invalid datetime if this is not possible.
Note for \c Qt::TextDate: It is recommended that you use the Note for \c TQt::TextDate: It is recommended that you use the
English short month names (e.g. "Jan"). Although localized month English short month names (e.g. "Jan"). Although localized month
names can also be used, they depend on the user's locale settings. names can also be used, they depend on the user's locale settings.
\warning Note that \c Qt::LocalDate cannot be used here. \warning Note that \c TQt::LocalDate cannot be used here.
*/ */
ExtDateTime ExtDateTime::fromString( const TQString& s ) ExtDateTime ExtDateTime::fromString( const TQString& s )
{ {
ExtDateTime dtResult = ExtDateTime::fromString( s, Qt::TextDate ); ExtDateTime dtResult = ExtDateTime::fromString( s, TQt::TextDate );
if ( dtResult.isValid() ) return dtResult; if ( dtResult.isValid() ) return dtResult;
dtResult = ExtDateTime::fromString( s, Qt::ISODate ); dtResult = ExtDateTime::fromString( s, TQt::ISODate );
if ( dtResult.isValid() ) return dtResult; if ( dtResult.isValid() ) return dtResult;
else return ExtDateTime(); //invalid else return ExtDateTime(); //invalid
} }
ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f ) ExtDateTime ExtDateTime::fromString( const TQString& s, TQt::DateFormat f )
{ {
ExtDateTime dt; ExtDateTime dt;
if ( ( s.isEmpty() ) || ( f == Qt::LocalDate ) ) { if ( ( s.isEmpty() ) || ( f == TQt::LocalDate ) ) {
#if defined(TQT_CHECK_RANGE) #if defined(TQT_CHECK_RANGE)
tqWarning( "ExtDateTime::fromString: Parameter out of range" ); tqWarning( "ExtDateTime::fromString: Parameter out of range" );
#endif #endif
@ -1083,17 +1083,17 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f )
return dt; return dt;
} }
if ( f == Qt::ISODate ) { if ( f == TQt::ISODate ) {
if ( s.length() <= 10 || ! s.contains( ':' ) ) { //no time specified if ( s.length() <= 10 || ! s.contains( ':' ) ) { //no time specified
TQTime t = TQTime(0,0,0); TQTime t = TQTime(0,0,0);
return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ) ); return ExtDateTime( ExtDate::fromString( s.mid(0,10), TQt::ISODate ) );
} else { } else {
return ExtDateTime( ExtDate::fromString( s.mid(0,10), Qt::ISODate ), return ExtDateTime( ExtDate::fromString( s.mid(0,10), TQt::ISODate ),
TQTime::fromString( s.mid(11), Qt::ISODate ) ); TQTime::fromString( s.mid(11), TQt::ISODate ) );
} }
} }
#if !defined(TQT_NO_REGEXP) && !defined(TQT_NO_TEXTDATE) #if !defined(TQT_NO_REGEXP) && !defined(TQT_NO_TEXTDATE)
else if ( f == Qt::TextDate ) { else if ( f == TQt::TextDate ) {
//parse the time, if it exists. //parse the time, if it exists.
TQTime time; TQTime time;
@ -1110,7 +1110,7 @@ ExtDateTime ExtDateTime::fromString( const TQString& s, Qt::DateFormat f )
} }
//sd is now just the date string. //sd is now just the date string.
ExtDate date = ExtDate::fromString( s, Qt::TextDate ); ExtDate date = ExtDate::fromString( s, TQt::TextDate );
return ExtDateTime( date, time ); return ExtDateTime( date, time );
} }

@ -65,7 +65,7 @@ public:
#endif //TQT_NO_TEXTDATE #endif //TQT_NO_TEXTDATE
#ifndef TQT_NO_TEXTSTRING #ifndef TQT_NO_TEXTSTRING
#if !defined(TQT_NO_SPRINTF) #if !defined(TQT_NO_SPRINTF)
TQString toString( Qt::DateFormat f = Qt::TextDate ) const; TQString toString( TQt::DateFormat f = TQt::TextDate ) const;
#endif #endif
TQString toString( const TQString& format ) const; TQString toString( const TQString& format ) const;
#endif #endif
@ -84,10 +84,10 @@ public:
bool operator>( const ExtDate &d ) const { return m_jd > d.jd(); } bool operator>( const ExtDate &d ) const { return m_jd > d.jd(); }
bool operator>=( const ExtDate &d ) const { return m_jd >= d.jd(); } bool operator>=( const ExtDate &d ) const { return m_jd >= d.jd(); }
static ExtDate currentDate( Qt::TimeSpec ts = Qt::LocalTime ); static ExtDate currentDate( TQt::TimeSpec ts = TQt::LocalTime );
#ifndef TQT_NO_DATESTRING #ifndef TQT_NO_DATESTRING
static ExtDate fromString( const TQString &s ); static ExtDate fromString( const TQString &s );
static ExtDate fromString( const TQString &s, Qt::DateFormat f ); static ExtDate fromString( const TQString &s, TQt::DateFormat f );
#endif #endif
static bool isValid( int y, int m, int d ); static bool isValid( int y, int m, int d );
static bool leapYear( int year ); static bool leapYear( int year );
@ -137,10 +137,10 @@ public:
void setDate( const ExtDate &date ) { d = date; } void setDate( const ExtDate &date ) { d = date; }
void setTime( const TQTime &time ) { t = time; } void setTime( const TQTime &time ) { t = time; }
void setTime_t( uint secsSince1Jan1970UTC ); void setTime_t( uint secsSince1Jan1970UTC );
void setTime_t( uint secsSince1Jan1970UTC, Qt::TimeSpec ); void setTime_t( uint secsSince1Jan1970UTC, TQt::TimeSpec );
#ifndef TQT_NO_DATESTRING #ifndef TQT_NO_DATESTRING
#ifndef TQT_NO_SPRINTF #ifndef TQT_NO_SPRINTF
TQString toString( Qt::DateFormat f = Qt::TextDate ) const; TQString toString( TQt::DateFormat f = TQt::TextDate ) const;
#endif #endif
TQString toString( const TQString& format ) const; TQString toString( const TQString& format ) const;
#endif #endif
@ -159,10 +159,10 @@ public:
bool operator>=( const ExtDateTime &dt ) const; bool operator>=( const ExtDateTime &dt ) const;
static ExtDateTime currentDateTime(); static ExtDateTime currentDateTime();
static ExtDateTime currentDateTime( Qt::TimeSpec ); static ExtDateTime currentDateTime( TQt::TimeSpec );
#ifndef TQT_NO_DATESTRING #ifndef TQT_NO_DATESTRING
static ExtDateTime fromString( const TQString &s ); static ExtDateTime fromString( const TQString &s );
static ExtDateTime fromString( const TQString &s, Qt::DateFormat f ); static ExtDateTime fromString( const TQString &s, TQt::DateFormat f );
#endif #endif
private: private:
ExtDate d; ExtDate d;

@ -112,7 +112,7 @@ static void readLocaleSettings()
*lDateSep = "-"; *lDateSep = "-";
*lTimeSep = ":"; *lTimeSep = ":";
#endif #endif
TQString d = ExtDate( 1999, 11, 22 ).toString( Qt::LocalDate ); TQString d = ExtDate( 1999, 11, 22 ).toString( TQt::LocalDate );
dpos = d.find( "22" ); dpos = d.find( "22" );
mpos = d.find( "11" ); mpos = d.find( "11" );
ypos = d.find( "99" ); ypos = d.find( "99" );
@ -142,7 +142,7 @@ static void readLocaleSettings()
} }
#ifndef TQ_WS_WIN #ifndef TQ_WS_WIN
TQString t = TQTime( 11, 22, 33 ).toString( Qt::LocalDate ); TQString t = TQTime( 11, 22, 33 ).toString( TQt::LocalDate );
dpos = t.find( "11" ); dpos = t.find( "11" );
mpos = t.find( "22" ); mpos = t.find( "22" );
ypos = t.find( "33" ); ypos = t.find( "33" );

Loading…
Cancel
Save