Add basic StreamWindow

This commit is contained in:
Florian Märkl 2019-06-01 14:11:09 +02:00
parent 7d448cc8b3
commit d0aaacb600
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
4 changed files with 74 additions and 1 deletions

View file

@ -5,7 +5,12 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Multimedia) find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Multimedia)
add_executable(chiaki main.cpp) add_executable(chiaki
src/main.cpp
include/streamwindow.h
src/streamwindow.cpp)
target_include_directories(chiaki PRIVATE include)
target_link_libraries(chiaki chiaki-lib) target_link_libraries(chiaki chiaki-lib)
target_link_libraries(chiaki Qt5::Core Qt5::Widgets Qt5::Gui Qt5::Multimedia) target_link_libraries(chiaki Qt5::Core Qt5::Widgets Qt5::Gui Qt5::Multimedia)

View file

@ -0,0 +1,32 @@
/*
* This file is part of Chiaki.
*
* Chiaki 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 3 of the License, or
* (at your option) any later version.
*
* Chiaki 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 Chiaki. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CHIAKI_GUI_STREAMWINDOW_H
#define CHIAKI_GUI_STREAMWINDOW_H
#include <QMainWindow>
class StreamWindow: public QMainWindow
{
Q_OBJECT
public:
explicit StreamWindow(QWidget *parent = nullptr);
~StreamWindow();
};
#endif // CHIAKI_GUI_STREAMWINDOW_H

View file

@ -1,4 +1,6 @@
#include <streamwindow.h>
#include <chiaki/session.h> #include <chiaki/session.h>
#include <chiaki/base64.h> #include <chiaki/base64.h>
@ -58,6 +60,13 @@ int main(int argc, char *argv[])
argc = 1; argc = 1;
QApplication app(argc, argv); QApplication app(argc, argv);
StreamWindow window;
window.resize(640, 360);
window.show();
return app.exec();
QAudioFormat audio_format; QAudioFormat audio_format;
audio_format.setSampleRate(48000); audio_format.setSampleRate(48000);
audio_format.setChannelCount(2); audio_format.setChannelCount(2);

27
gui/src/streamwindow.cpp Normal file
View file

@ -0,0 +1,27 @@
/*
* This file is part of Chiaki.
*
* Chiaki 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 3 of the License, or
* (at your option) any later version.
*
* Chiaki 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 Chiaki. If not, see <https://www.gnu.org/licenses/>.
*/
#include <streamwindow.h>
StreamWindow::StreamWindow(QWidget *parent)
: QMainWindow(parent)
{
}
StreamWindow::~StreamWindow()
{
}