首次提交
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QScrollBar>
|
||||
#include <QTextEdit>
|
||||
#include <QWidget>
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <QColor>
|
||||
#include <QString>
|
||||
|
||||
namespace Psc {
|
||||
struct Base_Table_Data;
|
||||
struct Base_Info;
|
||||
struct Row_Info;
|
||||
struct Col_Info;
|
||||
class Table_View;
|
||||
|
||||
struct Cell_Info {
|
||||
int col_idx, row_idx;
|
||||
int sw, sh;
|
||||
};
|
||||
struct Pos {
|
||||
int index; // 头的索引
|
||||
int cell_pos; // index位置的块 头的绝对位置
|
||||
int offset; // 相对于块头的偏移
|
||||
[[nodiscard]] int pos() const { return cell_pos + offset; }
|
||||
Pos(int index, int cell_pos, int offset) : index(index), cell_pos(cell_pos), offset(offset) {}
|
||||
bool operator==(const Pos& p) const { return p.cell_pos == cell_pos && index == p.index && offset == p.offset; }
|
||||
bool operator!=(const Pos& pos) const { return !operator==(pos); }
|
||||
QString to_string() const {
|
||||
return QString("index:%1 pos:%2 offset:%3").arg(index).arg(cell_pos).arg(offset);
|
||||
}
|
||||
};
|
||||
|
||||
struct Find_Ret {
|
||||
int col_index;
|
||||
int row_index;
|
||||
QString to_string() const {
|
||||
return QString("Find_Ret(%1, %2)").arg(col_index).arg(row_index);
|
||||
}
|
||||
};
|
||||
// 纯虚函数
|
||||
enum class Edge_Expand_Type {
|
||||
Positive, // 顺着坐标轴方向拓展
|
||||
Negative, // 逆着坐标轴方向拓展
|
||||
None // 不进行边缘拓展
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user