summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/dmsbox.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kstars/kstars/dmsbox.cpp
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars/kstars/dmsbox.cpp')
-rw-r--r--kstars/kstars/dmsbox.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kstars/kstars/dmsbox.cpp b/kstars/kstars/dmsbox.cpp
index fa734fae..1857b1bf 100644
--- a/kstars/kstars/dmsbox.cpp
+++ b/kstars/kstars/dmsbox.cpp
@@ -21,31 +21,31 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
-dmsBox::dmsBox(QWidget *parent, const char *name, bool dg)
+dmsBox::dmsBox(TQWidget *parent, const char *name, bool dg)
: KLineEdit(parent,name), EmptyFlag(true) {
setMaxLength(14);
setMaximumWidth(160);
setDegType( dg );
- connect( this, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
}
void dmsBox::setEmptyText() {
- QPalette p = palette();
- QColor txc = p.color( QPalette::Active, QColorGroup::Text );
- QColor bgc = paletteBackgroundColor();
+ TQPalette p = palette();
+ TQColor txc = p.color( TQPalette::Active, TQColorGroup::Text );
+ TQColor bgc = paletteBackgroundColor();
int r( ( txc.red() + bgc.red() )/2 );
int g( ( txc.green() + bgc.green() )/2 );
int b( ( txc.blue() + bgc.blue() )/2 );
- p.setColor( QPalette::Active, QColorGroup::Text, QColor( r, g, b ) );
- p.setColor( QPalette::Inactive, QColorGroup::Text, QColor( r, g, b ) );
+ p.setColor( TQPalette::Active, TQColorGroup::Text, TQColor( r, g, b ) );
+ p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQColor( r, g, b ) );
setPalette( p );
if ( degType() )
@@ -56,7 +56,7 @@ void dmsBox::setEmptyText() {
EmptyFlag = true;
}
-void dmsBox::focusInEvent( QFocusEvent *e ) {
+void dmsBox::focusInEvent( TQFocusEvent *e ) {
KLineEdit::focusInEvent( e );
if ( EmptyFlag ) {
@@ -66,7 +66,7 @@ void dmsBox::focusInEvent( QFocusEvent *e ) {
}
}
-void dmsBox::focusOutEvent( QFocusEvent *e ) {
+void dmsBox::focusOutEvent( TQFocusEvent *e ) {
KLineEdit::focusOutEvent( e );
if ( text().isEmpty() ) {
@@ -74,7 +74,7 @@ void dmsBox::focusOutEvent( QFocusEvent *e ) {
}
}
-void dmsBox::slotTextChanged( const QString &t ) {
+void dmsBox::slotTextChanged( const TQString &t ) {
if ( ! hasFocus() ) {
if ( EmptyFlag && ! t.isEmpty() ) {
unsetPalette();
@@ -91,11 +91,11 @@ void dmsBox::setDegType( bool t ) {
deg = t;
if ( deg ) {
- QToolTip::add( this, i18n( "Angle value in degrees. You may enter a simple integer \nor a floating-point value, or space- or colon-delimited values \nspecifying degrees, arcminutes and arcseconds." ) );
- QWhatsThis::add( this, i18n( "Enter an angle value in degrees. The angle can be expressed as a simple integer (\"45\") or floating-point (\"45.333\") value, or as space- or colon-delimited values specifying degrees, arcminutes and arcseconds (\"45:20\", \"45:20:00\", \"45:20\", \"45 20.0\", etc.)." ) );
+ TQToolTip::add( this, i18n( "Angle value in degrees. You may enter a simple integer \nor a floating-point value, or space- or colon-delimited values \nspecifying degrees, arcminutes and arcseconds." ) );
+ TQWhatsThis::add( this, i18n( "Enter an angle value in degrees. The angle can be expressed as a simple integer (\"45\") or floating-point (\"45.333\") value, or as space- or colon-delimited values specifying degrees, arcminutes and arcseconds (\"45:20\", \"45:20:00\", \"45:20\", \"45 20.0\", etc.)." ) );
} else {
- QToolTip::add( this, i18n( "Angle value in hours. You may enter a simple integer \nor floating-point value, or space- or colon-delimited values \nspecifying hours, minutes and seconds." ) );
- QWhatsThis::add( this, i18n( "Enter an angle value in hours. The angle can be expressed as a simple integer (\"12\") or floating-point (\"12.333\") value, or as space- or colon-delimited values specifying hours, minutes and seconds (\"12:20\", \"12:20:00\", \"12:20\", \"12 20.0\", etc.)." ) );
+ TQToolTip::add( this, i18n( "Angle value in hours. You may enter a simple integer \nor floating-point value, or space- or colon-delimited values \nspecifying hours, minutes and seconds." ) );
+ TQWhatsThis::add( this, i18n( "Enter an angle value in hours. The angle can be expressed as a simple integer (\"12\") or floating-point (\"12.333\") value, or as space- or colon-delimited values specifying hours, minutes and seconds (\"12:20\", \"12:20:00\", \"12:20\", \"12 20.0\", etc.)." ) );
}
clear();
@@ -108,14 +108,14 @@ void dmsBox::showInDegrees (const dms *d) { showInDegrees( dms( *d ) ); }
void dmsBox::showInDegrees (dms d)
{
double seconds = d.arcsec() + d.marcsec()/1000.;
- setDMS( QString().sprintf( "%02d %02d %05.2f", d.degree(), d.arcmin(), seconds ) );
+ setDMS( TQString().sprintf( "%02d %02d %05.2f", d.degree(), d.arcmin(), seconds ) );
}
void dmsBox::showInHours (const dms *d) { showInHours( dms( *d ) ); }
void dmsBox::showInHours (dms d)
{
double seconds = d.second() + d.msecond()/1000.;
- setDMS( QString().sprintf( "%02d %02d %05.2f", d.hour(), d.minute(), seconds ) );
+ setDMS( TQString().sprintf( "%02d %02d %05.2f", d.hour(), d.minute(), seconds ) );
}
void dmsBox::show(const dms *d, bool deg) { show( dms( *d ),deg ); }