summaryrefslogtreecommitdiffstats
path: root/ksplashml/themeengine/standard
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /ksplashml/themeengine/standard
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksplashml/themeengine/standard')
-rw-r--r--ksplashml/themeengine/standard/themestandard.cpp44
-rw-r--r--ksplashml/themeengine/standard/themestandard.h22
-rw-r--r--ksplashml/themeengine/standard/wndicon.cpp38
-rw-r--r--ksplashml/themeengine/standard/wndicon.h10
-rw-r--r--ksplashml/themeengine/standard/wndstatus.cpp38
-rw-r--r--ksplashml/themeengine/standard/wndstatus.h14
6 files changed, 83 insertions, 83 deletions
diff --git a/ksplashml/themeengine/standard/themestandard.cpp b/ksplashml/themeengine/standard/themestandard.cpp
index ff7929bfe..c7e9220e2 100644
--- a/ksplashml/themeengine/standard/themestandard.cpp
+++ b/ksplashml/themeengine/standard/themestandard.cpp
@@ -18,11 +18,11 @@
#include <kstandarddirs.h>
#include <kconfig.h>
-#include <qdesktopwidget.h>
-#include <qlabel.h>
-#include <qpalette.h>
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqdesktopwidget.h>
+#include <tqlabel.h>
+#include <tqpalette.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
#include <objkstheme.h>
#include "themestandard.h"
@@ -30,10 +30,10 @@
#include "wndicon.h"
#include "wndstatus.h"
-ThemeStandard::ThemeStandard( QWidget *parent, const char *name, const QStringList &args )
+ThemeStandard::ThemeStandard( TQWidget *parent, const char *name, const TQStringList &args )
:ThemeEngine( parent, name, args ), mIcon(0L), mPrevIcon(0L), mIconCount(0), mStdIconWidth(-1),
mIconPos(WndIcon::HBottomLeft), mSbAtTop(false), mSbVisible(true), mSbPbVisible(true), mSbFontName("helvetica"),
- mSbFontSz(16), mSbFontBold(true), mSbFontItalic(false), mSbFont(QFont()), mSbFg(QColor()), mSbBg(QColor()),
+ mSbFontSz(16), mSbFontBold(true), mSbFontItalic(false), mSbFont(TQFont()), mSbFg(TQColor()), mSbBg(TQColor()),
mSbIcon("run"), mIconsVisible(true), mIconsJumping(true), mSplashScreen("(Default)")
{
_readSettings();
@@ -42,19 +42,19 @@ ThemeStandard::ThemeStandard( QWidget *parent, const char *name, const QStringLi
void ThemeStandard::_initUi()
{
- setFrameStyle( QFrame::NoFrame );
+ setFrameStyle( TQFrame::NoFrame );
- QString pixName = mTheme->locateThemeData( mSplashScreen );
+ TQString pixName = mTheme->locateThemeData( mSplashScreen );
if( mSplashScreen == "(Default)" || pixName.isEmpty() )
{
- QString resource_prefix = "pics/";
+ TQString resource_prefix = "pics/";
if ( mTheme->loColor() )
resource_prefix += "locolor/";
pixName = locate( "appdata", resource_prefix + "splash.png");
}
- QPixmap px = QPixmap( pixName );
+ TQPixmap px = TQPixmap( pixName );
if( !px.isNull() )
{
@@ -62,7 +62,7 @@ void ThemeStandard::_initUi()
int pw = px.width();
int ph = px.height();
- QLabel *lbl = new QLabel( this );
+ TQLabel *lbl = new TQLabel( this );
lbl->setBackgroundMode( NoBackground );
lbl->setFixedSize( pw, ph );
lbl->setPixmap( px );
@@ -75,16 +75,16 @@ void ThemeStandard::_initUi()
resize( 0, 0 );
}
- const QRect rect = kapp->desktop()->screenGeometry( mTheme->xineramaScreen() );
+ const TQRect rect = kapp->desktop()->screenGeometry( mTheme->xineramaScreen() );
// KGlobalSettings::splashScreenDesktopGeometry(); cannot be used here.
move( rect.x() + (rect.width() - size().width())/2,
rect.y() + (rect.height() - size().height())/2 );
- mStatus = new WndStatus( QPalette(), mTheme->xineramaScreen(), mSbAtTop, mSbPbVisible, mSbFont, mSbFg, mSbBg, mSbIcon );
+ mStatus = new WndStatus( TQPalette(), mTheme->xineramaScreen(), mSbAtTop, mSbPbVisible, mSbFont, mSbFg, mSbBg, mSbIcon );
}
-void ThemeStandard::showEvent( QShowEvent * )
+void ThemeStandard::showEvent( TQShowEvent * )
{
ThemeEngine::show();
@@ -101,9 +101,9 @@ void ThemeStandard::showEvent( QShowEvent * )
}
// Adjust the visible icon.
-void ThemeStandard::slotSetPixmap( const QString& pxn )
+void ThemeStandard::slotSetPixmap( const TQString& pxn )
{
- QPixmap px = DesktopIcon( pxn );
+ TQPixmap px = DesktopIcon( pxn );
if ( px.isNull() )
px = DesktopIcon( "go" );
@@ -119,7 +119,7 @@ void ThemeStandard::slotSetPixmap( const QString& pxn )
mStdIconWidth = DesktopIcon( "go" ).width();
mIcon = new WndIcon( ++mIconCount, mStdIconWidth, mStatusBarHeight, mTheme->xineramaScreen(),
- px, QString::null, mIconPos, mSbAtTop, mIconsJumping );
+ px, TQString::null, mIconPos, mSbAtTop, mIconsJumping );
mIcon->show();
if( mIconsJumping )
@@ -139,11 +139,11 @@ void ThemeStandard::_readSettings()
if ( !cfg )
return;
- //if ( !cfg->hasGroup( QString("KSplash Theme: %1").arg(mTheme->theme()) ) )
+ //if ( !cfg->hasGroup( TQString("KSplash Theme: %1").arg(mTheme->theme()) ) )
// return;
- cfg->setGroup( QString("KSplash Theme: %1").arg(mTheme->theme()) );
+ cfg->setGroup( TQString("KSplash Theme: %1").arg(mTheme->theme()) );
- QString sbpos = cfg->readEntry( "Statusbar Position", "Bottom" ).upper();
+ TQString sbpos = cfg->readEntry( "Statusbar Position", "Bottom" ).upper();
mSbAtTop = ( sbpos == "TOP" );
mSbVisible = cfg->readBoolEntry( "Statusbar Visible", true);
mSbPbVisible = cfg->readBoolEntry( "Progress Visible", true);
@@ -152,7 +152,7 @@ void ThemeStandard::_readSettings()
mSbFontSz = cfg->readNumEntry( "Statusbar Font Size", 16 );
mSbFontBold = cfg->readBoolEntry( "Statusbar Font Bold", true );
mSbFontItalic = cfg->readBoolEntry( "Statusbar Font Italic", false );
- mSbFont = QFont( mSbFontName, mSbFontSz, ( mSbFontBold? QFont::Bold : QFont::Normal ) );
+ mSbFont = TQFont( mSbFontName, mSbFontSz, ( mSbFontBold? TQFont::Bold : TQFont::Normal ) );
if( mSbFontItalic )
mSbFont.setItalic( true );
diff --git a/ksplashml/themeengine/standard/themestandard.h b/ksplashml/themeengine/standard/themestandard.h
index a24f668db..2e5d1aeb0 100644
--- a/ksplashml/themeengine/standard/themestandard.h
+++ b/ksplashml/themeengine/standard/themestandard.h
@@ -44,8 +44,8 @@ class ThemeStandard: public ThemeEngine
{
Q_OBJECT
public:
- ThemeStandard( QWidget *, const char*, const QStringList& );
- //inline const ThemeEngineConfig *config( QWidget *p, KConfig *kc ) { return 0L; }
+ ThemeStandard( TQWidget *, const char*, const TQStringList& );
+ //inline const ThemeEngineConfig *config( TQWidget *p, KConfig *kc ) { return 0L; }
public slots:
inline void slotUpdateProgress( int i )
@@ -56,14 +56,14 @@ public slots:
{
if( mStatus ) mStatus->slotUpdateSteps( i );
}
- inline void slotSetText( const QString& s )
+ inline void slotSetText( const TQString& s )
{
if( mStatus ) mStatus->slotSetMessage( s );
}
- void slotSetPixmap( const QString& );
+ void slotSetPixmap( const TQString& );
private:
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
void _readSettings();
void _initUi();
@@ -77,17 +77,17 @@ private:
bool mSbAtTop;
bool mSbVisible;
bool mSbPbVisible;
- QString mSbFontName;
+ TQString mSbFontName;
int mSbFontSz;
bool mSbFontBold;
bool mSbFontItalic;
- QFont mSbFont;
- QColor mSbFg;
- QColor mSbBg;
- QString mSbIcon;
+ TQFont mSbFont;
+ TQColor mSbFg;
+ TQColor mSbBg;
+ TQString mSbIcon;
bool mIconsVisible;
bool mIconsJumping;
- QString mSplashScreen;
+ TQString mSplashScreen;
};
#endif
diff --git a/ksplashml/themeengine/standard/wndicon.cpp b/ksplashml/themeengine/standard/wndicon.cpp
index 0440a0181..ce153e461 100644
--- a/ksplashml/themeengine/standard/wndicon.cpp
+++ b/ksplashml/themeengine/standard/wndicon.cpp
@@ -21,13 +21,13 @@
#include <kglobalsettings.h>
#include <kwin.h>
-#include <qdesktopwidget.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqdesktopwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include "wndicon.h"
#include "wndicon.moc"
@@ -38,19 +38,19 @@ WndIcon::WndIcon(
unsigned int status_height,
int xineramaScreen,
const KPixmap& pix,
- const QString& text,
+ const TQString& text,
Position icon_position,
bool statusAtTop,
bool iconsJumping )
- :QHBox( 0, "wndSplash", WStyle_Customize|WX11BypassWM ),
+ :TQHBox( 0, "wndSplash", WStyle_Customize|WX11BypassWM ),
mStatusText(text), mIconPos(icon_position), mXineramaScreen( xineramaScreen ), mPosX(0), mPosY(0), mGroundX(0), mGroundY(0),
mVelocity(8.0), mInitialVelocity(8.0), mGravity(0.8),
mIconNum(icon_num), mStatusHeight(status_height), mIconSize(icon_std_width), mStatusAtTop(statusAtTop),
mStopJump(false), mIconJumping(iconsJumping)
{
- setFrameStyle( QFrame::NoFrame );
+ setFrameStyle( TQFrame::NoFrame );
- QLabel *w = new QLabel( this );
+ TQLabel *w = new TQLabel( this );
w->setFixedSize( pix.width(), pix.height() );
w->setPixmap( pix );
if(pix.mask())
@@ -62,15 +62,15 @@ WndIcon::WndIcon(
resize( pix.width(), pix.height() );
// Set initial position of icon, and ground.
- QPoint p = determinePosition();
+ TQPoint p = determinePosition();
mGroundX = mPosX = p.x();
mGroundY = mPosY = p.y();
move( p + kapp->desktop()->screenGeometry( mXineramaScreen ).topLeft() );
if( mIconJumping )
{
- QTimer *t = new QTimer( this );
- connect(t, SIGNAL(timeout()), SLOT(slotJump()));
+ TQTimer *t = new TQTimer( this );
+ connect(t, TQT_SIGNAL(timeout()), TQT_SLOT(slotJump()));
t->start( 50, false );
}
}
@@ -78,7 +78,7 @@ WndIcon::WndIcon(
void WndIcon::show()
{
emit setStatusText( mStatusText );
- QHBox::show();
+ TQHBox::show();
}
// Emit our EXTRA signal without becoming visible.
@@ -93,12 +93,12 @@ void WndIcon::noshow()
* screen. This is placed in its own function due to the massive
* complexity required by the variables involved.
*/
-QPoint WndIcon::determinePosition()
+TQPoint WndIcon::determinePosition()
{
int DW, DH, SBH, wid, X, Y, x, y, nSlot, topshift, bottomshift;
bottomshift = topshift = 0;
- const QRect srect = kapp->desktop()->screenGeometry( mXineramaScreen );
+ const TQRect srect = kapp->desktop()->screenGeometry( mXineramaScreen );
// KGlobalSettings::splashScreenDesktopGeometry(); cannot be used here.
DW = srect.width();
DH = srect.height();
@@ -220,7 +220,7 @@ QPoint WndIcon::determinePosition()
return(determinePosition());
break;
}
- return( QPoint( X, Y ) );
+ return( TQPoint( X, Y ) );
}
// Make the icons jump in a macosx-like way (Thanks, Jone!:)
@@ -301,7 +301,7 @@ void WndIcon::slotJump()
mPosY = (int)((float)mPosY - mVelocity );
break;
}
- move( QPoint( mPosX, mPosY ) + kapp->desktop()->screenGeometry( mXineramaScreen ).topLeft() );
+ move( TQPoint( mPosX, mPosY ) + kapp->desktop()->screenGeometry( mXineramaScreen ).topLeft() );
}
void WndIcon::slotStopJumping()
diff --git a/ksplashml/themeengine/standard/wndicon.h b/ksplashml/themeengine/standard/wndicon.h
index a47082ae6..d488f85df 100644
--- a/ksplashml/themeengine/standard/wndicon.h
+++ b/ksplashml/themeengine/standard/wndicon.h
@@ -20,7 +20,7 @@
#include <kpixmap.h>
-#include <qhbox.h>
+#include <tqhbox.h>
/**
* @short Displays an icon on the screen.
@@ -43,10 +43,10 @@ public:
VTopRight = 13
};
- WndIcon( unsigned int, unsigned int, unsigned int, int, const KPixmap&, const QString&, Position, bool, bool );
+ WndIcon( unsigned int, unsigned int, unsigned int, int, const KPixmap&, const TQString&, Position, bool, bool );
signals:
- void setStatusText( const QString& );
+ void setStatusText( const TQString& );
public slots:
void show();
@@ -55,10 +55,10 @@ public slots:
void slotJump();
private:
- QPoint determinePosition();
+ TQPoint determinePosition();
protected:
- QString mStatusText;
+ TQString mStatusText;
Position mIconPos;
int mXineramaScreen;
int mPosX, mPosY, mGroundX, mGroundY;
diff --git a/ksplashml/themeengine/standard/wndstatus.cpp b/ksplashml/themeengine/standard/wndstatus.cpp
index 3b8582c89..04685d9cf 100644
--- a/ksplashml/themeengine/standard/wndstatus.cpp
+++ b/ksplashml/themeengine/standard/wndstatus.cpp
@@ -18,11 +18,11 @@
#include <kprogress.h>
#include <kwin.h>
-#include <qdesktopwidget.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqdesktopwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include "wndstatus.h"
#include "wndstatus.moc"
@@ -30,38 +30,38 @@
// WndStatus::WndStatus(): Display a nifty status bar at
// the bottom of the screen, so the user always knows what's
// happening to his system.
-WndStatus::WndStatus( QPalette /*pal*/,
+WndStatus::WndStatus( TQPalette /*pal*/,
int xineramaScreen,
bool atTop, bool pbVisible,
- const QFont& font,
- const QColor& fgc, const QColor & bgc,
- const QString& icon
+ const TQFont& font,
+ const TQColor& fgc, const TQColor & bgc,
+ const TQString& icon
)
- :QHBox( 0, "wndStatus", WStyle_Customize|WX11BypassWM )
+ :TQHBox( 0, "wndStatus", WStyle_Customize|WX11BypassWM )
{
- setFrameStyle( QFrame::NoFrame );
+ setFrameStyle( TQFrame::NoFrame );
//setPalette( pal );
setPaletteBackgroundColor( bgc );
setPaletteForegroundColor( fgc );
setCursor( KCursor::blankCursor() );
setSpacing( 5 );
- const QRect rect = kapp->desktop()->screenGeometry( xineramaScreen );
+ const TQRect rect = kapp->desktop()->screenGeometry( xineramaScreen );
// KGlobalSettings::splashScreenDesktopGeometry(); cannot be used here.
- QLabel *pix = new QLabel( this );
- QPixmap _icon( SmallIcon(icon.isNull()||icon.isEmpty()?QString("run"):icon) );
+ TQLabel *pix = new TQLabel( this );
+ TQPixmap _icon( SmallIcon(icon.isNull()||icon.isEmpty()?TQString("run"):icon) );
pix->setPixmap( _icon );
setStretchFactor(pix,0);
pix->setFixedWidth(16);
- m_label = new QLabel( this );
+ m_label = new TQLabel( this );
m_label->setFont( font );
m_label->setPaletteBackgroundColor( bgc );
m_label->setPaletteForegroundColor( fgc );
- //QFontMetrics metrics( font );
+ //TQFontMetrics metrics( font );
//m_label->setFixedHeight( metrics.height() );
- m_label->setText(QString(""));
+ m_label->setText(TQString(""));
m_label->setFixedWidth(rect.width()-105-16-10); // What's this magic number?
m_label->show();
@@ -69,7 +69,7 @@ WndStatus::WndStatus( QPalette /*pal*/,
setStretchFactor(m_progress,0);
m_progress->setFixedWidth(100);
- QWidget *widg = new QWidget( this );
+ TQWidget *widg = new TQWidget( this );
setStretchFactor(widg,50);
setFixedSize( rect.width(), QMAX(m_progress->height(),m_label->height()) );
@@ -83,7 +83,7 @@ WndStatus::WndStatus( QPalette /*pal*/,
m_progress->hide();
}
-void WndStatus::slotSetMessage( const QString& msg )
+void WndStatus::slotSetMessage( const TQString& msg )
{
raise();
m_label->setText( msg );
diff --git a/ksplashml/themeengine/standard/wndstatus.h b/ksplashml/themeengine/standard/wndstatus.h
index fa1d735d9..effcd458f 100644
--- a/ksplashml/themeengine/standard/wndstatus.h
+++ b/ksplashml/themeengine/standard/wndstatus.h
@@ -18,7 +18,7 @@
#ifndef __WNDSTATUS_H__
#define __WNDSTATUS_H__
-#include <qhbox.h>
+#include <tqhbox.h>
class QLabel;
class KProgress;
@@ -29,22 +29,22 @@ class WndStatus:
{
Q_OBJECT
public:
- WndStatus( QPalette,
+ WndStatus( TQPalette,
int, // Xinerama screen
bool, // At top?
bool, // Progress indicator visible?
- const QFont&, // Status bar font
- const QColor&, const QColor &, // Foreground/Background color
- const QString& // Icon
+ const TQFont&, // Status bar font
+ const TQColor&, const TQColor &, // Foreground/Background color
+ const TQString& // Icon
);
public slots:
- void slotSetMessage( const QString& );
+ void slotSetMessage( const TQString& );
void slotUpdateProgress( int );
void slotUpdateSteps( int );
protected:
- QLabel *m_label;
+ TQLabel *m_label;
KProgress *m_progress;
};
#endif