clang-format
This commit is contained in:
parent
be2df57702
commit
16ea643f90
9
.clang-format
Normal file
9
.clang-format
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
UseTab: Always
|
||||||
|
TabWidth: 4
|
||||||
|
IndentWidth: 4
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
IndentCaseLabels: false
|
||||||
|
ColumnLimit: 0
|
||||||
|
PointerAlignment: Left
|
||||||
|
PackConstructorInitializers: Never
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
#include "api.hxx"
|
#include "api.hxx"
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace ffi {
|
namespace ffi {
|
||||||
extern "C" Core* rt4_viewport_create(xcb_connection_t* connection, std::uint32_t window);
|
extern "C" Core* rt4_viewport_create(xcb_connection_t* connection, std::uint32_t window);
|
||||||
extern "C" void rt4_viewport_destroy(Core* viewport);
|
extern "C" void rt4_viewport_destroy(Core* viewport);
|
||||||
extern "C" void rt4_viewport_configure(Core* viewport, std::uint32_t width, std::uint32_t height);
|
extern "C" void rt4_viewport_configure(Core* viewport, std::uint32_t width, std::uint32_t height);
|
||||||
extern "C" void rt4_viewport_redraw(Core* viewport);
|
extern "C" void rt4_viewport_redraw(Core* viewport);
|
||||||
}
|
} // namespace ffi
|
||||||
|
|
||||||
BoxCore::BoxCore(BoxCore&& b)
|
BoxCore::BoxCore(BoxCore&& b)
|
||||||
: ptr(std::exchange(b.ptr, {}))
|
: ptr(std::exchange(b.ptr, {})) {
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BoxCore::~BoxCore() {
|
BoxCore::~BoxCore() {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char* argv[]) {
|
||||||
{
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
|
||||||
auto w = new PhotonLight;
|
auto w = new PhotonLight;
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@
|
||||||
#include "ui_main_window.h"
|
#include "ui_main_window.h"
|
||||||
|
|
||||||
PhotonLight::PhotonLight(QWidget* parent)
|
PhotonLight::PhotonLight(QWidget* parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent),
|
||||||
, m_ui(new Ui::MainWindow)
|
m_ui(new Ui::MainWindow) {
|
||||||
{
|
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PhotonLight : public QMainWindow
|
class PhotonLight : public QMainWindow {
|
||||||
{
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
|
||||||
Viewport::Viewport(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f) {
|
Viewport::Viewport(QWidget* parent, Qt::WindowFlags f)
|
||||||
|
: QWidget(parent, f) {
|
||||||
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
setAttribute(Qt::WA_DontCreateNativeAncestors);
|
||||||
setAttribute(Qt::WA_NativeWindow);
|
setAttribute(Qt::WA_NativeWindow);
|
||||||
setAttribute(Qt::WA_PaintOnScreen);
|
setAttribute(Qt::WA_PaintOnScreen);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user