summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-12-30 19:33:56 (UTC)
committer cniehaus <cniehaus>2002-12-30 19:33:56 (UTC)
commite34eef8e2f2a36797ef980d505a99948f88a5df2 (patch) (side-by-side diff)
tree8cd79691b4b059688ca99af3158c3b62ceed649f
parent74fae7e68acd91e61bdff6f7703021246a0c1fbc (diff)
downloadopie-e34eef8e2f2a36797ef980d505a99948f88a5df2.zip
opie-e34eef8e2f2a36797ef980d505a99948f88a5df2.tar.gz
opie-e34eef8e2f2a36797ef980d505a99948f88a5df2.tar.bz2
add a const
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/psewidget.cpp2
-rw-r--r--noncore/apps/oxygen/psewidget.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp
index b396046..4f990b0 100644
--- a/noncore/apps/oxygen/psewidget.cpp
+++ b/noncore/apps/oxygen/psewidget.cpp
@@ -45,33 +45,33 @@ PSEWidget::PSEWidget(const QStringList &list) : QWidget()
PSEframe.append( new OxyFrame( this , QString::number(n), configobj.readEntry( "Symbol" ) ) );
grid->addWidget( PSEframe.current() , v/40+1 , h/40 );
PSEframe.current()->setMinimumHeight( 11 );
PSEframe.current()->setPalette( QPalette( PSEColor( configobj.readEntry( "Block" ) ) ) );
connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( slotShowElement(QString) ));
connect( PSEframe.current(), SIGNAL( num(QString) ), this, SLOT( inverseColor(QString) ));
}
oxyDW = new OxydataWidget(this, "PSEWidget_oxyDW", names);
oxyDW->setElement( 0 );
oxyDW->setLayout();
vlay->addLayout( grid );
vlay->addWidget( oxyDW );
}
-QColor PSEWidget::PSEColor( QString block )
+QColor PSEWidget::PSEColor( QString block ) const
{
QColor c;
if ( block == "s" ) c.setRgb( 213 , 233 , 231 );
else if ( block == "d" ) c.setRgb( 200,230,160 );
else if ( block == "p" ) c.setRgb( 238,146,138 );
else if ( block == "f" ) c.setRgb( 190 , 190 , 190 );
return c;
};
void PSEWidget::inverseColor( QString number)
{
Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File );
configobj.setGroup( number );
QString block = configobj.readEntry( "Block" );
QColor c, d;
c = PSEColor( block );
diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h
index 42a2e38..ad40cf1 100644
--- a/noncore/apps/oxygen/psewidget.h
+++ b/noncore/apps/oxygen/psewidget.h
@@ -31,26 +31,26 @@ class PSEWidget : public QWidget
{
Q_OBJECT
public:
PSEWidget(const QStringList &list=0);
QGridLayout *bottom_grid;
OxydataWidget *oxyDW;
QList<OxyFrame> PSEframe;
int lastElement;
private:
QGridLayout *maingrid;
void position( int, int&, int& );
- QColor PSEColor( QString );
+ QColor PSEColor( QString ) const;
QStringList names;
public slots:
void slotShowElement(QString);
void inverseColor( QString );
};
#endif