From bd8b0221038b0461c7e3647c7fe4f919867b08d1 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 19 Apr 2015 11:10:41 +0200 Subject: UI for DateTimeOrder --- lumina-config/mainUI.cpp | 13 +++- lumina-config/mainUI.ui | 158 +++++++++++++++++++++++++---------------------- 2 files changed, 96 insertions(+), 75 deletions(-) (limited to 'lumina-config') diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index 987324f3..b1a8e797 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -237,6 +237,7 @@ void MainUI::setupConnections(){ connect(ui->line_session_time, SIGNAL(textChanged(QString)), this, SLOT(sessionLoadTimeSample()) ); connect(ui->line_session_date, SIGNAL(textChanged(QString)), this, SLOT(sessionLoadDateSample()) ); connect(ui->combo_session_timezone, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) ); + connect(ui->combo_session_datetimeorder, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) ); } void MainUI::setupMenus(){ @@ -275,6 +276,13 @@ void MainUI::setupMenus(){ ui->combo_session_wtheme->addItem(fbstyles[i], fbdir.absoluteFilePath(fbstyles[i])); } + //Display formats for panel clock + ui->combo_session_datetimeorder->clear(); + ui->combo_session_datetimeorder->addItem( tr("Time (Date as tooltip)"), "timeonly"); + ui->combo_session_datetimeorder->addItem( tr("Date (Time as tooltip)"), "dateonly"); + ui->combo_session_datetimeorder->addItem( tr("Time first then Date"), "timedate"); + ui->combo_session_datetimeorder->addItem( tr("Date first then Time"), "datetime"); + //Available Time zones ui->combo_session_timezone->clear(); QList TZList = QTimeZone::availableTimeZoneIds(); @@ -1813,11 +1821,13 @@ void MainUI::loadSessionSettings(){ ui->push_session_setUserIcon->setIcon( LXDG::findIcon(QDir::homePath()+"/.loginIcon.png", "user-identity") ); ui->line_session_time->setText( sessionsettings->value("TimeFormat","").toString() ); ui->line_session_date->setText( sessionsettings->value("DateFormat","").toString() ); + index = ui->combo_session_datetimeorder->findData( sessionsettings->value("DateTimeOrder").toString() ); + ui->combo_session_datetimeorder->setCurrentIndex(index); if( !sessionsettings->value("CustomTimeZone", false).toBool() ){ //System Time selected ui->combo_session_timezone->setCurrentIndex(0); }else{ - int index = ui->combo_session_timezone->findData( sessionsettings->value("TimeZoneByteCode",QByteArray()).toByteArray() ); + index = ui->combo_session_timezone->findData( sessionsettings->value("TimeZoneByteCode",QByteArray()).toByteArray() ); if(index>0){ ui->combo_session_timezone->setCurrentIndex(index); } else{ ui->combo_session_timezone->setCurrentIndex(0); } } @@ -1913,6 +1923,7 @@ void MainUI::saveSessionSettings(){ sessionsettings->setValue("PlayLogoutAudio", ui->check_session_playlogoutaudio->isChecked()); sessionsettings->setValue("TimeFormat", ui->line_session_time->text()); sessionsettings->setValue("DateFormat", ui->line_session_date->text()); + sessionsettings->setValue("DateTimeOrder", ui->combo_session_datetimeorder->currentData().toString()); if( ui->combo_session_timezone->currentIndex()==0){ //System Time selected sessionsettings->setValue("CustomTimeZone", false); diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui index 07abacab..6061cae4 100644 --- a/lumina-config/mainUI.ui +++ b/lumina-config/mainUI.ui @@ -602,8 +602,8 @@ 0 0 - 233 - 150 + 263 + 178 @@ -701,7 +701,7 @@ 0 0 - 197 + 198 117 @@ -799,8 +799,8 @@ 0 0 - 233 - 150 + 263 + 178 @@ -898,7 +898,7 @@ 0 0 - 197 + 198 117 @@ -1467,19 +1467,6 @@ General Options - - - - Qt::Vertical - - - - 20 - 128 - - - - @@ -1535,7 +1522,62 @@ - + + + + + 50 + false + + + + Reset Desktop Settings + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Return to system defaults + + + + + + + Return to Lumina defaults + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QFormLayout::AllNonFixedFieldsGrow @@ -1654,62 +1696,30 @@ + + + + + + + Display Format + + + - - - - - 50 - false - + + + + Qt::Vertical - - Reset Desktop Settings + + + 20 + 128 + - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Return to system defaults - - - - - - - Return to Lumina defaults - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + @@ -1791,8 +1801,8 @@ 0 0 - 128 - 28 + 510 + 107 -- cgit