Add initial project structure with essential files including .gitignore, application resources, and various model and view components for the application. Implemented asynchronous parsing support and database structure checks.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef FREEZETABLEWIDGET_H
|
||||
#define FREEZETABLEWIDGET_H
|
||||
|
||||
#include <QTableView>
|
||||
|
||||
class FreezeTableWidget : public QTableView {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FreezeTableWidget(QWidget *parent = nullptr);
|
||||
~FreezeTableWidget();
|
||||
|
||||
// Установить количество замороженных столбцов
|
||||
void setFrozenColumns(int count);
|
||||
|
||||
// Получить количество замороженных столбцов
|
||||
int frozenColumns() const { return m_frozenColumns; }
|
||||
|
||||
// Переопределяем setModel для инициализации замороженной таблицы
|
||||
void setModel(QAbstractItemModel *model) override;
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
|
||||
void scrollTo (const QModelIndex & index, ScrollHint hint = EnsureVisible) override;
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
|
||||
private:
|
||||
QTableView *frozenTableView;
|
||||
int m_frozenColumns;
|
||||
void init();
|
||||
void updateFrozenTableGeometry();
|
||||
|
||||
private slots:
|
||||
void updateSectionWidth(int logicalIndex, int oldSize, int newSize);
|
||||
void updateSectionHeight(int logicalIndex, int oldSize, int newSize);
|
||||
|
||||
};
|
||||
|
||||
#endif // FREEZETABLEWIDGET_H
|
||||
Reference in New Issue
Block a user