mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Added stubbed LibraryNotConnectedLayout
This commit is contained in:
parent
2e6b588092
commit
c7b466919f
@ -7,6 +7,7 @@ set (CUBE_SRCS
|
||||
./app/layout/HotkeysLayout.cpp
|
||||
./app/layout/SettingsLayout.cpp
|
||||
./app/layout/LibraryLayout.cpp
|
||||
./app/layout/LibraryNotConnectedLayout.cpp
|
||||
./app/layout/LyricsLayout.cpp
|
||||
./app/layout/MainLayout.cpp
|
||||
./app/layout/NowPlayingLayout.cpp
|
||||
|
72
src/musikcube/app/layout/LibraryNotConnectedLayout.cpp
Normal file
72
src/musikcube/app/layout/LibraryNotConnectedLayout.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2004-2019 musikcube team
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// * Neither the name of the author nor the names of other contributors may
|
||||
// be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdafx.h>
|
||||
#include <app/layout/LibraryNotConnectedLayout.h>
|
||||
#include <core/i18n/Locale.h>
|
||||
#include <cursespp/App.h>
|
||||
#include <cursespp/Screen.h>
|
||||
#include <cursespp/ToastOverlay.h>
|
||||
#include <app/util/Hotkeys.h>
|
||||
#include <app/util/Messages.h>
|
||||
|
||||
using namespace musik::cube;
|
||||
using namespace musik::core;
|
||||
using namespace musik::core::runtime;
|
||||
using namespace cursespp;
|
||||
|
||||
LibraryNotConnectedLayout::LibraryNotConnectedLayout(ILibraryPtr library)
|
||||
: LayoutBase()
|
||||
, library(library) {
|
||||
}
|
||||
|
||||
void LibraryNotConnectedLayout::OnLayout() {
|
||||
LayoutBase::OnLayout();
|
||||
}
|
||||
|
||||
void LibraryNotConnectedLayout::OnVisibilityChanged(bool visible) {
|
||||
LayoutBase::OnVisibilityChanged(visible);
|
||||
}
|
||||
|
||||
bool LibraryNotConnectedLayout::KeyPress(const std::string& kn) {
|
||||
return LayoutBase::KeyPress(kn);
|
||||
}
|
||||
|
||||
void LibraryNotConnectedLayout::OnLibraryStateChanged(ILibrary::ConnectionState state) {
|
||||
|
||||
}
|
||||
|
||||
void LibraryNotConnectedLayout::SetShortcutsWindow(cursespp::ShortcutsWindow* w) {
|
||||
|
||||
}
|
63
src/musikcube/app/layout/LibraryNotConnectedLayout.h
Normal file
63
src/musikcube/app/layout/LibraryNotConnectedLayout.h
Normal file
@ -0,0 +1,63 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2004-2019 musikcube team
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// * Neither the name of the author nor the names of other contributors may
|
||||
// be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cursespp/LayoutBase.h>
|
||||
#include <core/library/ILibrary.h>
|
||||
#include <cursespp/ITopLevelLayout.h>
|
||||
|
||||
namespace musik { namespace cube {
|
||||
|
||||
class LibraryNotConnectedLayout:
|
||||
public cursespp::LayoutBase,
|
||||
public cursespp::ITopLevelLayout,
|
||||
public sigslot::has_slots<>
|
||||
{
|
||||
public:
|
||||
LibraryNotConnectedLayout(musik::core::ILibraryPtr library);
|
||||
|
||||
virtual void OnLayout() override;
|
||||
virtual bool KeyPress(const std::string& kn) override;
|
||||
virtual void SetShortcutsWindow(cursespp::ShortcutsWindow* w) override;
|
||||
|
||||
protected:
|
||||
void OnVisibilityChanged(bool visible) override;
|
||||
void OnLibraryStateChanged(musik::core::ILibrary::ConnectionState state);
|
||||
|
||||
private:
|
||||
musik::core::ILibraryPtr library;
|
||||
};
|
||||
|
||||
} }
|
@ -790,6 +790,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
|
||||
<ClCompile Include="app\layout\HotkeysLayout.cpp" />
|
||||
<ClCompile Include="app\layout\LibraryLayout.cpp" />
|
||||
<ClCompile Include="app\layout\ConsoleLayout.cpp" />
|
||||
<ClCompile Include="app\layout\LibraryNotConnectedLayout.cpp" />
|
||||
<ClCompile Include="app\layout\LyricsLayout.cpp" />
|
||||
<ClCompile Include="app\layout\NowPlayingLayout.cpp" />
|
||||
<ClCompile Include="app\layout\CategorySearchLayout.cpp" />
|
||||
@ -872,6 +873,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
|
||||
<ClInclude Include="app\layout\ITopLevelLayout.h" />
|
||||
<ClInclude Include="app\layout\LibraryLayout.h" />
|
||||
<ClInclude Include="app\layout\ConsoleLayout.h" />
|
||||
<ClInclude Include="app\layout\LibraryNotConnectedLayout.h" />
|
||||
<ClInclude Include="app\layout\LyricsLayout.h" />
|
||||
<ClInclude Include="app\layout\NowPlayingLayout.h" />
|
||||
<ClInclude Include="app\layout\CategorySearchLayout.h" />
|
||||
|
@ -195,6 +195,9 @@
|
||||
<ClCompile Include="app\util\MagicConstants.cpp">
|
||||
<Filter>app\util</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="app\layout\LibraryNotConnectedLayout.cpp">
|
||||
<Filter>app\layout</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
@ -445,6 +448,9 @@
|
||||
<ClInclude Include="app\util\MagicConstants.h">
|
||||
<Filter>app\util</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="app\layout\LibraryNotConnectedLayout.h">
|
||||
<Filter>app\layout</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="cursespp">
|
||||
|
Loading…
Reference in New Issue
Block a user