implementation of file properties

This commit is contained in:
2018-06-29 13:31:41 +02:00
parent 74a798a42c
commit 770220e8a6
3 changed files with 19 additions and 1 deletions
+16
View File
@@ -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);
}
+2
View File
@@ -614,6 +614,8 @@ private:
\param lpComboBox
*/
void fillFontSize(QComboBox* lpComboBox);
void enablePrintTitle(bool enable);
};
#endif // CPROPERTIESWINDOW_H
+1 -1
View File
@@ -19,7 +19,7 @@
#include "csplashscreen.h"
//#define SHOW_SPLASH
#define SHOW_SPLASH
int main(int argc, char *argv[])