mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-07-15 09:33:36 -07:00
Add basic StreamWindow
This commit is contained in:
parent
7d448cc8b3
commit
d0aaacb600
4 changed files with 74 additions and 1 deletions
|
@ -5,7 +5,12 @@ set(CMAKE_AUTOUIC ON)
|
|||
set(CMAKE_AUTORCC ON)
|
||||
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 Qt5::Core Qt5::Widgets Qt5::Gui Qt5::Multimedia)
|
32
gui/include/streamwindow.h
Normal file
32
gui/include/streamwindow.h
Normal 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
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include <streamwindow.h>
|
||||
|
||||
#include <chiaki/session.h>
|
||||
#include <chiaki/base64.h>
|
||||
|
||||
|
@ -58,6 +60,13 @@ int main(int argc, char *argv[])
|
|||
argc = 1;
|
||||
QApplication app(argc, argv);
|
||||
|
||||
StreamWindow window;
|
||||
window.resize(640, 360);
|
||||
window.show();
|
||||
|
||||
return app.exec();
|
||||
|
||||
|
||||
QAudioFormat audio_format;
|
||||
audio_format.setSampleRate(48000);
|
||||
audio_format.setChannelCount(2);
|
27
gui/src/streamwindow.cpp
Normal file
27
gui/src/streamwindow.cpp
Normal 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()
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue