|
2010-09-20
, 08:57
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#102
|
void MainWindow::readdirs() { QDir colors("/opt/plastic-schemes"); QStringList colorstobox = colors.entryList(QDir::AllDirs | QDir::NoDotAndDotDot, QDir::DirsFirst); ui->Color->addItems(colorstobox); }
DefaultTextColor=#ced0d5 SecondaryTextColor=#ffbb45 ActiveTextColor=#ffbb45 DisabledTextColor=#8e8e8e PaintedTextColor=#1c1c1c ReversedTextColor=#141414 ReversedSecondaryTextColor=#d29e00 ReversedActiveTextColor=#d29e00 ReversedDisabledTextColor=#c5c5c5 ReversedPaintedTextColor=#ffffff
|
2010-09-20
, 10:32
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#103
|
The Following User Says Thank You to Diph For This Useful Post: | ||
|
2010-09-20
, 12:53
|
|
Posts: 1,023 |
Thanked: 4,421 times |
Joined on Feb 2010
@ Argentina
|
#104
|
The Following User Says Thank You to CepiPerez For This Useful Post: | ||
|
2010-09-20
, 14:31
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#105
|
#1:
void MainWindow::readdirs()
{
QDir colors("/opt/plastic-schemes");
QStringList colorstobox = colors.entryList(QDir:irs | QDir::NoDotAndDotDot);
for ( int i=0; i < colorstobox.count(); ++i )
if ( colorstobox[i] != "Emacs" ) ui->Color->addItems(colorstobox);
}
|
2010-09-20
, 15:24
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#106
|
|
2010-09-20
, 20:06
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#107
|
Either change the method or use temp variable where you store "non-Emacs" entries and then call addItems().
|
2010-09-21
, 07:16
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#108
|
DefaultTextColor=#ced0d5
QString DefaultTextColor; DefaultTextColor = "#ced0d5";
QFile file(/etc/hildon/theme/colors.config); if (!file.open (IO_ReadOnly)) // didn't work QTextStream stream ( &file ); QString line; while( !stream.eof() ) { line = stream.readLine(); <process your line and repeat> } file.close();
|
2010-09-21
, 08:56
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#109
|
QFile file(/etc/hildon/theme/colors.config); if (!file.open (IO_ReadOnly)) // didn't work QTextStream stream ( &file ); QString line; QHash<QString, QString> variables; while( !stream.eof() ) { line = stream.readLine(); //Split QStringList splittedLine = line.split("="); //Maybe add some checks here (splittedLine.count == 2 etc.) variables.insert(splittedLine.at(0), splittedLine.at(1)); } file.close();
The Following User Says Thank You to Diph For This Useful Post: | ||
|
2010-09-22
, 09:28
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#110
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), progress("Setting up the theme, please wait...", "Abort", 0, 0, this), colors() { ui->setupUi(this); ui->scrollArea->setWidget(ui->widget); readdirs(); QString oldfont1 = ui->font1->text(); QString oldfont2 = ui->font2->text(); QString oldfont3 = ui->font3->text(); QString oldfont4 = ui->font4->text(); // readSettings(); }
void MainWindow::on_pushButton_clicked() { }
The Following User Says Thank You to d-iivil For This Useful Post: | ||
If you're rich and you think I deserve a cold beer, you may donate one or two :-P
80's style stadium rock is back - FIRENOTE
Hi-Octane heavy metal - FORCE MAJEURE