summaryrefslogtreecommitdiffstats
path: root/kmix/kmixapplet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmix/kmixapplet.cpp')
-rw-r--r--kmix/kmixapplet.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/kmix/kmixapplet.cpp b/kmix/kmixapplet.cpp
index 92e94682..c0fed889 100644
--- a/kmix/kmixapplet.cpp
+++ b/kmix/kmixapplet.cpp
@@ -24,14 +24,14 @@
#include <stdlib.h>
// QT
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qwmatrix.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqwmatrix.h>
// KDE
@@ -66,7 +66,7 @@
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kmix");
return new KMixApplet(configFile, KPanelApplet::Normal,
@@ -77,21 +77,21 @@ extern "C"
int KMixApplet::s_instCount = 0;
//<Mixer> KMixApplet::Mixer::mixers();
-static const QColor highColor = KGlobalSettings::baseColor();
-static const QColor lowColor = KGlobalSettings::highlightColor();
-static const QColor backColor = "#000000";
-static const QColor mutedHighColor = "#FFFFFF";
-static const QColor mutedLowColor = "#808080";
-static const QColor mutedBackColor = "#000000";
+static const TQColor highColor = KGlobalSettings::baseColor();
+static const TQColor lowColor = KGlobalSettings::highlightColor();
+static const TQColor backColor = "#000000";
+static const TQColor mutedHighColor = "#FFFFFF";
+static const TQColor mutedLowColor = "#808080";
+static const TQColor mutedBackColor = "#000000";
-AppletConfigDialog::AppletConfigDialog( QWidget * parent, const char * name )
- : KDialogBase( KDialogBase::Plain, QString::null,
+AppletConfigDialog::AppletConfigDialog( TQWidget * parent, const char * name )
+ : KDialogBase( KDialogBase::Plain, TQString::null,
KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel,
KDialogBase::Ok, parent, name, false, true)
{
setPlainCaption(i18n("Configure - Mixer Applet"));
- QFrame* page = plainPage();
- QVBoxLayout *topLayout = new QVBoxLayout(page);
+ TQFrame* page = plainPage();
+ TQVBoxLayout *topLayout = new TQVBoxLayout(page);
colorWidget = new ColorWidget(page);
topLayout->addWidget(colorWidget);
setUseCustomColors(false);
@@ -108,28 +108,28 @@ void AppletConfigDialog::slotApply()
emit applied();
}
-void AppletConfigDialog::setActiveColors(const QColor& high, const QColor& low, const QColor& back)
+void AppletConfigDialog::setActiveColors(const TQColor& high, const TQColor& low, const TQColor& back)
{
colorWidget->activeHigh->setColor(high);
colorWidget->activeLow->setColor(low);
colorWidget->activeBack->setColor(back);
}
-void AppletConfigDialog::activeColors(QColor& high, QColor& low, QColor& back) const
+void AppletConfigDialog::activeColors(TQColor& high, TQColor& low, TQColor& back) const
{
high = colorWidget->activeHigh->color();
low = colorWidget->activeLow->color();
back = colorWidget->activeBack->color();
}
-void AppletConfigDialog::setMutedColors(const QColor& high, const QColor& low, const QColor& back)
+void AppletConfigDialog::setMutedColors(const TQColor& high, const TQColor& low, const TQColor& back)
{
colorWidget->mutedHigh->setColor(high);
colorWidget->mutedLow->setColor(low);
colorWidget->mutedBack->setColor(back);
}
-void AppletConfigDialog::mutedColors(QColor& high, QColor& low, QColor& back) const
+void AppletConfigDialog::mutedColors(TQColor& high, TQColor& low, TQColor& back) const
{
high = colorWidget->mutedHigh->color();
low = colorWidget->mutedLow->color();
@@ -149,8 +149,8 @@ bool AppletConfigDialog::useCustomColors() const
}
-KMixApplet::KMixApplet( const QString& configFile, Type t,
- QWidget *parent, const char *name )
+KMixApplet::KMixApplet( const TQString& configFile, Type t,
+ TQWidget *parent, const char *name )
: KPanelApplet( configFile, t, KPanelApplet::Preferences | KPanelApplet::ReportBug | KPanelApplet::About, parent, name ),
m_mixerWidget(0), m_errorLabel(0), m_pref(0),
@@ -161,12 +161,12 @@ KMixApplet::KMixApplet( const QString& configFile, Type t,
setBackgroundOrigin(AncestorOrigin);
kdDebug(67100) << "KMixApplet::KMixApplet instancing Applet. Old s_instCount="<< s_instCount << " configfile=" << configFile << endl;
//kdDebug(67100) << "KMixApplet::KMixApplet()" << endl;
- _layout = new QHBoxLayout(this); // it will always only be one item in it, so we don't care whether it is HBox or VBox
+ _layout = new TQHBoxLayout(this); // it will always only be one item in it, so we don't care whether it is HBox or VBox
// init static vars
if ( s_instCount == 0) {
Mixer::mixers().setAutoDelete( TRUE );
- QString dummyStringHwinfo;
+ TQString dummyStringHwinfo;
MixerToolBox::initMixer(Mixer::mixers(), false, dummyStringHwinfo);
}
s_instCount++;
@@ -204,10 +204,10 @@ KMixApplet::KMixApplet( const QString& configFile, Type t,
{
// No mixer set by user (kmixappletrc_*) and more than one to choose
// We do NOT know which mixer to use => ask the User
- m_errorLabel = new QPushButton( i18n("Select Mixer"), this );
+ m_errorLabel = new TQPushButton( i18n("Select Mixer"), this );
m_errorLabel->setGeometry(0, 0, m_errorLabel->sizeHint().width(), m_errorLabel->sizeHint().height() );
resize( m_errorLabel->sizeHint() );
- connect( m_errorLabel, SIGNAL(clicked()), this, SLOT(selectMixer()) );
+ connect( m_errorLabel, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectMixer()) );
}
else {
// We know which mixer to use: Call positionChange(), which does all the creating
@@ -266,7 +266,7 @@ void KMixApplet::loadConfig()
cfg->setGroup(0);
_mixerId = cfg->readEntry( "Mixer", "undef" );
- _mixerName = cfg->readEntry( "MixerName", QString::null );
+ _mixerName = cfg->readEntry( "MixerName", TQString::null );
_customColors = cfg->readBoolEntry( "ColorCustom", false );
@@ -282,7 +282,7 @@ void KMixApplet::loadConfig()
}
-void KMixApplet::loadConfig( KConfig *config, const QString &grp )
+void KMixApplet::loadConfig( KConfig *config, const TQString &grp )
{
if ( m_mixerWidget ) {
//config->setGroup( grp );
@@ -291,7 +291,7 @@ void KMixApplet::loadConfig( KConfig *config, const QString &grp )
}
-void KMixApplet::saveConfig( KConfig *config, const QString &grp )
+void KMixApplet::saveConfig( KConfig *config, const TQString &grp )
{
if ( m_mixerWidget ) {
config->setGroup( grp );
@@ -308,19 +308,19 @@ void KMixApplet::saveConfig( KConfig *config, const QString &grp )
*/
void KMixApplet::selectMixer()
{
- QStringList lst;
+ TQStringList lst;
int n=1;
for (Mixer *mixer=Mixer::mixers().first(); mixer!=0; mixer=Mixer::mixers().next())
{
- QString s;
+ TQString s;
s.sprintf("%i. %s", n, mixer->mixerName().ascii());
lst << s;
n++;
}
bool ok = FALSE;
- QString res = KInputDialog::getItem( i18n("Mixers"),
+ TQString res = KInputDialog::getItem( i18n("Mixers"),
i18n("Available mixers:"),
lst, 1, FALSE, &ok, this );
if ( ok )
@@ -356,7 +356,7 @@ void KMixApplet::help()
void KMixApplet::positionChange(Position pos) {
orientationChange( orientation() );
- QResizeEvent e( size(), size() ); // from KPanelApplet::positionChange
+ TQResizeEvent e( size(), size() ); // from KPanelApplet::positionChange
resizeEvent( &e ); // from KPanelApplet::positionChange
if ( m_errorLabel == 0) {
@@ -367,7 +367,7 @@ void KMixApplet::positionChange(Position pos) {
delete m_mixerWidget;
}
m_mixerWidget = new ViewApplet( this, _mixer->name(), _mixer, 0, pos );
- connect ( m_mixerWidget, SIGNAL(appletContentChanged()), this, SLOT(updateGeometrySlot()) );
+ connect ( m_mixerWidget, TQT_SIGNAL(appletContentChanged()), this, TQT_SLOT(updateGeometrySlot()) );
m_mixerWidget->createDeviceWidgets();
_layout->add(m_mixerWidget);
_layout->activate();
@@ -375,19 +375,19 @@ void KMixApplet::positionChange(Position pos) {
loadConfig();
setColors();
- const QSize panelAppletConstrainedSize = sizeHint();
+ const TQSize panelAppletConstrainedSize = sizeHint();
m_mixerWidget->setGeometry( 0, 0, panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() );
resize( panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() );
//setFixedSize(panelAppletConstrainedSize.width(), panelAppletConstrainedSize.height() );
//kdDebug(67100) << "KMixApplet::positionChange(). New MDW is at " << panelAppletConstrainedSize << endl;
m_mixerWidget->show();
- //connect( _mixer, SIGNAL(newVolumeLevels()), m_mixerWidget, SLOT(refreshVolumeLevels()) );
+ //connect( _mixer, TQT_SIGNAL(newVolumeLevels()), m_mixerWidget, TQT_SLOT(refreshVolumeLevels()) );
}
}
/************* GEOMETRY STUFF START ********************************/
-void KMixApplet::resizeEvent(QResizeEvent *e)
+void KMixApplet::resizeEvent(TQResizeEvent *e)
{
//kdDebug(67100) << "KMixApplet::resizeEvent(). New MDW is at " << e->size() << endl;
@@ -414,9 +414,9 @@ void KMixApplet::updateGeometrySlot() {
}
-QSize KMixApplet::sizeHint() const {
+TQSize KMixApplet::sizeHint() const {
//kdDebug(67100) << "KMixApplet::sizeHint()\n";
- QSize qsz;
+ TQSize qsz;
if ( m_errorLabel !=0 ) {
qsz = m_errorLabel->sizeHint();
}
@@ -448,15 +448,15 @@ int KMixApplet::heightForWidth(int) const {
-QSizePolicy KMixApplet::sizePolicy() const {
- // return QSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
+TQSizePolicy KMixApplet::sizePolicy() const {
+ // return TQSizePolicy(TQSizePolicy::Preferred,TQSizePolicy::Preferred);
if ( orientation() == Qt::Vertical ) {
//kdDebug(67100) << "KMixApplet::sizePolicy=(Ignored,Fixed)\n";
- return QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ return TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
}
else {
//kdDebug(67100) << "KMixApplet::sizePolicy=(Fixed,Ignored)\n";
- return QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
}
}
@@ -477,8 +477,8 @@ void KMixApplet::preferences()
if ( !m_pref )
{
m_pref = new AppletConfigDialog( this );
- connect(m_pref, SIGNAL(finished()), SLOT(preferencesDone()));
- connect( m_pref, SIGNAL(applied()), SLOT(applyPreferences()) );
+ connect(m_pref, TQT_SIGNAL(finished()), TQT_SLOT(preferencesDone()));
+ connect( m_pref, TQT_SIGNAL(applied()), TQT_SLOT(applyPreferences()) );
m_pref->setActiveColors(_colors.high , _colors.low , _colors.back);
m_pref->setMutedColors (_colors.mutedHigh, _colors.mutedLow, _colors.mutedBack);
@@ -511,17 +511,17 @@ void KMixApplet::applyPreferences()
return;
/*
- QSize si = m_mixerWidget->size();
+ TQSize si = m_mixerWidget->size();
m_mixerWidget->resize( si );
*/
setColors();
saveConfig();
}
-void KMixApplet::paletteChange ( const QPalette &) {
+void KMixApplet::paletteChange ( const TQPalette &) {
if ( ! _customColors ) {
// We take over Colors from paletteChange(), if the user has not set custom colors.
- // ignore the given QPalette and use the values from KGlobalSettings instead
+ // ignore the given TQPalette and use the values from KGlobalSettings instead
_colors.high = KGlobalSettings::highlightColor();
_colors.low = KGlobalSettings::baseColor();
_colors.back = backColor;
@@ -551,8 +551,8 @@ void KMixApplet::setColors( const Colors &color )
// can happen for example after a paletteChange()
return;
}
- QPtrList<QWidget> &mdws = m_mixerWidget->_mdws;
- for ( QWidget* qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) {
+ TQPtrList<TQWidget> &mdws = m_mixerWidget->_mdws;
+ for ( TQWidget* qmdw=mdws.first(); qmdw != 0; qmdw=mdws.next() ) {
if ( qmdw->inherits("MixDeviceWidget") ) { // -<- temporary check. Later we *know* that it is correct
static_cast<MixDeviceWidget*>(qmdw)->setColors( color.high, color.low, color.back );
static_cast<MixDeviceWidget*>(qmdw)->setMutedColors( color.mutedHigh, color.mutedLow, color.mutedBack );