From 0e1e0f4e2864154fed701c0c371b37f6c3664549 Mon Sep 17 00:00:00 2001 From: Herwig Birke Date: Thu, 28 Jun 2018 17:45:52 +0200 Subject: [PATCH] implementation of file properties --- cfontcombobox.cpp | 20 + cfontcombobox.h | 27 ++ cmainwindow.cpp | 11 +- cmainwindow.h | 15 + cpropertieswindow.cpp | 878 +++++++++++++++++++++++++++++++++++++++--- cpropertieswindow.h | 81 +++- cpropertieswindow.ui | 165 ++++---- storyWriter.pro | 6 +- 8 files changed, 1082 insertions(+), 121 deletions(-) create mode 100644 cfontcombobox.cpp create mode 100644 cfontcombobox.h diff --git a/cfontcombobox.cpp b/cfontcombobox.cpp new file mode 100644 index 0000000..1fb8cc0 --- /dev/null +++ b/cfontcombobox.cpp @@ -0,0 +1,20 @@ +#include "cfontcombobox.h" + + +cFontComboBox::cFontComboBox(QWidget* parent) : + QFontComboBox(parent) +{ + +} + +void cFontComboBox::focusInEvent(QFocusEvent* event) +{ + gotFocus(this); + QComboBox::focusInEvent(event); +} + +void cFontComboBox::focusOutEvent(QFocusEvent* event) +{ + lostFocus(this); + QComboBox::focusOutEvent(event); +} diff --git a/cfontcombobox.h b/cfontcombobox.h new file mode 100644 index 0000000..ab01dc3 --- /dev/null +++ b/cfontcombobox.h @@ -0,0 +1,27 @@ +#ifndef CFONTCOMBOBOX_H +#define CFONTCOMBOBOX_H + + +#include +#include + + +class cFontComboBox : public QFontComboBox +{ + Q_OBJECT + +public: + cFontComboBox(QWidget* parent = Q_NULLPTR); + +signals: + void gotFocus(cFontComboBox* lpComboBox); + void lostFocus(cFontComboBox* lpComboBox); + +protected: + void focusInEvent(QFocusEvent *event); + void focusOutEvent(QFocusEvent *event); +}; + +Q_DECLARE_METATYPE(cFontComboBox*) + +#endif // CFONTCOMBOBOX_H diff --git a/cmainwindow.cpp b/cmainwindow.cpp index c14d99c..d681079 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -939,6 +939,15 @@ void cMainWindow::onComboBoxLostFocus(cComboBox* /*lpComboBox*/) { } +void cMainWindow::onFontComboBoxGotFocus(cFontComboBox* /*lpComboBox*/) +{ + disableTextEdit(); +} + +void cMainWindow::onFontComboBoxLostFocus(cFontComboBox* /*lpComboBox*/) +{ +} + void cMainWindow::onMainTabCurrentChanged(int /*index*/) { if(m_bUpdatingTab) @@ -1073,7 +1082,7 @@ void cMainWindow::onShowPropertiesWindow() } cPropertiesWindow* lpPropertiesWindow = new cPropertiesWindow(this); - lpPropertiesWindow->setBook(m_lpStoryBook->book()); + lpPropertiesWindow->setBook(m_lpStoryBook); cWidget* lpWidget1 = new cWidget(lpPropertiesWindow); lpWidget1->setWindow(ui->m_lpMdiArea->addSubWindow(lpPropertiesWindow)); ui->m_lpMainTab->addTab((QWidget*)lpWidget1, lpPropertiesWindow->windowTitle()); diff --git a/cmainwindow.h b/cmainwindow.h index 761dbb3..40f4584 100644 --- a/cmainwindow.h +++ b/cmainwindow.h @@ -18,6 +18,7 @@ #include "cdatetimeedit.h" #include "ccombobox.h" #include "coptionsdialog.h" +#include "cfontcombobox.h" #include "csplashscreen.h" @@ -243,6 +244,20 @@ public slots: \param lpComboBox */ void onComboBoxLostFocus(cComboBox* lpComboBox); + /*! + \brief + + \fn onFontComboBoxGotFocus + \param lpComboBox + */ + void onFontComboBoxGotFocus(cFontComboBox* lpComboBox); + /*! + \brief + + \fn onFontComboBoxLostFocus + \param lpComboBox + */ + void onFontComboBoxLostFocus(cFontComboBox* lpComboBox); private slots: /*! \brief diff --git a/cpropertieswindow.cpp b/cpropertieswindow.cpp index 96d7974..01984b9 100644 --- a/cpropertieswindow.cpp +++ b/cpropertieswindow.cpp @@ -10,7 +10,7 @@ cPropertiesWindow::cPropertiesWindow(QWidget *parent) : cMDISubWindow(parent), ui(new Ui::cPropertiesWindow), m_lpMainWindow((cMainWindow*)parent), - m_lpBook(0) + m_lpStoryBook(0) { ui->setupUi(this); ui->m_lpTab->setCurrentIndex(0); @@ -22,29 +22,239 @@ cPropertiesWindow::cPropertiesWindow(QWidget *parent) : fillFontSize(ui->m_lpSubtitleFontSize); fillFontSize(ui->m_lpTitleFontSize); - connect(ui->m_lpTitle, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); - connect(ui->m_lpTitle, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); + connect(ui->m_lpTitle, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); + connect(ui->m_lpTitle, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); - connect(ui->m_lpSubTitle, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); - connect(ui->m_lpSubTitle, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); + connect(ui->m_lpSubTitle, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); + connect(ui->m_lpSubTitle, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); - connect(ui->m_lpAuthor, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); - connect(ui->m_lpAuthor, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); + connect(ui->m_lpAuthor, &cLineEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onLineEditGotFocus); + connect(ui->m_lpAuthor, &cLineEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onLineEditLostFocus); - connect(ui->m_lpStartedAt, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); - connect(ui->m_lpStartedAt, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); + connect(ui->m_lpStartedAt, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); + connect(ui->m_lpStartedAt, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); - connect(ui->m_lpFinishedAt, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); - connect(ui->m_lpFinishedAt, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); + connect(ui->m_lpFinishedAt, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); + connect(ui->m_lpFinishedAt, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); - connect(ui->m_lpTargetDate, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); - connect(ui->m_lpTargetDate, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); + connect(ui->m_lpTargetDate, &cDateTimeEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditGotFocus); + connect(ui->m_lpTargetDate, &cDateTimeEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onDateTimeEditLostFocus); - connect(ui->m_lpShortDescription, &cTextEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onTextEditGotFocus); - connect(ui->m_lpShortDescription, &cTextEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onTextEditLostFocus); + connect(ui->m_lpShortDescription, &cTextEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onTextEditGotFocus); + connect(ui->m_lpShortDescription, &cTextEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onTextEditLostFocus); - connect(ui->m_lpDescription, &cTextEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onTextEditGotFocus); - connect(ui->m_lpDescription, &cTextEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onTextEditLostFocus); + connect(ui->m_lpDescription, &cTextEdit::gotFocus, (cMainWindow*)parent, &cMainWindow::onTextEditGotFocus); + connect(ui->m_lpDescription, &cTextEdit::lostFocus, (cMainWindow*)parent, &cMainWindow::onTextEditLostFocus); + + connect(ui->m_lpPrintTitle, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintTitle, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpTitleFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpTitleFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpTitleFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpTitleFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpTitleBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpTitleBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpTitleItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpTitleItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpTitleUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpTitleUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpTitleLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpTitleLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpTitleCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpTitleCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpTitleRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpTitleRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintSubtitle, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintSubtitle, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSubtitleFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpSubtitleFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpSubtitleFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpSubtitleFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpSubtitleBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSubtitleBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSubtitleItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSubtitleItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSubtitleUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSubtitleUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSubtitleLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSubtitleLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpSubtitleCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSubtitleCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpSubtitleRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSubtitleRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintShortDescription, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintShortDescription, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintDescription, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintDescription, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintAuthor, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintAuthor, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpAuthorFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpAuthorFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpAuthorFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpAuthorFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpAuthorBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpAuthorBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpAuthorItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpAuthorItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpAuthorUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpAuthorUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpAuthorLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpAuthorLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpAuthorCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpAuthorCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpAuthorRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpAuthorRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintPartName, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintPartName, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPartNameFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpPartNameFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpPartNameFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpPartNameFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpPartNameBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPartNameBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPartNameItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPartNameItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPartNameUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPartNameUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPartNameLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpPartNameLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPartNameCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpPartNameCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPartNameRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpPartNameRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintPartDescription, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintPartDescription, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintPartText, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintPartText, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintChapterName, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintChapterName, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpChapterNameFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpChapterNameFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpChapterNameFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpChapterNameFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpChapterNameBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpChapterNameBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpChapterNameItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpChapterNameItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpChapterNameUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpChapterNameUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpChapterNameLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpChapterNameLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpChapterNameCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpChapterNameCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpChapterNameRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpChapterNameRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintChapterDescription, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintChapterDescription, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintChapterText, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintChapterText, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintSceneName, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintSceneName, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSceneNameFont, &cFontComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxGotFocus); + connect(ui->m_lpSceneNameFont, &cFontComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onFontComboBoxLostFocus); + + connect(ui->m_lpSceneNameFontSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpSceneNameFontSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpSceneNameBold, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSceneNameBold, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSceneNameItalic, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSceneNameItalic, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSceneNameUnderline, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpSceneNameUnderline, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpSceneNameLeft, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSceneNameLeft, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpSceneNameCenter, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSceneNameCenter, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpSceneNameRight, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpSceneNameRight, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpPrintSceneDescription, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintSceneDescription, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPrintSceneText, &cCheckBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxGotFocus); + connect(ui->m_lpPrintSceneText, &cCheckBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onCheckBoxLostFocus); + + connect(ui->m_lpPaperSize, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpPaperSize, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpOrientationPortrait, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpOrientationPortrait, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpOrientationLandscape, &cRadioButton::gotFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonGotFocus); + connect(ui->m_lpOrientationLandscape, &cRadioButton::lostFocus, (cMainWindow*)parent, &cMainWindow::onRadioButtonLostFocus); + + connect(ui->m_lpUnit, &cComboBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxGotFocus); + connect(ui->m_lpUnit, &cComboBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onComboBoxLostFocus); + + connect(ui->m_lpMarginLeft, &cDoubleSpinBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxGotFocus); + connect(ui->m_lpMarginLeft, &cDoubleSpinBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxLostFocus); + + connect(ui->m_lpMarginRight, &cDoubleSpinBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxGotFocus); + connect(ui->m_lpMarginRight, &cDoubleSpinBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxLostFocus); + + connect(ui->m_lpMarginTop, &cDoubleSpinBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxGotFocus); + connect(ui->m_lpMarginTop, &cDoubleSpinBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxLostFocus); + + connect(ui->m_lpMarginBottom, &cDoubleSpinBox::gotFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxGotFocus); + connect(ui->m_lpMarginBottom, &cDoubleSpinBox::lostFocus, (cMainWindow*)parent, &cMainWindow::onDoubleSpinBoxLostFocus); } cPropertiesWindow::~cPropertiesWindow() @@ -52,32 +262,174 @@ cPropertiesWindow::~cPropertiesWindow() delete ui; } -void cPropertiesWindow::setBook(cBook* lpBook) +void cPropertiesWindow::setBook(cStoryBook *lpStoryBook) { - m_lpBook = lpBook; + m_lpStoryBook = lpStoryBook; - ui->m_lpTitle->setText(lpBook->title()); - ui->m_lpSubTitle->setText(lpBook->subTitle()); - ui->m_lpAuthor->setText(lpBook->author()); - ui->m_lpStartedAt->setDateTime(lpBook->startedAt()); - ui->m_lpFinishedAt->setDateTime(lpBook->finishedAt()); - ui->m_lpTargetDate->setDateTime(lpBook->targetDate()); - ui->m_lpShortDescription->setDocument(lpBook->shortDescription()); - ui->m_lpDescription->setDocument(lpBook->description()); + ui->m_lpTitle->setText(lpStoryBook->book()->title()); + ui->m_lpSubTitle->setText(lpStoryBook->book()->subTitle()); + ui->m_lpAuthor->setText(lpStoryBook->book()->author()); + ui->m_lpStartedAt->setDateTime(lpStoryBook->book()->startedAt()); + ui->m_lpFinishedAt->setDateTime(lpStoryBook->book()->finishedAt()); + ui->m_lpTargetDate->setDateTime(lpStoryBook->book()->targetDate()); + ui->m_lpShortDescription->setDocument(lpStoryBook->book()->shortDescription()); + ui->m_lpDescription->setDocument(lpStoryBook->book()->description()); - 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); - connect(ui->m_lpStartedAt, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onStartedAtChanged); - connect(ui->m_lpFinishedAt, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onFinishedAtChanged); - connect(ui->m_lpTargetDate, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onTargetDateChanged); - connect(ui->m_lpShortDescription, &cTextEdit::textChanged, this, &cPropertiesWindow::onShortDescriptionChanged); - connect(ui->m_lpDescription, &cTextEdit::textChanged, this, &cPropertiesWindow::onDescriptionChanged); + ui->m_lpPrintTitle->setChecked(lpStoryBook->printTitle()); + ui->m_lpTitleFont->setCurrentText(lpStoryBook->titleFont()); + ui->m_lpTitleFontSize->setCurrentText(QString("%1").arg(lpStoryBook->titleFontSize())); + ui->m_lpTitleBold->setChecked(lpStoryBook->titleBold()); + ui->m_lpTitleItalic->setChecked(lpStoryBook->titleItalic()); + ui->m_lpTitleUnderline->setChecked(lpStoryBook->titleUnderline()); + ui->m_lpTitleLeft->setChecked(lpStoryBook->titleAlign() == ALIGN_left); + ui->m_lpTitleCenter->setChecked(lpStoryBook->titleAlign() == ALIGN_center); + ui->m_lpTitleRight->setChecked(lpStoryBook->titleAlign() == ALIGN_right); + ui->m_lpPrintSubtitle->setChecked(lpStoryBook->printSubTitle()); + ui->m_lpSubtitleFont->setCurrentText(lpStoryBook->subtitleFont()); + ui->m_lpSubtitleFontSize->setCurrentText(QString("%1").arg(lpStoryBook->subtitleFontSize())); + ui->m_lpSubtitleBold->setChecked(lpStoryBook->subtitleBold()); + ui->m_lpSubtitleItalic->setChecked(lpStoryBook->subtitleItalic()); + ui->m_lpSubtitleUnderline->setChecked(lpStoryBook->subtitleUnderline()); + ui->m_lpSubtitleLeft->setChecked(lpStoryBook->subtitleAlign() == ALIGN_left); + ui->m_lpSubtitleCenter->setChecked(lpStoryBook->subtitleAlign() == ALIGN_center); + ui->m_lpSubtitleRight->setChecked(lpStoryBook->subtitleAlign() == ALIGN_right); + ui->m_lpPrintShortDescription->setChecked(lpStoryBook->printShortDescription()); + ui->m_lpPrintDescription->setChecked(lpStoryBook->printDescription()); + ui->m_lpPrintAuthor->setChecked(lpStoryBook->printAuthor()); + ui->m_lpAuthorFont->setCurrentText(lpStoryBook->authorFont()); + ui->m_lpAuthorFontSize->setCurrentText(QString("%1").arg(lpStoryBook->authorFontSize())); + ui->m_lpAuthorBold->setChecked(lpStoryBook->authorBold()); + ui->m_lpAuthorItalic->setChecked(lpStoryBook->authorItalic()); + ui->m_lpAuthorUnderline->setChecked(lpStoryBook->authorUnderline()); + ui->m_lpAuthorLeft->setChecked(lpStoryBook->authorAlign() == ALIGN_left); + ui->m_lpAuthorCenter->setChecked(lpStoryBook->authorAlign() == ALIGN_center); + ui->m_lpAuthorRight->setChecked(lpStoryBook->authorAlign() == ALIGN_right); + ui->m_lpPrintPartName->setChecked(lpStoryBook->printPartName()); + ui->m_lpPartNameFont->setCurrentText(lpStoryBook->partFont()); + ui->m_lpPartNameFontSize->setCurrentText(QString("%1").arg(lpStoryBook->partFontSize())); + ui->m_lpPartNameBold->setChecked(lpStoryBook->partBold()); + ui->m_lpPartNameItalic->setChecked(lpStoryBook->partItalic()); + ui->m_lpPartNameUnderline->setChecked(lpStoryBook->partUnderline()); + ui->m_lpPartNameLeft->setChecked(lpStoryBook->partAlign() == ALIGN_left); + ui->m_lpPartNameCenter->setChecked(lpStoryBook->partAlign() == ALIGN_center); + ui->m_lpPartNameRight->setChecked(lpStoryBook->partAlign() == ALIGN_right); + ui->m_lpPrintPartDescription->setChecked(lpStoryBook->printPartDescription()); + ui->m_lpPrintPartText->setChecked(lpStoryBook->printPartText()); + ui->m_lpPrintChapterName->setChecked(lpStoryBook->printChapterName()); + ui->m_lpChapterNameFont->setCurrentText(lpStoryBook->chapterFont()); + ui->m_lpChapterNameFontSize->setCurrentText(QString("%1").arg(lpStoryBook->chapterFontSize())); + ui->m_lpChapterNameBold->setChecked(lpStoryBook->chapterBold()); + ui->m_lpChapterNameItalic->setChecked(lpStoryBook->chapterItalic()); + ui->m_lpChapterNameUnderline->setChecked(lpStoryBook->chapterUnderline()); + ui->m_lpChapterNameLeft->setChecked(lpStoryBook->chapterAlign() == ALIGN_left); + ui->m_lpChapterNameCenter->setChecked(lpStoryBook->chapterAlign() == ALIGN_center); + ui->m_lpChapterNameRight->setChecked(lpStoryBook->chapterAlign() == ALIGN_right); + ui->m_lpPrintChapterDescription->setChecked(lpStoryBook->printChapterDescription()); + ui->m_lpPrintChapterText->setChecked(lpStoryBook->printChapterText()); + ui->m_lpPrintSceneName->setChecked(lpStoryBook->printSceneName()); + ui->m_lpSceneNameFont->setCurrentText(lpStoryBook->sceneFont()); + ui->m_lpSceneNameFontSize->setCurrentText(QString("%1").arg(lpStoryBook->sceneFontSize())); + ui->m_lpSceneNameBold->setChecked(lpStoryBook->sceneBold()); + ui->m_lpSceneNameItalic->setChecked(lpStoryBook->sceneItalic()); + ui->m_lpSceneNameUnderline->setChecked(lpStoryBook->sceneUnderline()); + ui->m_lpSceneNameLeft->setChecked(lpStoryBook->sceneAlign() == ALIGN_left); + ui->m_lpSceneNameCenter->setChecked(lpStoryBook->sceneAlign() == ALIGN_center); + ui->m_lpSceneNameRight->setChecked(lpStoryBook->sceneAlign() == ALIGN_right); + ui->m_lpPrintSceneDescription->setChecked(lpStoryBook->printSceneDescription()); + ui->m_lpPrintSceneText->setChecked(lpStoryBook->printSceneText()); + ui->m_lpPaperSize->setCurrentText(lpStoryBook->paperSize()); + ui->m_lpOrientationPortrait->setChecked(lpStoryBook->paperOrientation() == ORIENTATION_portrait); + ui->m_lpOrientationLandscape->setChecked(lpStoryBook->paperOrientation() == ORIENTATION_landscape); + ui->m_lpUnit->setCurrentText(QString("%1").arg(lpStoryBook->unit())); + ui->m_lpMarginLeft->setValue(lpStoryBook->leftMargin()); + ui->m_lpMarginRight->setValue(lpStoryBook->rightMargin()); + ui->m_lpMarginTop->setValue(lpStoryBook->topMargin()); + ui->m_lpMarginBottom->setValue(lpStoryBook->bottomMargin()); + + 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); + connect(ui->m_lpStartedAt, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onStartedAtChanged); + connect(ui->m_lpFinishedAt, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onFinishedAtChanged); + connect(ui->m_lpTargetDate, &cDateTimeEdit::dateTimeChanged, this, &cPropertiesWindow::onTargetDateChanged); + connect(ui->m_lpShortDescription, &cTextEdit::textChanged, this, &cPropertiesWindow::onShortDescriptionChanged); + connect(ui->m_lpDescription, &cTextEdit::textChanged, this, &cPropertiesWindow::onDescriptionChanged); + + connect(ui->m_lpPrintTitle, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintTitleChanged); + connect(ui->m_lpTitleFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onTitleFontChanged); + connect(ui->m_lpTitleFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onTitleFontSizeChanged); + connect(ui->m_lpTitleBold, &cCheckBox::clicked, this, &cPropertiesWindow::onTitleBoldChanged); + connect(ui->m_lpTitleItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onTitleItalicChanged); + connect(ui->m_lpTitleUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onTitleUnderlineChanged); + connect(ui->m_lpTitleLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onTitleLeftChanged); + connect(ui->m_lpTitleCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onTitleCenterChanged); + connect(ui->m_lpTitleRight, &cRadioButton::clicked, this, &cPropertiesWindow::onTitleRightChanged); + connect(ui->m_lpPrintSubtitle, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintSubtitleChanged); + connect(ui->m_lpSubtitleFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onSubtitleFontChanged); + connect(ui->m_lpSubtitleFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onSubtitleFontSizeChanged); + connect(ui->m_lpSubtitleBold, &cCheckBox::clicked, this, &cPropertiesWindow::onSubtitleBoldChanged); + connect(ui->m_lpSubtitleItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onSubtitleItalicChanged); + connect(ui->m_lpSubtitleUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onSubtitleUnderlineChanged); + connect(ui->m_lpSubtitleLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onSubtitleLeftChanged); + connect(ui->m_lpSubtitleCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onSubtitleCenterChanged); + connect(ui->m_lpSubtitleRight, &cRadioButton::clicked, this, &cPropertiesWindow::onSubtitleRightChanged); + connect(ui->m_lpPrintShortDescription, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintShortDescriptionChanged); + connect(ui->m_lpPrintDescription, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintDescriptionChanged); + connect(ui->m_lpPrintAuthor, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintAuthorChanged); + connect(ui->m_lpAuthorFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onAuthorFontChanged); + connect(ui->m_lpAuthorFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onAuthorFontSizeChanged); + connect(ui->m_lpAuthorBold, &cCheckBox::clicked, this, &cPropertiesWindow::onAuthorBoldChanged); + connect(ui->m_lpAuthorItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onAuthorItalicChanged); + connect(ui->m_lpAuthorUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onAuthorUnderlineChanged); + connect(ui->m_lpAuthorLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onAuthorLeftChanged); + connect(ui->m_lpAuthorCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onAuthorCenterChanged); + connect(ui->m_lpAuthorRight, &cRadioButton::clicked, this, &cPropertiesWindow::onAuthorRightChanged); + connect(ui->m_lpPrintPartName, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintPartNameChanged); + connect(ui->m_lpPartNameFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onPartNameFontChanged); + connect(ui->m_lpPartNameFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onPartNameFontSizeChanged); + connect(ui->m_lpPartNameBold, &cCheckBox::clicked, this, &cPropertiesWindow::onPartNameBoldChanged); + connect(ui->m_lpPartNameItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onPartNameItalicChanged); + connect(ui->m_lpPartNameUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onPartNameUnderlineChanged); + connect(ui->m_lpPartNameLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onPartNameLeftChanged); + connect(ui->m_lpPartNameCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onPartNameCenterChanged); + connect(ui->m_lpPartNameRight, &cRadioButton::clicked, this, &cPropertiesWindow::onPartNameRightChanged); + connect(ui->m_lpPrintPartDescription, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintPartDescriptionChanged); + connect(ui->m_lpPrintPartText, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintPartTextChanged); + connect(ui->m_lpPrintChapterName, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintChapterNameChanged); + connect(ui->m_lpChapterNameFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onChapterNameFontChanged); + connect(ui->m_lpChapterNameFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onChapterNameFontSizeChanged); + connect(ui->m_lpChapterNameBold, &cCheckBox::clicked, this, &cPropertiesWindow::onChapterNameBoldChanged); + connect(ui->m_lpChapterNameItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onChapterNameItalicChanged); + connect(ui->m_lpChapterNameUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onChapterNameUnderlineChanged); + connect(ui->m_lpChapterNameLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onChapterNameLeftChanged); + connect(ui->m_lpChapterNameCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onChapterNameCenterChanged); + connect(ui->m_lpChapterNameRight, &cRadioButton::clicked, this, &cPropertiesWindow::onChapterNameRightChanged); + connect(ui->m_lpPrintChapterDescription, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintChapterDescriptionChanged); + connect(ui->m_lpPrintChapterText, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintChapterTextChanged); + connect(ui->m_lpPrintSceneName, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintSceneNameChanged); + connect(ui->m_lpSceneNameFont, &cFontComboBox::currentTextChanged, this, &cPropertiesWindow::onSceneNameFontChanged); + connect(ui->m_lpSceneNameFontSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onSceneNameFontSizeChanged); + connect(ui->m_lpSceneNameBold, &cCheckBox::clicked, this, &cPropertiesWindow::onSceneNameBoldChanged); + connect(ui->m_lpSceneNameItalic, &cCheckBox::clicked, this, &cPropertiesWindow::onSceneNameItalicChanged); + connect(ui->m_lpSceneNameUnderline, &cCheckBox::clicked, this, &cPropertiesWindow::onSceneNameUnderlineChanged); + connect(ui->m_lpSceneNameLeft, &cRadioButton::clicked, this, &cPropertiesWindow::onSceneNameLeftChanged); + connect(ui->m_lpSceneNameCenter, &cRadioButton::clicked, this, &cPropertiesWindow::onSceneNameCenterChanged); + connect(ui->m_lpSceneNameRight, &cRadioButton::clicked, this, &cPropertiesWindow::onSceneNameRightChanged); + connect(ui->m_lpPrintSceneDescription, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintSceneDescriptionChanged); + connect(ui->m_lpPrintSceneText, &cCheckBox::clicked, this, &cPropertiesWindow::onPrintSceneTextChanged); + connect(ui->m_lpPaperSize, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onPaperSizeChanged); + connect(ui->m_lpOrientationPortrait, &cRadioButton::clicked, this, &cPropertiesWindow::onOrientationPortraitChanged); + connect(ui->m_lpOrientationLandscape, &cRadioButton::clicked, this, &cPropertiesWindow::onOrientationLandscapeChanged); + connect(ui->m_lpUnit, &cComboBox::currentTextChanged, this, &cPropertiesWindow::onUnitChanged); + connect(ui->m_lpMarginLeft, QOverload::of(&cDoubleSpinBox::valueChanged), this, &cPropertiesWindow::onMarginLeftChanged); + connect(ui->m_lpMarginRight, QOverload::of(&cDoubleSpinBox::valueChanged), this, &cPropertiesWindow::onMarginRightChanged); + connect(ui->m_lpMarginTop, QOverload::of(&cDoubleSpinBox::valueChanged), this, &cPropertiesWindow::onMarginTopChanged); + connect(ui->m_lpMarginBottom, QOverload::of(&cDoubleSpinBox::valueChanged), this, &cPropertiesWindow::onMarginBottomChanged); } -cBook* cPropertiesWindow::book() +cStoryBook* cPropertiesWindow::book() { - return(m_lpBook); + return(m_lpStoryBook); } void cPropertiesWindow::retranslateUI() @@ -87,14 +439,14 @@ void cPropertiesWindow::retranslateUI() void cPropertiesWindow::onTitleChanged(const QString& szName) { - m_lpBook->setTitle(szName); + m_lpStoryBook->book()->setTitle(szName); m_lpMainWindow->somethingChanged(); m_lpMainWindow->updateWindowTitle(); } void cPropertiesWindow::onSubTitleChanged(const QString& szName) { - m_lpBook->setSubTitle(szName); + m_lpStoryBook->book()->setSubTitle(szName); m_lpMainWindow->somethingChanged(); } @@ -105,25 +457,25 @@ void cPropertiesWindow::onShortDescriptionChanged() void cPropertiesWindow::onAuthorChanged(const QString& szName) { - m_lpBook->setAuthor(szName); + m_lpStoryBook->book()->setAuthor(szName); m_lpMainWindow->somethingChanged(); } void cPropertiesWindow::onStartedAtChanged(const QDateTime& dateTime) { - m_lpBook->setStartedAt(dateTime); + m_lpStoryBook->book()->setStartedAt(dateTime); m_lpMainWindow->somethingChanged(); } void cPropertiesWindow::onFinishedAtChanged(const QDateTime& dateTime) { - m_lpBook->setFinishedAt(dateTime); + m_lpStoryBook->book()->setFinishedAt(dateTime); m_lpMainWindow->somethingChanged(); } void cPropertiesWindow::onTargetDateChanged(const QDateTime& dateTime) { - m_lpBook->setTargetDate(dateTime); + m_lpStoryBook->book()->setTargetDate(dateTime); m_lpMainWindow->somethingChanged(); } @@ -140,3 +492,443 @@ void cPropertiesWindow::fillFontSize(QComboBox* lpComboBox) foreach(int size, standardSizes) lpComboBox->addItem(QString::number(size)); } + +void cPropertiesWindow::onPrintTitleChanged(bool checked) +{ + m_lpStoryBook->setPrintTitle(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleFontChanged(const QString &text) +{ + m_lpStoryBook->setTitleFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setTitleFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleBoldChanged(bool checked) +{ + m_lpStoryBook->setTitleBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleItalicChanged(bool checked) +{ + m_lpStoryBook->setTitleItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleUnderlineChanged(bool checked) +{ + m_lpStoryBook->setTitleUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setTitleAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setTitleAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onTitleRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setTitleAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintSubtitleChanged(bool checked) +{ + m_lpStoryBook->setPrintSubTitle(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleFontChanged(const QString &text) +{ + m_lpStoryBook->setSubtitleFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setSubtitleFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleBoldChanged(bool checked) +{ + m_lpStoryBook->setSubtitleBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleItalicChanged(bool checked) +{ + m_lpStoryBook->setSubtitleItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleUnderlineChanged(bool checked) +{ + m_lpStoryBook->setSubtitleUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSubtitleAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSubtitleAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSubtitleRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSubtitleAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintShortDescriptionChanged(bool checked) +{ + m_lpStoryBook->setPrintShortDescription(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintDescriptionChanged(bool checked) +{ + m_lpStoryBook->setPrintDescription(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintAuthorChanged(bool checked) +{ + m_lpStoryBook->setPrintAuthor(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorFontChanged(const QString &text) +{ + m_lpStoryBook->setAuthorFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setAuthorFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorBoldChanged(bool checked) +{ + m_lpStoryBook->setAuthorBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorItalicChanged(bool checked) +{ + m_lpStoryBook->setAuthorItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorUnderlineChanged(bool checked) +{ + m_lpStoryBook->setAuthorUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setAuthorAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setAuthorAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onAuthorRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setAuthorAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintPartNameChanged(bool checked) +{ + m_lpStoryBook->setPrintPartName(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameFontChanged(const QString &text) +{ + m_lpStoryBook->setPartFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setPartFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameBoldChanged(bool checked) +{ + m_lpStoryBook->setPartBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameItalicChanged(bool checked) +{ + m_lpStoryBook->setPartItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameUnderlineChanged(bool checked) +{ + m_lpStoryBook->setPartUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setPartAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setPartAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPartNameRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setPartAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintPartDescriptionChanged(bool checked) +{ + m_lpStoryBook->setPrintPartDescription(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintPartTextChanged(bool checked) +{ + m_lpStoryBook->setPrintPartText(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintChapterNameChanged(bool checked) +{ + m_lpStoryBook->setPrintChapterName(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameFontChanged(const QString &text) +{ + m_lpStoryBook->setChapterFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setChapterFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameBoldChanged(bool checked) +{ + m_lpStoryBook->setChapterBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameItalicChanged(bool checked) +{ + m_lpStoryBook->setChapterItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameUnderlineChanged(bool checked) +{ + m_lpStoryBook->setChapterUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setChapterAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setChapterAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onChapterNameRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setChapterAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintChapterDescriptionChanged(bool checked) +{ + m_lpStoryBook->setPrintChapterDescription(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintChapterTextChanged(bool checked) +{ + m_lpStoryBook->setPrintChapterText(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintSceneNameChanged(bool checked) +{ + m_lpStoryBook->setPrintSceneName(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameFontChanged(const QString &text) +{ + m_lpStoryBook->setSceneFont(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameFontSizeChanged(const QString &text) +{ + m_lpStoryBook->setSceneFontSize(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameBoldChanged(bool checked) +{ + m_lpStoryBook->setSceneBold(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameItalicChanged(bool checked) +{ + m_lpStoryBook->setSceneItalic(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameUnderlineChanged(bool checked) +{ + m_lpStoryBook->setSceneUnderline(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameLeftChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSceneAlign(ALIGN_left); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameCenterChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSceneAlign(ALIGN_center); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onSceneNameRightChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setSceneAlign(ALIGN_right); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintSceneDescriptionChanged(bool checked) +{ + m_lpStoryBook->setPrintSceneDescription(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPrintSceneTextChanged(bool checked) +{ + m_lpStoryBook->setPrintSceneText(checked); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onPaperSizeChanged(const QString &text) +{ + m_lpStoryBook->setPaperSize(text); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onOrientationPortraitChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setPaperOrientation(ORIENTATION_portrait); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onOrientationLandscapeChanged(bool checked) +{ + if(checked) + m_lpStoryBook->setPaperOrientation(ORIENTATION_landscape); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onUnitChanged(const QString &text) +{ + m_lpStoryBook->setUnit(text.toInt()); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onMarginLeftChanged(double d) +{ + m_lpStoryBook->setLeftMargin(d); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onMarginRightChanged(double d) +{ + m_lpStoryBook->setRightMargin(d); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onMarginTopChanged(double d) +{ + m_lpStoryBook->setTopMargin(d); + m_lpMainWindow->somethingChanged(); +} + +void cPropertiesWindow::onMarginBottomChanged(double d) +{ + m_lpStoryBook->setBottomMargin(d); + m_lpMainWindow->somethingChanged(); +} diff --git a/cpropertieswindow.h b/cpropertieswindow.h index b6c2c09..1b2d477 100644 --- a/cpropertieswindow.h +++ b/cpropertieswindow.h @@ -2,7 +2,7 @@ #define CPROPERTIESWINDOW_H -#include "cbook.h" +#include "cstorybook.h" #include "cmdisubwindow.h" #include "cmainwindow.h" @@ -45,14 +45,14 @@ public: \fn setBook \param lpBook */ - void setBook(cBook* lpBook); + void setBook(cStoryBook* lpStoryBook); /*! \brief \fn book - \return cBook + \return cStoryBook */ - cBook* book(); + cStoryBook *book(); /*! \brief @@ -117,10 +117,81 @@ private slots: */ void onTargetDateChanged(const QDateTime& dateTime); + void onPrintTitleChanged(bool checked); + void onTitleFontChanged(const QString &text); + void onTitleFontSizeChanged(const QString &text); + void onTitleBoldChanged(bool checked); + void onTitleItalicChanged(bool checked); + void onTitleUnderlineChanged(bool checked); + void onTitleLeftChanged(bool checked); + void onTitleCenterChanged(bool checked); + void onTitleRightChanged(bool checked); + void onPrintSubtitleChanged(bool checked); + void onSubtitleFontChanged(const QString &text); + void onSubtitleFontSizeChanged(const QString &text); + void onSubtitleBoldChanged(bool checked); + void onSubtitleItalicChanged(bool checked); + void onSubtitleUnderlineChanged(bool checked); + void onSubtitleLeftChanged(bool checked); + void onSubtitleCenterChanged(bool checked); + void onSubtitleRightChanged(bool checked); + void onPrintShortDescriptionChanged(bool checked); + void onPrintDescriptionChanged(bool checked); + void onPrintAuthorChanged(bool checked); + void onAuthorFontChanged(const QString &text); + void onAuthorFontSizeChanged(const QString &text); + void onAuthorBoldChanged(bool checked); + void onAuthorItalicChanged(bool checked); + void onAuthorUnderlineChanged(bool checked); + void onAuthorLeftChanged(bool checked); + void onAuthorCenterChanged(bool checked); + void onAuthorRightChanged(bool checked); + void onPrintPartNameChanged(bool checked); + void onPartNameFontChanged(const QString &text); + void onPartNameFontSizeChanged(const QString &text); + void onPartNameBoldChanged(bool checked); + void onPartNameItalicChanged(bool checked); + void onPartNameUnderlineChanged(bool checked); + void onPartNameLeftChanged(bool checked); + void onPartNameCenterChanged(bool checked); + void onPartNameRightChanged(bool checked); + void onPrintPartDescriptionChanged(bool checked); + void onPrintPartTextChanged(bool checked); + void onPrintChapterNameChanged(bool checked); + void onChapterNameFontChanged(const QString &text); + void onChapterNameFontSizeChanged(const QString &text); + void onChapterNameBoldChanged(bool checked); + void onChapterNameItalicChanged(bool checked); + void onChapterNameUnderlineChanged(bool checked); + void onChapterNameLeftChanged(bool checked); + void onChapterNameCenterChanged(bool checked); + void onChapterNameRightChanged(bool checked); + void onPrintChapterDescriptionChanged(bool checked); + void onPrintChapterTextChanged(bool checked); + void onPrintSceneNameChanged(bool checked); + void onSceneNameFontChanged(const QString &text); + void onSceneNameFontSizeChanged(const QString &text); + void onSceneNameBoldChanged(bool checked); + void onSceneNameItalicChanged(bool checked); + void onSceneNameUnderlineChanged(bool checked); + void onSceneNameLeftChanged(bool checked); + void onSceneNameCenterChanged(bool checked); + void onSceneNameRightChanged(bool checked); + void onPrintSceneDescriptionChanged(bool checked); + void onPrintSceneTextChanged(bool checked); + void onPaperSizeChanged(const QString &text); + void onOrientationPortraitChanged(bool checked); + void onOrientationLandscapeChanged(bool checked); + void onUnitChanged(const QString &text); + void onMarginLeftChanged(double d); + void onMarginRightChanged(double d); + void onMarginTopChanged(double d); + void onMarginBottomChanged(double d); + private: Ui::cPropertiesWindow* ui; /*!< TODO: describe */ cMainWindow* m_lpMainWindow; /*!< TODO: describe */ - cBook* m_lpBook; /*!< TODO: describe */ + cStoryBook* m_lpStoryBook; /*!< TODO: describe */ /*! \brief diff --git a/cpropertieswindow.ui b/cpropertieswindow.ui index f0f2753..f0130bc 100644 --- a/cpropertieswindow.ui +++ b/cpropertieswindow.ui @@ -178,7 +178,7 @@ - + @@ -191,7 +191,7 @@ - + @@ -208,10 +208,10 @@ - + - + @@ -221,10 +221,10 @@ - + - + portrait @@ -234,7 +234,7 @@ - + landscape @@ -251,7 +251,7 @@ - + @@ -281,35 +281,35 @@ - + print description - + print text - + bold - + text - + bold @@ -323,62 +323,62 @@ - + underline - + - + underline - + description - + right - + italic - + - + print short description - + underline - + center @@ -388,59 +388,59 @@ - + underline - + italic - + left - + bold - + italic - + - + underline - + print description - + @@ -450,24 +450,24 @@ - + center - + italic - + - + right @@ -477,69 +477,69 @@ - + underline - + print name - + left - + - + left - + italic - + center - + print subtitle - + - + print name - + right @@ -549,14 +549,14 @@ - + right - + center @@ -566,21 +566,21 @@ - + print description - + print text - + right @@ -590,31 +590,31 @@ - + print author - + - + bold - + bold - + left @@ -624,7 +624,7 @@ - + @@ -634,38 +634,38 @@ - + bold - + name - + italic - + - + center - + left @@ -682,10 +682,10 @@ - + - + center @@ -695,14 +695,14 @@ - + right - + print title @@ -723,7 +723,7 @@ - + left @@ -733,7 +733,7 @@ - + @@ -783,6 +783,31 @@ QDateTimeEdit
cdatetimeedit.h
+ + cCheckBox + QCheckBox +
ccheckbox.h
+
+ + cFontComboBox + QFontComboBox +
cfontcombobox.h
+
+ + cComboBox + QComboBox +
ccombobox.h
+
+ + cRadioButton + QRadioButton +
cradiobutton.h
+
+ + cDoubleSpinBox + QDoubleSpinBox +
cdoublespinbox.h
+
m_lpTitle diff --git a/storyWriter.pro b/storyWriter.pro index cd9fa79..eeb97cc 100644 --- a/storyWriter.pro +++ b/storyWriter.pro @@ -89,7 +89,8 @@ SOURCES += \ csplashscreen.cpp \ cplaceselectdialog.cpp \ cobjectselectdialog.cpp \ - coptionsdialog.cpp + coptionsdialog.cpp \ + cfontcombobox.cpp HEADERS += \ cmainwindow.h \ @@ -130,7 +131,8 @@ HEADERS += \ csplashscreen.h \ cplaceselectdialog.h \ cobjectselectdialog.h \ - coptionsdialog.h + coptionsdialog.h \ + cfontcombobox.h FORMS += \ cmainwindow.ui \