diff --git a/cpropertieswindow.cpp b/cpropertieswindow.cpp index 681f69d..ce7165a 100644 --- a/cpropertieswindow.cpp +++ b/cpropertieswindow.cpp @@ -364,6 +364,8 @@ void cPropertiesWindow::setBook(cStoryBook *lpStoryBook) ui->m_lpMarginTop->setValue(lpStoryBook->topMargin()); ui->m_lpMarginBottom->setValue(lpStoryBook->bottomMargin()); + enablePrintTitle(lpStoryBook->printTitle()); + connect(ui->m_lpTitle, &cLineEdit::textChanged, this, &cPropertiesWindow::onTitleChanged); connect(ui->m_lpSubTitle, &cLineEdit::textChanged, this, &cPropertiesWindow::onSubTitleChanged); connect(ui->m_lpAuthor, &cLineEdit::textChanged, this, &cPropertiesWindow::onAuthorChanged); @@ -514,6 +516,8 @@ void cPropertiesWindow::fillFontSize(QComboBox* lpComboBox) void cPropertiesWindow::onPrintTitleChanged(bool checked) { m_lpStoryBook->setPrintTitle(checked); + enablePrintTitle(checked); + m_lpMainWindow->somethingChanged(); } @@ -950,3 +954,15 @@ void cPropertiesWindow::onMarginBottomChanged(double d) m_lpStoryBook->setBottomMargin(d); m_lpMainWindow->somethingChanged(); } + +void cPropertiesWindow::enablePrintTitle(bool enable) +{ + ui->m_lpTitleFont->setEnabled(enable); + ui->m_lpTitleFontSize->setEnabled(enable); + ui->m_lpTitleBold->setEnabled(enable); + ui->m_lpTitleItalic->setEnabled(enable); + ui->m_lpTitleUnderline->setEnabled(enable); + ui->m_lpTitleLeft->setEnabled(enable); + ui->m_lpTitleCenter->setEnabled(enable); + ui->m_lpTitleRight->setEnabled(enable); +} diff --git a/cpropertieswindow.h b/cpropertieswindow.h index 8b06b1e..9182627 100644 --- a/cpropertieswindow.h +++ b/cpropertieswindow.h @@ -614,6 +614,8 @@ private: \param lpComboBox */ void fillFontSize(QComboBox* lpComboBox); + + void enablePrintTitle(bool enable); }; #endif // CPROPERTIESWINDOW_H diff --git a/main.cpp b/main.cpp index 80b9f8d..7084722 100644 --- a/main.cpp +++ b/main.cpp @@ -19,7 +19,7 @@ #include "csplashscreen.h" -//#define SHOW_SPLASH +#define SHOW_SPLASH int main(int argc, char *argv[])