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:
2025-12-08 15:21:18 +03:00
parent 4f8c90c15b
commit 3467003721
110 changed files with 35406 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
#include "cellsettingsdialog.h"
#include <QDebug>
CellSettingsDialog::CellSettingsDialog(int row, int column, const QString &cellName,
int currentStretch,
bool currentIsHeader,
bool currentIsUnderline,
QWidget *parent)
: QDialog(parent)
, m_row(row)
, m_column(column)
, m_cellName(cellName)
{
qDebug() << "CellSettingsDialog::CellSettingsDialog: Создаем диалог для ячейки row=" << row << "column=" << column;
setUp();
setUpConnections();
if (m_stretchSpinBox) {
m_stretchSpinBox->setValue(currentStretch);
}
if (m_isHeaderCheckBox) {
m_isHeaderCheckBox->setChecked(currentIsHeader);
}
if (m_isUnderlineCheckBox) {
m_isUnderlineCheckBox->setChecked(currentIsUnderline);
}
}
CellSettingsDialog::~CellSettingsDialog()
{
}
void CellSettingsDialog::setUp()
{
setWindowTitle("Настройка ячейки");
setModal(true);
resize(300, 200);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
// Информация о ячейке
m_cellNameLabel = new QLabel(QString("Ячейка: %1 (строка %2, колонка %3)").arg(m_cellName).arg(m_row + 1).arg(m_column + 1), this);
mainLayout->addWidget(m_cellNameLabel);
// Поле поджима
QHBoxLayout *stretchLayout = new QHBoxLayout();
QLabel *stretchLabel = new QLabel("Поджим по ширине:", this);
m_stretchSpinBox = new QSpinBox(this);
m_stretchSpinBox->setMinimum(50);
m_stretchSpinBox->setMaximum(200);
m_stretchSpinBox->setValue(100);
m_stretchSpinBox->setSuffix("%");
stretchLayout->addWidget(stretchLabel);
stretchLayout->addWidget(m_stretchSpinBox);
stretchLayout->addStretch();
mainLayout->addLayout(stretchLayout);
// Чекбокс для isHeader
m_isHeaderCheckBox = new QCheckBox("Является заголовком", this);
mainLayout->addWidget(m_isHeaderCheckBox);
// Чекбокс для isUnderline
m_isUnderlineCheckBox = new QCheckBox("Подчеркивать текст", this);
mainLayout->addWidget(m_isUnderlineCheckBox);
// Кнопки
m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
mainLayout->addWidget(m_buttonBox);
mainLayout->addStretch();
}
void CellSettingsDialog::setUpConnections()
{
connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
}
int CellSettingsDialog::getStretch() const
{
return m_stretchSpinBox ? m_stretchSpinBox->value() : 100;
}
bool CellSettingsDialog::isHeader() const
{
return m_isHeaderCheckBox ? m_isHeaderCheckBox->isChecked() : false;
}
bool CellSettingsDialog::isUnderline() const
{
return m_isUnderlineCheckBox ? m_isUnderlineCheckBox->isChecked() : true;
}