aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-28 00:16:21 -0400
committerKen Moore <ken@ixsystems.com>2017-04-28 00:16:21 -0400
commit267e71b738cfb04c3220e4aa6824b1c9a1c6b8d2 (patch)
treea97ec5461d73a6fb394dac34ca88e68e8bd23490 /src-qt5/desktop-utils
parentSpeed up the SVG icon loading routine. (diff)
downloadlumina-267e71b738cfb04c3220e4aa6824b1c9a1c6b8d2.tar.gz
lumina-267e71b738cfb04c3220e4aa6824b1c9a1c6b8d2.tar.bz2
lumina-267e71b738cfb04c3220e4aa6824b1c9a1c6b8d2.zip
Clean up the UI for lumina-mediaplayer, and disable video output (still getting gstreamer stream crashes when the video widget is not visible).
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp16
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h2
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui95
3 files changed, 48 insertions, 65 deletions
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
index 65fa7319..b912d784 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
@@ -21,14 +21,15 @@
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){
ui->setupUi(this);
closing = false;
+ DISABLE_VIDEO = true; //add a toggle in the UI for this later
//Any special UI changes
QWidget *spacer = new QWidget(this);
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
- ui->toolBar->insertWidget(ui->actionVolDown, spacer);
+ ui->toolBar->insertWidget(ui->radio_local, spacer);
//Setup an action group for the various modes/streams
- QButtonGroup *grp = new QButtonGroup(this);
- grp->addButton(ui->radio_local);
- grp->addButton(ui->radio_pandora);
+ QActionGroup *grp = new QActionGroup(this);
+ grp->addAction(ui->radio_local);
+ grp->addAction(ui->radio_pandora);
grp->setExclusive(true);
ui->radio_pandora->setChecked(true);
@@ -59,7 +60,7 @@ void MainUI::setupPlayer(){
ui->videoLayout->addWidget(VIDEO);
//Now setup the interfaces between all these objects
- PLAYER->setVideoOutput(VIDEO);
+ if(!DISABLE_VIDEO){ PLAYER->setVideoOutput(VIDEO); }
PLAYER->setPlaylist(PLAYLIST);
PLAYER->setVolume(100); //just maximize this - will be managed outside this app
@@ -419,7 +420,8 @@ void MainUI::LocalListMediaRemoved(int start, int end){
}*/
void MainUI::LocalVideoAvailable(bool avail){
- //qDebug() << "Local VideoAvailable:" << avail;
+ qDebug() << "Local VideoAvailable:" << avail;
+ if(DISABLE_VIDEO){ avail = false; } //TEMPORARY DISABLE while working out gstreamer issues when video widget is hidden
//if(ui->tabWidget_local->currentWidget()==ui->tab_local_playing && avail){
VIDEO->setVisible(avail);
//}
@@ -478,7 +480,7 @@ void MainUI::LocalStateChanged(QMediaPlayer::State state){
}else if(state == QMediaPlayer::PlayingState && !ui->tabWidget_local->isTabEnabled(0)){
ui->tabWidget_local->setTabEnabled(0,true);
ui->tabWidget_local->setCurrentWidget(ui->tab_local_playing);
- }else if(PLAYER->mediaStatus()== QMediaPlayer::BufferingMedia || PLAYER->mediaStatus()==QMediaPlayer::BufferedMedia){
+ }else if(!DISABLE_VIDEO && (PLAYER->mediaStatus()== QMediaPlayer::BufferingMedia || PLAYER->mediaStatus()==QMediaPlayer::BufferedMedia) ){
if(VIDEO->isVisible() != PLAYER->isVideoAvailable()){ VIDEO->setVisible(PLAYER->isVideoAvailable()); }
}
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
index 5856b257..cc966f4d 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.h
@@ -40,7 +40,7 @@ private:
QVideoWidget *VIDEO;
QMediaPlaylist *PLAYLIST;
QSystemTrayIcon *SYSTRAY;
- bool closing;
+ bool closing, DISABLE_VIDEO;
void setupPlayer();
void setupPandora();
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
index 385c534e..7b357b4d 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>385</width>
- <height>479</height>
+ <width>405</width>
+ <height>473</height>
</rect>
</property>
<property name="windowTitle">
@@ -31,65 +31,17 @@
<number>0</number>
</property>
<item>
- <widget class="QFrame" name="frame_type">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="topMargin">
- <number>1</number>
- </property>
- <property name="bottomMargin">
- <number>1</number>
- </property>
- <item>
- <widget class="QToolButton" name="radio_local">
- <property name="text">
- <string>Local Files</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="radio_pandora">
- <property name="text">
- <string>Pandora Radio</string>
- </property>
- <property name="icon">
- <iconset resource="extra/resources.qrc">
- <normaloff>:/pandora</normaloff>:/pandora</iconset>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="page_local">
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QTabWidget" name="tabWidget_local">
+ <property name="tabPosition">
+ <enum>QTabWidget::West</enum>
+ </property>
<property name="currentIndex">
<number>1</number>
</property>
@@ -298,6 +250,9 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="tabWidget_pandora">
+ <property name="tabPosition">
+ <enum>QTabWidget::West</enum>
+ </property>
<property name="currentIndex">
<number>1</number>
</property>
@@ -717,7 +672,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>385</width>
+ <width>405</width>
<height>24</height>
</rect>
</property>
@@ -763,8 +718,8 @@
<addaction name="actionStop"/>
<addaction name="actionBack"/>
<addaction name="actionNext"/>
- <addaction name="actionVolDown"/>
- <addaction name="actionVolUp"/>
+ <addaction name="radio_local"/>
+ <addaction name="radio_pandora"/>
</widget>
<action name="actionPlay">
<property name="text">
@@ -864,6 +819,32 @@
<string>Search for a new station</string>
</property>
</action>
+ <action name="radio_pandora">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="icon">
+ <iconset resource="extra/resources.qrc">
+ <normaloff>:/pandora</normaloff>:/pandora</iconset>
+ </property>
+ <property name="text">
+ <string>Pandora Radio</string>
+ </property>
+ <property name="toolTip">
+ <string>Stream from Pandora Radio</string>
+ </property>
+ </action>
+ <action name="radio_local">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Local Files</string>
+ </property>
+ <property name="toolTip">
+ <string>Play Local Files</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="extra/resources.qrc"/>
bgstack15