Now with more screens about to be added, move main interface to tab widgets.
This commit is contained in:
@@ -9,7 +9,7 @@ find_package(Wt REQUIRED)
|
|||||||
find_package(Groove REQUIRED)
|
find_package(Groove REQUIRED)
|
||||||
find_package(TagLib REQUIRED)
|
find_package(TagLib REQUIRED)
|
||||||
|
|
||||||
add_executable(arbitrateor src/main.cpp src/WebInterface.cpp src/GroovePlayer.cpp src/ui/LoginInterface.cpp src/ui/PlayerInterface.cpp src/ui/TrackDetails.cpp)
|
add_executable(arbitrateor src/main.cpp src/WebInterface.cpp src/GroovePlayer.cpp src/ui/LoginInterface.cpp src/ui/PlayerInterface.cpp src/ui/TrackDetails.cpp src/ui/RequestInterface.cpp)
|
||||||
target_link_libraries(arbitrateor ${Wt_LIBRARIES} ${GROOVE_LIBRARY} ${GROOVE_FINGERPRINT_LIBRARY} ${GROOVE_PLAYER_LIBRARY} ${TAGLIB_LIBRARY} pthread boost_system stdc++fs) #TODO get threading links based on platform. Remove gcc experimental fs when official c++17 exists.
|
target_link_libraries(arbitrateor ${Wt_LIBRARIES} ${GROOVE_LIBRARY} ${GROOVE_FINGERPRINT_LIBRARY} ${GROOVE_PLAYER_LIBRARY} ${TAGLIB_LIBRARY} pthread boost_system stdc++fs) #TODO get threading links based on platform. Remove gcc experimental fs when official c++17 exists.
|
||||||
|
|
||||||
install(TARGETS arbitrateor RUNTIME DESTINATION bin)
|
install(TARGETS arbitrateor RUNTIME DESTINATION bin)
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ PlayerInterface::PlayerInterface(WebInterface* app)
|
|||||||
skipControls->addWidget(skipRequest);
|
skipControls->addWidget(skipRequest);
|
||||||
skipControls->addWidget(skipDeny);
|
skipControls->addWidget(skipDeny);
|
||||||
|
|
||||||
|
mainDisplay = new Wt::WTabWidget();
|
||||||
|
|
||||||
|
voteMetaContainer = new Wt::WContainerWidget();
|
||||||
|
voteMetaLayout = new Wt::WVBoxLayout();
|
||||||
|
voteMetaContainer->setLayout(voteMetaLayout);
|
||||||
voteControlContainer = new Wt::WContainerWidget();
|
voteControlContainer = new Wt::WContainerWidget();
|
||||||
voteControlContainer->setMaximumSize(Wt::WLength(75,Wt::WLength::Percentage),Wt::WLength::Auto);
|
voteControlContainer->setMaximumSize(Wt::WLength(75,Wt::WLength::Percentage),Wt::WLength::Auto);
|
||||||
voteControlContainer->decorationStyle().setBackgroundColor(Wt::WColor("lightsteelblue"));
|
voteControlContainer->decorationStyle().setBackgroundColor(Wt::WColor("lightsteelblue"));
|
||||||
@@ -117,10 +122,12 @@ PlayerInterface::PlayerInterface(WebInterface* app)
|
|||||||
|
|
||||||
interfaceLayout->addWidget(playControlWidget);
|
interfaceLayout->addWidget(playControlWidget);
|
||||||
interfaceLayout->addWidget(currentTrackProgress);
|
interfaceLayout->addWidget(currentTrackProgress);
|
||||||
interfaceLayout->addWidget(voteControlContainer,0,Wt::AlignmentFlag::AlignCenter);
|
interfaceLayout->addWidget(mainDisplay);
|
||||||
|
mainDisplay->addTab(voteMetaContainer,"Up Next",Wt::WTabWidget::PreLoading);
|
||||||
playControlWidget->addStyleClass("panel");
|
playControlWidget->addStyleClass("panel");
|
||||||
playControlWidget->addStyleClass("panel-default");
|
playControlWidget->addStyleClass("panel-default");
|
||||||
playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("gainsboro"));
|
playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("gainsboro"));
|
||||||
|
voteMetaLayout->addWidget(voteControlContainer,0,Wt::AlignmentFlag::AlignCenter);
|
||||||
playControlLayout->addWidget(playpause,0,Wt::AlignmentFlag::AlignLeft | Wt::AlignmentFlag::AlignMiddle);
|
playControlLayout->addWidget(playpause,0,Wt::AlignmentFlag::AlignLeft | Wt::AlignmentFlag::AlignMiddle);
|
||||||
playControlLayout->addWidget(currentTrackDetails,0,Wt::AlignmentFlag::AlignCenter | Wt::AlignmentFlag::AlignMiddle);
|
playControlLayout->addWidget(currentTrackDetails,0,Wt::AlignmentFlag::AlignCenter | Wt::AlignmentFlag::AlignMiddle);
|
||||||
playControlLayout->addWidget(skipControls,0,Wt::AlignmentFlag::AlignRight | Wt::AlignmentFlag::AlignMiddle);
|
playControlLayout->addWidget(skipControls,0,Wt::AlignmentFlag::AlignRight | Wt::AlignmentFlag::AlignMiddle);
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#define PLAYERINTERFACE_H
|
#define PLAYERINTERFACE_H
|
||||||
|
|
||||||
#include <Wt/WContainerWidget>
|
#include <Wt/WContainerWidget>
|
||||||
|
#include <Wt/WTabWidget>
|
||||||
#include <Wt/WHBoxLayout>
|
#include <Wt/WHBoxLayout>
|
||||||
#include <Wt/WVBoxLayout>
|
#include <Wt/WVBoxLayout>
|
||||||
#include "../WebInterface.h"
|
#include "../WebInterface.h"
|
||||||
@@ -52,7 +53,12 @@ public:
|
|||||||
Wt::WPushButton* skipRequest;
|
Wt::WPushButton* skipRequest;
|
||||||
Wt::WPushButton* skipDeny;
|
Wt::WPushButton* skipDeny;
|
||||||
|
|
||||||
|
//TabView
|
||||||
|
Wt::WTabWidget* mainDisplay;
|
||||||
|
|
||||||
//Vote Controls
|
//Vote Controls
|
||||||
|
Wt::WContainerWidget* voteMetaContainer;
|
||||||
|
Wt::WVBoxLayout* voteMetaLayout;
|
||||||
Wt::WContainerWidget* voteControlContainer;
|
Wt::WContainerWidget* voteControlContainer;
|
||||||
Wt::WContainerWidget* voteTracksContainer;
|
Wt::WContainerWidget* voteTracksContainer;
|
||||||
Wt::WText* voteHeader;
|
Wt::WText* voteHeader;
|
||||||
|
|||||||
20
src/ui/RequestInterface.cpp
Normal file
20
src/ui/RequestInterface.cpp
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "RequestInterface.h"
|
||||||
33
src/ui/RequestInterface.h
Normal file
33
src/ui/RequestInterface.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef REQUESTINTERFACE_H
|
||||||
|
#define REQUESTINTERFACE_H
|
||||||
|
|
||||||
|
#include <Wt/WContainerWidget>
|
||||||
|
#include "../WebInterface.h"
|
||||||
|
|
||||||
|
class RequestInterface : public Wt::WContainerWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RequestInterface(WebInterface* app);
|
||||||
|
WebInterface* app;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // REQUESTINTERFACE_H
|
||||||
Reference in New Issue
Block a user