aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp22
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp8
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.cpp79
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.h13
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp76
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h7
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui83
7 files changed, 246 insertions, 42 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
index ee379613..bdbdc42d 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp
@@ -43,37 +43,37 @@ void LBattery::updateBattery(bool force){
if (icon != iconOld || force) {
switch (icon) {
case 0:
- label->setPixmap( LXDG::findIcon("battery-caution", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-20","battery-caution").pixmap(label->size()) );
break;
case 1:
- label->setPixmap( LXDG::findIcon("battery-040", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-40", "battery-040").pixmap(label->size()) );
break;
case 2:
- label->setPixmap( LXDG::findIcon("battery-060", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-60", "battery-060").pixmap(label->size()) );
break;
case 3:
- label->setPixmap( LXDG::findIcon("battery-080", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-80", "battery-080").pixmap(label->size()) );
break;
case 4:
- label->setPixmap( LXDG::findIcon("battery-100", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-100", "battery").pixmap(label->size()) );
break;
case 10:
- label->setPixmap( LXDG::findIcon("battery-charging-caution", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-charging-20", "battery-charging-caution").pixmap(label->size()) );
break;
case 11:
- label->setPixmap( LXDG::findIcon("battery-charging-040", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-charging-040", "battery-charging-040").pixmap(label->size()) );
break;
case 12:
- label->setPixmap( LXDG::findIcon("battery-charging-060", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-charging-060", "battery-charging-060").pixmap(label->size()) );
break;
case 13:
- label->setPixmap( LXDG::findIcon("battery-charging-080", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-charging-080", "battery-charging-080").pixmap(label->size()) );
break;
case 14:
- label->setPixmap( LXDG::findIcon("battery-charging", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-charging-100", "battery-charging").pixmap(label->size()) );
break;
default:
- label->setPixmap( LXDG::findIcon("battery-missing", "").pixmap(label->size()) );
+ label->setPixmap( LXDG::findIcon("battery-unknown", "battery-missing").pixmap(label->size()) );
break;
}
if(icon<iconOld && icon==0){
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
index d05ba22f..4e6055d6 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -489,10 +489,10 @@ void StartMenu::on_stackedWidget_currentChanged(int val){
//Battery available - update the status button
int charge = LOS::batteryCharge();
QString TT, ICON;
- if(charge<=5){ ICON="-caution"; }
- else if(charge<=20){ ICON="-040"; }
- else if(charge<=70){ ICON="-060"; }
- else if(charge<=90){ ICON="-080"; }
+ if(charge<=5){ ICON="-20"; }
+ else if(charge<=20){ ICON="-40"; }
+ else if(charge<=70){ ICON="-60"; }
+ else if(charge<=90){ ICON="-80"; }
else{ ICON="-100"; }
if(LOS::batteryIsCharging()){
if(charge>=80){ ICON.clear(); } //for charging, there is no suffix to the icon name over 80%
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.cpp b/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.cpp
index 6799f25b..73275acd 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.cpp
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.cpp
@@ -18,6 +18,7 @@ PianoBarProcess::PianoBarProcess(QWidget *parent) : QObject(parent){
saveTimer = new QTimer(this);
saveTimer->setInterval(100); //1/10 second (just enough to change a few settings at once before dumping to disk)
saveTimer->setSingleShot(true);
+ makingStation = false;
connect(saveTimer, SIGNAL(timeout()), this, SLOT(saveSettingsFile()) );
if( !loadSettings() ){ GenerateSettings(); }
}
@@ -61,7 +62,19 @@ void PianoBarProcess::setCurrentStation(QString station){
cstation = station;
sendToProcess("s");
}
-
+
+void PianoBarProcess::answerQuestion(int selection){
+ QString sel;
+ if(selection>=0){ sel = QString::number(selection); }
+
+ if(makingStation && sel.isEmpty()){ makingStation = false; } //cancelled
+ sendToProcess(sel, true);
+ if(makingStation){
+ //Need to prompt to list all the available stations to switch over right away
+ sendToProcess("s");
+ }
+}
+
void PianoBarProcess::deleteCurrentStation(){ //"d" -> "y"
if(cstation == "QuickMix" || cstation=="Thumbprint Radio"){ return; } //cannot delete these stations - provided by Pandora itself
sendToProcess("d"); //delete current station
@@ -70,17 +83,26 @@ void PianoBarProcess::deleteCurrentStation(){ //"d" -> "y"
setCurrentStation("QuickMix"); //this is always a valid station
}
-//void PianoBarProcess::createNewStation(); //"c"
+void PianoBarProcess::createNewStation(QString searchterm){ //"c" -> search term
+ sendToProcess("c");
+ sendToProcess(searchterm,true);
+ makingStation = true;
+}
+
void PianoBarProcess::createStationFromCurrentSong(){ //"v" -> "s"
sendToProcess("v");
sendToProcess("s",true);
- setCurrentStation("<NEW>"); //internal definition for auto-switching to a new station
+ makingStation = true;
+ //Need to prompt to list all the available stations to switch over right away
+ sendToProcess("s");
}
void PianoBarProcess::createStationFromCurrentArtist(){ //"v" -> "a"
sendToProcess("v");
sendToProcess("a",true);
- setCurrentStation("<NEW>"); //internal definition for auto-switching to a new station
+ makingStation = true;
+ //Need to prompt to list all the available stations to switch over right away
+ sendToProcess("s");
}
//Settings Manipulation
@@ -116,6 +138,38 @@ void PianoBarProcess::setControlProxy(QString url){
setSettingValue("control_proxy", url);
}
+QString PianoBarProcess::currentAudioDriver(){
+ QString driver = "auto";
+ QStringList info = LUtils::readFile(QDir::homePath()+"/.libao").filter("default_driver");
+ if(!info.isEmpty()){
+ driver = info.last().section("=",-1).simplified();
+ }
+ return driver;
+}
+
+QStringList PianoBarProcess::availableAudioDrivers(){
+ QStringList known;
+ known << "pulse" << "alsa" << "sndio" << "oss" << "sun" << "roar" << "esd" << "nas";
+ known.sort();
+ known.prepend("auto"); //make sure this is always first
+ return known;
+}
+
+void PianoBarProcess::setAudioDriver(QString driver){
+ QStringList info = LUtils::readFile(QDir::homePath()+"/.libao");
+ bool found = false;
+ QString line = "default_driver="+driver;
+ if(driver=="auto"){ line.clear(); } //special bypass - nothing set
+ for(int i=0; i<info.length() && !found; i++){
+ if(info[i].section("=",0,0).simplified() == "default_driver"){
+ info[i] = line;
+ found = true;
+ }
+ }
+ if(!found && !line.isEmpty()){ info << line; }
+ //Now save the file
+ LUtils::writeFile(QDir::homePath()+"/.libao", info, true);
+}
// ====== PUBLIC SLOTS ======
void PianoBarProcess::play(){
if(PROC->state() == QProcess::NotRunning){
@@ -234,7 +288,7 @@ void PianoBarProcess::ProcUpdate(){
infoList << info[i].section(") ",1,-1).simplified();
continue; //done handling this line
}else if(!info[i].startsWith("[?]") && !infoList.isEmpty()){
- emit NewList(infoList);
+ //emit NewList(infoList);
infoList.clear();
}
//Now parse the lines for messages/etc
@@ -272,11 +326,12 @@ void PianoBarProcess::ProcUpdate(){
if(infoList[j].startsWith("q ")){ infoList[j] = infoList[j].section("q ",1,-1); }
if(infoList[j].startsWith("Q ")){ infoList[j] = infoList[j].section("Q ",1,-1); }
}
- if(cstation=="<NEW>"){
+ if(makingStation){
//Compare the new list to the previous list and switch to the new one automatically
for(int j=0; j<infoList.length(); j++){
if(!stationList.contains(infoList[j])){ cstation = infoList[j]; break; }
}
+ makingStation = false; //done changing the current station
}
stationList = infoList; //save this list for later
infoList.clear();
@@ -292,7 +347,19 @@ void PianoBarProcess::ProcUpdate(){
sendToProcess(QString::number(stationList.length()-1), true);
}
}
+ }else if( !infoList.isEmpty() ){
+ qDebug() << "Got Question with List:" << info[i] << infoList;
+ emit NewQuestion(info[i].section("[?]",1,-1).simplified(), infoList);
+ }else if(info[i].contains(" Select ") ){
+ qDebug() << "Got Question without List:" << info[i];
+ //Got a prompt without a list of answers - just cancel the prompt
+ sendToProcess("",true);
+ if(makingStation){
+ emit showError(tr("Could not find any matches. Please try a different search term"));
+ makingStation = false; //make sure this flag is reset
+ }
}
+ infoList.clear(); //done with question - make sure this is cleared
}else if(info[i].startsWith("#")){
//Time Stamp
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.h b/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.h
index f250c964..eadd314d 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.h
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/PianoBarProcess.h
@@ -40,6 +40,8 @@ public:
QStringList stations();
void setCurrentStation(QString station);
+ void answerQuestion(int selection = -1); //-1 = cancel
+
//Settings Manipulation
QString audioQuality(); // "audio_quality" = [low, medium, high]
void setAudioQuality(QString); // [low, medium, high]
@@ -50,6 +52,11 @@ public:
QString controlProxy(); //"control_proxy" = URL (example: "http://USER:PASSWORD@HOST:PORT/" )
void setControlProxy(QString);
+ //libao audio driver control
+ QString currentAudioDriver();
+ QStringList availableAudioDrivers();
+ void setAudioDriver(QString driver);
+
private:
//Process
QProcess *PROC;
@@ -71,6 +78,7 @@ private:
//Cached Info
QString cstation; //current station
QStringList stationList;
+ bool makingStation;
public slots:
void play(); // "P"
@@ -87,7 +95,7 @@ public slots:
void bookmarkArtist(){ sendToProcess("b"); sendToProcess("a",true); } //"b"->"a"
void deleteCurrentStation(); //"d"
- //void createNewStation(); //"c"
+ void createNewStation(QString searchterm); //"c"
void createStationFromCurrentSong(); //"v" -> "s"
void createStationFromCurrentArtist(); //"v" -> "a"
@@ -107,8 +115,9 @@ signals:
void NowPlayingStation(QString, QString); //[name, id]
void NowPlayingSong(bool, QString,QString,QString, QString, QString); //[isLoved, title, artist, album, detailsURL, fromStation]
void TimeUpdate(int, int); //[current secs, total secs];
- void NewList(QStringList); //arranged in order: 0-end
+ void NewQuestion(QString, QStringList); //text, options arranged in order: 0-end
void StationListChanged(QStringList);
void currentStateChanged(PianoBarProcess::State);
+ void showError(QString); //important error message to show the user
};
#endif
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
index 09fe485d..65fa7319 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
@@ -12,8 +12,9 @@
#include <LUtils.h>
#include <QDesktopServices>
#include <QUrl>
-
+#include <QInputDialog>
#include <QFileDialog>
+#include <QMessageBox>
//#include "VideoWidget.h"
@@ -97,17 +98,23 @@ void MainUI::setupPandora(){
connect(PANDORA, SIGNAL(NowPlayingStation(QString, QString)), this, SLOT(PandoraStationChanged(QString)) );
connect(PANDORA, SIGNAL(NowPlayingSong(bool, QString,QString,QString, QString, QString)), this, SLOT(PandoraSongChanged(bool, QString, QString, QString, QString, QString)) );
connect(PANDORA, SIGNAL(TimeUpdate(int, int)), this, SLOT(PandoraTimeUpdate(int,int)) );
- connect(PANDORA, SIGNAL(NewList(QStringList)), this, SLOT(PandoraListInfo(QStringList)) );
+ connect(PANDORA, SIGNAL(NewQuestion(QString, QStringList)), this, SLOT(PandoraInteractivePrompt(QString, QStringList)) );
connect(PANDORA, SIGNAL(StationListChanged(QStringList)), this, SLOT(PandoraStationListChanged(QStringList)) );
+ connect(PANDORA, SIGNAL(showError(QString)), this, SLOT(PandoraError(QString)) );
//Setup a couple of the option lists
ui->combo_pandora_quality->clear();
ui->combo_pandora_quality->addItem(tr("Low"),"low");
ui->combo_pandora_quality->addItem(tr("Medium"), "medium");
ui->combo_pandora_quality->addItem(tr("High"),"high");
+ ui->combo_pandora_driver->clear();
+ ui->combo_pandora_driver->addItems( PANDORA->availableAudioDrivers() );
//Now load the current settings into the UI
int qual = ui->combo_pandora_quality->findData(PANDORA->audioQuality());
if(qual>=0){ ui->combo_pandora_quality->setCurrentIndex(qual); }
else{ ui->combo_pandora_quality->setCurrentIndex(1); } //medium quality by default
+ qual = ui->combo_pandora_driver->findText(PANDORA->currentAudioDriver());
+ if(qual>=0){ ui->combo_pandora_driver->setCurrentIndex(qual); }
+ else{ ui->combo_pandora_driver->setCurrentIndex(0); } //automatic (always first in list)
ui->line_pandora_email->setText( PANDORA->email() );
ui->line_pandora_pass->setText( PANDORA->password() );
ui->line_pandora_proxy->setText( PANDORA->proxy() );
@@ -121,6 +128,8 @@ void MainUI::setupPandora(){
QMenu *tmp = new QMenu(this);
tmp->addAction(ui->action_pandora_newstation_song);
tmp->addAction(ui->action_pandora_newstation_artist);
+ tmp->addSeparator();
+ tmp->addAction(ui->action_pandora_newstation_search);
ui->tool_pandora_stationadd->setMenu( tmp );
}
@@ -143,10 +152,12 @@ void MainUI::setupConnections(){
connect(ui->tool_local_rm, SIGNAL(clicked()), this, SLOT(rmLocalMedia()) );
connect(ui->tool_local_shuffle, SIGNAL(clicked()), PLAYLIST, SLOT(shuffle()) );
connect(ui->tool_local_repeat, SIGNAL(toggled(bool)), this, SLOT(localPlaybackSettingsChanged()) );
-
+ connect(ui->tool_local_moveup, SIGNAL(clicked()), this, SLOT(upLocalMedia()) );
+ connect(ui->tool_local_movedown, SIGNAL(clicked()), this, SLOT(downLocalMedia()) );
connect(ui->push_pandora_apply, SIGNAL(clicked()), this, SLOT(applyPandoraSettings()) );
connect(ui->combo_pandora_station, SIGNAL(activated(QString)), this, SLOT(changePandoraStation(QString)) );
+ connect(ui->combo_pandora_driver, SIGNAL(activated(QString)), this, SLOT(checkPandoraSettings()) );
connect(ui->tool_pandora_ban, SIGNAL(clicked()), PANDORA, SLOT(banSong()) );
connect(ui->tool_pandora_love, SIGNAL(clicked()), PANDORA, SLOT(loveSong()) );
connect(ui->tool_pandora_tired, SIGNAL(clicked()), PANDORA, SLOT(tiredSong()) );
@@ -154,6 +165,7 @@ void MainUI::setupConnections(){
connect(ui->tool_pandora_stationrm, SIGNAL(clicked()), PANDORA, SLOT(deleteCurrentStation()) );
connect(ui->action_pandora_newstation_artist, SIGNAL(triggered()), PANDORA, SLOT(createStationFromCurrentArtist()) );
connect(ui->action_pandora_newstation_song, SIGNAL(triggered()), PANDORA, SLOT(createStationFromCurrentSong()) );
+ connect(ui->action_pandora_newstation_search, SIGNAL(triggered()), this, SLOT(createPandoraStation()) );
connect(ui->line_pandora_email, SIGNAL(textChanged(QString)), this, SLOT(checkPandoraSettings()) );
connect(ui->line_pandora_pass, SIGNAL(textChanged(QString)), this, SLOT(checkPandoraSettings()) );
connect(ui->line_pandora_proxy, SIGNAL(textChanged(QString)), this, SLOT(checkPandoraSettings()) );
@@ -183,6 +195,8 @@ void MainUI::setupIcons(){
ui->tool_local_rm->setIcon( LXDG::findIcon("list-remove","") );
ui->tool_local_shuffle->setIcon( LXDG::findIcon("media-playlist-shuffle","") );
ui->tool_local_repeat->setIcon( LXDG::findIcon("media-playlist-repeat","") );
+ ui->tool_local_moveup->setIcon( LXDG::findIcon("go-up", "arrow-up") );
+ ui->tool_local_movedown->setIcon( LXDG::findIcon("go-down", "arrow-down") );
//Pandora Pages
ui->push_pandora_apply->setIcon( LXDG::findIcon("dialog-ok-apply","dialog-ok") );
@@ -194,7 +208,7 @@ void MainUI::setupIcons(){
ui->tool_pandora_stationadd->setIcon( LXDG::findIcon("list-add","") );
ui->action_pandora_newstation_artist->setIcon( LXDG::findIcon("preferences-desktop-user","") );
ui->action_pandora_newstation_song->setIcon( LXDG::findIcon("bookmark-audio","media-playlist-audio") );
-
+ ui->action_pandora_newstation_search->setIcon( LXDG::findIcon("edit-find", "document-find") );
}
void MainUI::setupTrayIcon(){
@@ -324,6 +338,28 @@ void MainUI::rmLocalMedia(){
}
}
+void MainUI::upLocalMedia(){
+ //NOTE: Only a single selection is possible at the present time
+ QList<QListWidgetItem*> sel = ui->list_local->selectedItems();
+ for(int i=0; i<sel.length(); i++){
+ int row = ui->list_local->row(sel[i]);
+ PLAYLIST->moveMedia(row, row-1 );
+ QApplication::processEvents(); //this runs the inserted/removed functions
+ ui->list_local->setCurrentRow(row-1);
+ }
+}
+
+void MainUI::downLocalMedia(){
+ //NOTE: Only a single selection is possible at the present time
+ QList<QListWidgetItem*> sel = ui->list_local->selectedItems();
+ for(int i=0; i<sel.length(); i++){
+ int row = ui->list_local->row(sel[i]);
+ PLAYLIST->moveMedia(row, row+1 );
+ QApplication::processEvents(); //this runs the inserted/removed functions
+ ui->list_local->setCurrentRow(row+1);
+ }
+}
+
void MainUI::localPlaybackSettingsChanged(){
if(ui->tool_local_shuffle->isChecked()){ PLAYLIST->setPlaybackMode(QMediaPlaylist::Random); }
else if(ui->tool_local_repeat->isChecked()){ PLAYLIST->setPlaybackMode(QMediaPlaylist::Loop); }
@@ -344,13 +380,22 @@ void MainUI::LocalListIndexChanged(int current){
}
void MainUI::LocalListMediaChanged(int start, int end){
+ //qDebug() << "List Media Changed";
+ QList<QListWidgetItem*> sel = ui->list_local->selectedItems();
+ QString selItem;
+ if(!sel.isEmpty()){ sel.first()->text(); }
+
for(int i=start; i<end+1; i++){
QUrl url = PLAYLIST->media(i).canonicalUrl();
ui->list_local->item(i)->setText(url.toLocalFile().section("/",-1).simplified());
+ if(ui->list_local->item(i)->text()==selItem){
+ ui->list_local->setCurrentItem(ui->list_local->item(i));
+ }
}
}
void MainUI::LocalListMediaInserted(int start, int end){
+ // qDebug() << "Media Inserted";
for(int i=start; i<end+1; i++){
QUrl url = PLAYLIST->media(i).canonicalUrl();
ui->list_local->insertItem(i, url.toLocalFile().section("/",-1).simplified());
@@ -358,6 +403,7 @@ void MainUI::LocalListMediaInserted(int start, int end){
}
void MainUI::LocalListMediaRemoved(int start, int end){
+ //qDebug() << "Media Removed";
for(int i=end; i>=start; i--){
delete ui->list_local->takeItem(i);
}
@@ -475,7 +521,8 @@ void MainUI::checkPandoraSettings(){
|| (PANDORA->password() != ui->line_pandora_pass->text())
|| (PANDORA->audioQuality() != ui->combo_pandora_quality->currentData().toString())
|| (PANDORA->proxy() != ui->line_pandora_proxy->text())
- || (PANDORA->controlProxy() != ui->line_pandora_cproxy->text());
+ || (PANDORA->controlProxy() != ui->line_pandora_cproxy->text())
+ || (PANDORA->currentAudioDriver() != ui->combo_pandora_driver->currentText());
ui->push_pandora_apply->setEnabled(changes);
}
@@ -484,6 +531,7 @@ void MainUI::applyPandoraSettings(){
PANDORA->setAudioQuality(ui->combo_pandora_quality->currentData().toString());
PANDORA->setProxy(ui->line_pandora_proxy->text());
PANDORA->setControlProxy(ui->line_pandora_cproxy->text());
+ PANDORA->setAudioDriver(ui->combo_pandora_driver->currentText());
if(PANDORA->isSetup()){
//Go ahead and (re)start the Pandora process so it is aware of the new changes
if(PANDORA->currentState()!=PianoBarProcess::Stopped){ PANDORA->closePianoBar(); }
@@ -491,6 +539,13 @@ void MainUI::applyPandoraSettings(){
}
}
+void MainUI::createPandoraStation(){
+ //Prompt for a search string
+ QString srch = QInputDialog::getText(this, tr("Pandora: Create Station"),"", QLineEdit::Normal, tr("Search Term"));
+ if(srch.isEmpty()){ return; } //cancelled
+ PANDORA->createNewStation(srch);
+}
+
//Pandora Process Feedback
void MainUI::PandoraStateChanged(PianoBarProcess::State state){
//qDebug() << "[STATE CHANGE]" << state;
@@ -527,7 +582,7 @@ void MainUI::PandoraStationChanged(QString station){
}
}
-void MainUI::PandoraSongChanged(bool isLoved, QString title, QString artist, QString album, QString detailsURL, QString fromStation){
+void MainUI::PandoraSongChanged(bool isLoved, QString title, QString artist, QString album, QString detailsURL, QString){ // fromStation){
//qDebug() << "[SONG CHANGE]" << isLoved << title << artist << album << detailsURL << fromStation;
ui->tool_pandora_info->setWhatsThis(detailsURL);
ui->tool_pandora_love->setChecked(isLoved);
@@ -563,8 +618,13 @@ void MainUI::PandoraStationListChanged(QStringList list){
if(index>=0){ ui->combo_pandora_station->setCurrentIndex(index); }
}
-void MainUI::PandoraListInfo(QStringList list){
- qDebug() << "[LIST INFO]" << list;
+void MainUI::PandoraInteractivePrompt(QString text, QStringList list){
+ QString sel = QInputDialog::getItem(this, tr("Pandora Question"), text, list, false);
+ PANDORA->answerQuestion( list.indexOf(sel) );
+}
+
+void MainUI::PandoraError(QString err){
+ QMessageBox::warning(this, tr("Pandora Error"), err);
}
//System Tray interactions
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
index 6128f5f7..5856b257 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
@@ -66,6 +66,8 @@ private slots:
void setLocalPosition(int pos){ PLAYER->setPosition(pos); }
void addLocalMedia();
void rmLocalMedia();
+ void upLocalMedia();
+ void downLocalMedia();
void localPlaybackSettingsChanged();
//Local Playlist Feedback
@@ -92,6 +94,8 @@ private slots:
void changePandoraStation(QString);
void checkPandoraSettings();
void applyPandoraSettings();
+ void createPandoraStation();
+
//Pandora Process Feedback
void PandoraStateChanged(PianoBarProcess::State);
void NewPandoraInfo(QString);
@@ -99,7 +103,8 @@ private slots:
void PandoraSongChanged(bool, QString, QString, QString, QString, QString); //[isLoved, title, artist, album, detailsURL, fromStation]
void PandoraTimeUpdate(int,int); //current secs, total secs
void PandoraStationListChanged(QStringList);
- void PandoraListInfo(QStringList);
+ void PandoraInteractivePrompt(QString, QStringList);
+ void PandoraError(QString);
//System Tray interactions
void toggleVisibility();
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
index f0bbef0e..385c534e 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>385</width>
- <height>416</height>
+ <height>479</height>
</rect>
</property>
<property name="windowTitle">
@@ -91,7 +91,7 @@
<item>
<widget class="QTabWidget" name="tabWidget_local">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="tab_local_playing">
<attribute name="title">
@@ -204,6 +204,51 @@
</spacer>
</item>
<item>
+ <widget class="QToolButton" name="tool_local_moveup">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>up</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_local_movedown">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>down</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QToolButton" name="tool_local_shuffle">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -254,7 +299,7 @@
<item>
<widget class="QTabWidget" name="tabWidget_pandora">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="tab_pandora_playing">
<attribute name="title">
@@ -577,27 +622,27 @@
<item row="1" column="1">
<widget class="QComboBox" name="combo_pandora_quality"/>
</item>
- <item row="2" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Proxy URL</string>
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<widget class="QLineEdit" name="line_pandora_proxy"/>
</item>
- <item row="3" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Control Proxy URL</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="4" column="1">
<widget class="QLineEdit" name="line_pandora_cproxy"/>
</item>
- <item row="5" column="0" colspan="2">
+ <item row="6" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
@@ -634,7 +679,7 @@
</item>
</layout>
</item>
- <item row="4" column="0">
+ <item row="5" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -647,6 +692,16 @@
</property>
</spacer>
</item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="combo_pandora_driver"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>Audio Driver</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
@@ -663,7 +718,7 @@
<x>0</x>
<y>0</y>
<width>385</width>
- <height>23</height>
+ <height>24</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -801,6 +856,14 @@
<string>Show song notifications</string>
</property>
</action>
+ <action name="action_pandora_newstation_search">
+ <property name="text">
+ <string>Search...</string>
+ </property>
+ <property name="toolTip">
+ <string>Search for a new station</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="extra/resources.qrc"/>
bgstack15