Diffstat (limited to 'noncore/apps/oxygen/dataTable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index 661eb5a..951788b 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp | |||
@@ -24,14 +24,17 @@ | |||
24 | #include <qfont.h> | 24 | #include <qfont.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | 27 | ||
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | 29 | ||
30 | OxydataWidget::OxydataWidget(QWidget *parent, const char *name, QStringList *list ) : QWidget( parent,name ) | 30 | OxydataWidget::OxydataWidget(QWidget *parent, const char *name, const QStringList &list ) : QWidget( parent,name ) |
31 | { | 31 | { |
32 | names = list; | ||
33 | QStringList::ConstIterator it = names.at(10); | ||
34 | qDebug( *it ); | ||
32 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); | 35 | QGridLayout *qgrid = new QGridLayout( this, 2,1 ); |
33 | 36 | ||
34 | QHBox *hbox = new QHBox( this ); | 37 | QHBox *hbox = new QHBox( this ); |
35 | left = new QLabel( hbox ); | 38 | left = new QLabel( hbox ); |
36 | middle = new QLabel( hbox ); | 39 | middle = new QLabel( hbox ); |
37 | right = new QLabel( hbox ); | 40 | right = new QLabel( hbox ); |
@@ -50,18 +53,20 @@ OxydataWidget::OxydataWidget(QWidget *parent, const char *name, QStringList *lis | |||
50 | qgrid->addWidget( hbox,0,0 ); | 53 | qgrid->addWidget( hbox,0,0 ); |
51 | qgrid->addWidget( DataTable,1,0 ); | 54 | qgrid->addWidget( DataTable,1,0 ); |
52 | } | 55 | } |
53 | 56 | ||
54 | void OxydataWidget::setElement( int el ) | 57 | void OxydataWidget::setElement( int el ) |
55 | { | 58 | { |
59 | QStringList::ConstIterator it = names.at(el+1); | ||
60 | qDebug( *it ); | ||
56 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); | 61 | Config configobj( QPEApplication::qpeDir() +"share/oxygen/oxygendata", Config::File ); |
57 | 62 | ||
58 | configobj.setGroup( QString::number( el+1 )); | 63 | configobj.setGroup( QString::number( el+1 )); |
59 | 64 | ||
60 | left->setText( configobj.readEntry( "Symbol" ) ); | 65 | left->setText( configobj.readEntry( "Symbol" ) ); |
61 | middle->setText( configobj.readEntry( "Name" ) ); | 66 | middle->setText( *it ); |
62 | right->setText( QString::number( el+1 ) ); | 67 | right->setText( QString::number( el+1 ) ); |
63 | 68 | ||
64 | 69 | ||
65 | DataTable->setText( 0,1,tr( "%1 u" ).arg( configobj.readEntry( "Weight" ) ) ); | 70 | DataTable->setText( 0,1,tr( "%1 u" ).arg( configobj.readEntry( "Weight" ) ) ); |
66 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); | 71 | DataTable->setText( 1,1,configobj.readEntry( "Block" ) ); |
67 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); | 72 | DataTable->setText( 2,1,configobj.readEntry( "Group" ) ); |