Skip to content

Commit

Permalink
Move some files
Browse files Browse the repository at this point in the history
  • Loading branch information
sguionni committed Jul 16, 2024
1 parent 076ac7a commit 8146b23
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions lib/ui/qt/include/qt/application.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __VTX_UI_QT_APPLICATION__
#define __VTX_UI_QT_APPLICATION__

#include "main_window.hpp"
#include "widget/main_window.hpp"
#include <QApplication>
#include <QPointer>
#include <QSettings>
Expand All @@ -16,7 +16,7 @@ namespace VTX::UI::QT
inline QSettings SETTINGS
= QSettings( QString::fromStdString( App::Filesystem::getConfigIniFile().string() ), QSettings::IniFormat );

class Application final : public UI::BaseApplication<MainWindow>, QApplication
class Application final : public UI::BaseApplication<Widget::MainWindow>, QApplication
{
public:
Application();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef __VTX_UI_QT_MAIN_WINDOW__
#define __VTX_UI_QT_MAIN_WINDOW__
#ifndef __VTX_UI_QT_WIDGET_MAIN_WINDOW__
#define __VTX_UI_QT_WIDGET_MAIN_WINDOW__

#include "base_widget.hpp"
#include "helper.hpp"
#include "qt/base_widget.hpp"
#include "qt/helper.hpp"
#include "opengl_widget.hpp"
#include "status_bar.hpp"
#include "ui/concepts.hpp"
Expand All @@ -13,7 +13,7 @@
#include <ui/actions.hpp>
#include <util/logger.hpp>

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{

class MainWindow : public BaseWidget<MainWindow, QMainWindow>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __VTX_UI_QT_OPENGL_WIDGET__
#define __VTX_UI_QT_OPENGL_WIDGET__
#ifndef __VTX_UI_QT_WIDGET_OPENGL_WIDGET__
#define __VTX_UI_QT_WIDGET_OPENGL_WIDGET__

#include "qt/base_widget.hpp"
#include <QOpenGLContext>
Expand All @@ -9,7 +9,7 @@
#include <QResizeEvent>
#include <QWindow>

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{
// Reimplement a custom OpenGL widget to avoid the use of QOpenGLWidget.
class OpenGLWidget : public QT::BaseWidget<OpenGLWidget, QWidget>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef __VTX_UI_QT_STATUS_BAR__
#define __VTX_UI_QT_STATUS_BAR__
#ifndef __VTX_UI_QT_WIDGET_STATUS_BAR__
#define __VTX_UI_QT_WIDGET_STATUS_BAR__

#include "qt/base_widget.hpp"
#include <QLabel>
#include <QPointer>
#include <QStatusBar>
#include <QTimer>

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{

class StatusBar : public BaseWidget<StatusBar, QStatusBar>
Expand All @@ -17,6 +17,6 @@ namespace VTX::UI::QT
virtual ~StatusBar() {}
};

} // namespace VTX::UI::QT
} // namespace VTX::UI::QT::Widget

#endif
4 changes: 2 additions & 2 deletions lib/ui/qt/src/qt/application.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "qt/application.hpp"
#include "qt/main_window.hpp"
#include "qt/menu/file.hpp"
#include "qt/resources.hpp"
#include "qt/widget/main_window.hpp"
#include <QApplication>
#include <QFile>
#include <QIcon>
Expand All @@ -19,7 +19,7 @@ namespace VTX::UI::QT

// Create QApplication with zero argc and nullptr argv.
int zero = 0;
Application::Application() : UI::BaseApplication<MainWindow>(), QApplication( zero, nullptr )
Application::Application() : UI::BaseApplication<Widget::MainWindow>(), QApplication( zero, nullptr )

{
using namespace Resources;
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/qt/src/qt/dialog/download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace VTX::UI::QT::Dialog
{

Download::Download() : BaseWidget<Download, QDialog>( WIDGET<MainWindow>() )
Download::Download() : BaseWidget<Download, QDialog>( WIDGET<Widget::MainWindow>() )
{
setWindowTitle( "Download" );
// TODO: try size policy?
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/qt/src/qt/line_edit/command_launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace VTX::UI::QT::LineEdit
{
CommandLauncher::CommandLauncher( QWidget * p_parent ) : BaseWidget( p_parent )
{
setPlaceholderText( ">" );
setPlaceholderText( "/command" );
_setupCompleter();
setCompleter( _completer );
setClearButtonEnabled( true );
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/qt/src/qt/menu/theme.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "qt/menu/theme.hpp"
#include "qt/main_window.hpp"
#include "qt/widget/main_window.hpp"

namespace VTX::UI::QT::Menu
{

void Theme::_resetLayout()
{
WIDGET<MainWindow>()->resetLayout();
WIDGET<Widget::MainWindow>()->resetLayout();
VTX_DEBUG( "Layout reseted" );
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "qt/main_window.hpp"
#include "qt/widget/main_window.hpp"
#include "qt/dock_widget/console.hpp"
#include "qt/dock_widget/inspector.hpp"
#include "qt/dock_widget/options.hpp"
Expand All @@ -15,7 +15,7 @@
#include "qt/tool_bar/file.hpp"
#include "qt/tool_bar/snapshot.hpp"

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{

MainWindow::MainWindow() : BaseWidget<MainWindow, QMainWindow>( nullptr ), _inputManager( App::INPUT_MANAGER() )
Expand Down Expand Up @@ -144,4 +144,4 @@ namespace VTX::UI::QT
p_event->accept();
QApplication::quit();
}
} // namespace VTX::UI::QT
} // namespace VTX::UI::QT::Widget
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "qt/opengl_widget.hpp"
#include "qt/widget/opengl_widget.hpp"

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{

OpenGLWidget::OpenGLWidget( QWidget * p_parent ) : BaseWidget( p_parent )
Expand All @@ -11,9 +11,9 @@ namespace VTX::UI::QT
format.setProfile( QSurfaceFormat::CoreProfile );
format.setRenderableType( QSurfaceFormat::OpenGL );
format.setSwapBehavior( QSurfaceFormat::DoubleBuffer );
format.setSwapInterval( 0 );
// format.setDepthBufferSize( 24 );
// format.setStencilBufferSize( 8 );
// format.setSwapInterval( 0 );
// format.setDepthBufferSize( 24 );
// format.setStencilBufferSize( 8 );

// format.setRedBufferSize( 32 );
// format.setGreenBufferSize( 32 );
Expand Down Expand Up @@ -108,4 +108,4 @@ namespace VTX::UI::QT
*/
}

} // namespace VTX::UI::QT
} // namespace VTX::UI::QT::Widget
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "qt/status_bar.hpp"
#include "qt/widget/status_bar.hpp"
#include "app/internal/monitoring/all_metrics.hpp"
#include <app/application/system/renderer.hpp>
#include <app/vtx_app.hpp>

namespace VTX::UI::QT
namespace VTX::UI::QT::Widget
{

StatusBar::StatusBar( QWidget * p_parent ) : BaseWidget<StatusBar, QStatusBar>( p_parent )
Expand Down Expand Up @@ -42,4 +42,4 @@ namespace VTX::UI::QT
timer->start( 1000 );
}

} // namespace VTX::UI::QT
} // namespace VTX::UI::QT::Widget

0 comments on commit 8146b23

Please sign in to comment.