first commit
This commit is contained in:
12
components/charts/heatmap.cc
Normal file
12
components/charts/heatmap.cc
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Created by Lenn on 2025/10/17.
|
||||
//
|
||||
|
||||
#include "heatmap.hh"
|
||||
#include "heatmap.impl.hh"
|
||||
|
||||
BasicPlot::BasicPlot()
|
||||
: pimpl {std::make_unique<Impl>(*this)} {}
|
||||
|
||||
void BasicPlot::set_matrix_size(const QSize &) {
|
||||
}
|
||||
57
components/charts/heatmap.hh
Normal file
57
components/charts/heatmap.hh
Normal file
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// Created by Lenn on 2025/10/17.
|
||||
//
|
||||
|
||||
#ifndef TOUCHSENSOR_HEATMAP_H
|
||||
#define TOUCHSENSOR_HEATMAP_H
|
||||
|
||||
#include "modern-qt/utility/theme/theme.hh"
|
||||
#include "modern-qt/utility/wrapper/pimpl.hh"
|
||||
#include "qcustomplot/qcustomplot.h"
|
||||
|
||||
namespace creeper {
|
||||
class heatmap;
|
||||
|
||||
namespace plot_widget::internal {
|
||||
class BasicPlot : public QCustomPlot {
|
||||
CREEPER_PIMPL_DEFINITION(BasicPlot);
|
||||
friend heatmap;
|
||||
|
||||
public:
|
||||
struct ColorSpace {
|
||||
|
||||
};
|
||||
|
||||
void load_theme_manager(ThemeManager&);
|
||||
|
||||
void set_xlabel_text(const QString&);
|
||||
|
||||
void set_ylabel_text(const QString&);
|
||||
|
||||
void set_matrix_size(const QSize&);
|
||||
|
||||
private:
|
||||
friend class Impl;
|
||||
};
|
||||
}
|
||||
|
||||
namespace plot_widget::pro {
|
||||
using Token = common::Token<internal::BasicPlot>;
|
||||
using XLabelText = common::pro::String<Token, [](auto& self, const auto& string) {
|
||||
self.set_xlabel_text(string);
|
||||
}>;
|
||||
using YLabelText = common::pro::String<Token, [](auto& self, const auto& string) {
|
||||
self.set_ylabel_text(string);
|
||||
}>;
|
||||
|
||||
struct MatrixSize : Token {
|
||||
QSize size;
|
||||
explicit MatrixSize(const int& w, const int& h) : size {w, h} {}
|
||||
void apply(auto& self) const {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //TOUCHSENSOR_HEATMAP_H
|
||||
22
components/charts/heatmap.impl.hh
Normal file
22
components/charts/heatmap.impl.hh
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by Lenn on 2025/10/17.
|
||||
//
|
||||
|
||||
#ifndef TOUCHSENSOR_HEATMAP_IMPL_HH
|
||||
#define TOUCHSENSOR_HEATMAP_IMPL_HH
|
||||
|
||||
#include "heatmap.hh"
|
||||
|
||||
using namespace creeper::plot_widget::internal;
|
||||
|
||||
struct BasicPlot::Impl {
|
||||
explicit Impl(BasicSelect& self) noexcept
|
||||
: self{self} {
|
||||
|
||||
}
|
||||
private:
|
||||
|
||||
BasicPlot& self;
|
||||
};
|
||||
|
||||
#endif //TOUCHSENSOR_HEATMAP_IMPL_HH
|
||||
Reference in New Issue
Block a user