.
This commit is contained in:
@@ -2233,7 +2233,7 @@ HIDE_UNDOC_RELATIONS = YES
|
||||
# set to NO
|
||||
# The default value is: NO.
|
||||
|
||||
HAVE_DOT = NO
|
||||
HAVE_DOT = YES
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
@@ -2350,7 +2350,7 @@ INCLUDED_BY_GRAPH = YES
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALL_GRAPH = NO
|
||||
CALL_GRAPH = YES
|
||||
|
||||
# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
|
||||
# dependency graph for every global function or class method.
|
||||
@@ -2362,7 +2362,7 @@ CALL_GRAPH = NO
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
CALLER_GRAPH = NO
|
||||
CALLER_GRAPH = YES
|
||||
|
||||
# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
|
||||
# hierarchy of all classes instead of a textual one.
|
||||
@@ -2411,7 +2411,7 @@ INTERACTIVE_SVG = NO
|
||||
# found. If left blank, it is assumed the dot tool can be found in the path.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_PATH =
|
||||
DOT_PATH = ../../../PortableApps/Graphviz/bin
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the \dotfile
|
||||
|
||||
+32
-13
@@ -6,8 +6,6 @@
|
||||
#include "cchapterwindow.h"
|
||||
#include "ui_cchapterwindow.h"
|
||||
|
||||
#include "cmainwindow.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
@@ -16,6 +14,7 @@
|
||||
cChapterWindow::cChapterWindow(QWidget *parent) :
|
||||
cMDISubWindow(parent),
|
||||
ui(new Ui::cChapterWindow),
|
||||
m_lpMainWindow((cMainWindow*)parent),
|
||||
m_lpChapter(0),
|
||||
m_lpSceneList(0)
|
||||
{
|
||||
@@ -24,22 +23,26 @@ cChapterWindow::cChapterWindow(QWidget *parent) :
|
||||
m_lpSceneModel = new QStandardItemModel(0, 1);
|
||||
ui->m_lpSceneList->setModel(m_lpSceneModel);
|
||||
|
||||
connect(ui->m_lpSceneList, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onSceneDoubleClicked(QModelIndex)));
|
||||
connect(ui->m_lpSceneList, &cTreeView::doubleClicked, this, &cChapterWindow::onSceneDoubleClicked);
|
||||
|
||||
connect(ui->m_lpName, SIGNAL(gotFocus(cLineEdit*)), (cMainWindow*)parent, SLOT(onLineEditGotFocus(cLineEdit*)));
|
||||
connect(ui->m_lpName, SIGNAL(lostFocus(cLineEdit*)), (cMainWindow*)parent, SLOT(onLineEditLostFocus(cLineEdit*)));
|
||||
connect(ui->m_lpName, &cLineEdit::gotFocus, m_lpMainWindow, &cMainWindow::onLineEditGotFocus);
|
||||
connect(ui->m_lpName, &cLineEdit::lostFocus, m_lpMainWindow, &cMainWindow::onLineEditLostFocus);
|
||||
|
||||
connect(ui->m_lpPart, SIGNAL(gotFocus(cLineEdit*)), (cMainWindow*)parent, SLOT(onLineEditGotFocus(cLineEdit*)));
|
||||
connect(ui->m_lpPart, SIGNAL(lostFocus(cLineEdit*)), (cMainWindow*)parent, SLOT(onLineEditLostFocus(cLineEdit*)));
|
||||
connect(ui->m_lpPart, &cLineEdit::gotFocus, m_lpMainWindow, &cMainWindow::onLineEditGotFocus);
|
||||
connect(ui->m_lpPart, &cLineEdit::lostFocus, m_lpMainWindow, &cMainWindow::onLineEditLostFocus);
|
||||
|
||||
connect(ui->m_lpSceneList, SIGNAL(gotFocus(cTreeView*)), (cMainWindow*)parent, SLOT(onTreeViewGotFocus(cTreeView*)));
|
||||
connect(ui->m_lpSceneList, SIGNAL(lostFocus(cTreeView*)), (cMainWindow*)parent, SLOT(onTreeViewLostFocus(cTreeView*)));
|
||||
connect(ui->m_lpSceneList, &cTreeView::gotFocus, m_lpMainWindow, &cMainWindow::onTreeViewGotFocus);
|
||||
connect(ui->m_lpSceneList, &cTreeView::lostFocus, m_lpMainWindow, &cMainWindow::onTreeViewLostFocus);
|
||||
|
||||
connect(ui->m_lpDescription, SIGNAL(gotFocus(cTextEdit*)), (cMainWindow*)parent, SLOT(onTextEditGotFocus(cTextEdit*)));
|
||||
connect(ui->m_lpDescription, SIGNAL(lostFocus(cTextEdit*)), (cMainWindow*)parent, SLOT(onTextEditLostFocus(cTextEdit*)));
|
||||
connect(ui->m_lpDescription, &cTextEdit::gotFocus, m_lpMainWindow, &cMainWindow::onTextEditGotFocus);
|
||||
connect(ui->m_lpDescription, &cTextEdit::lostFocus, m_lpMainWindow, &cMainWindow::onTextEditLostFocus);
|
||||
|
||||
connect(ui->m_lpText, SIGNAL(gotFocus(cTextEdit*)), (cMainWindow*)parent, SLOT(onTextEditGotFocus(cTextEdit*)));
|
||||
connect(ui->m_lpText, SIGNAL(lostFocus(cTextEdit*)), (cMainWindow*)parent, SLOT(onTextEditLostFocus(cTextEdit*)));
|
||||
connect(ui->m_lpText, &cTextEdit::gotFocus, m_lpMainWindow, &cMainWindow::onTextEditGotFocus);
|
||||
connect(ui->m_lpText, &cTextEdit::lostFocus, m_lpMainWindow, &cMainWindow::onTextEditLostFocus);
|
||||
|
||||
connect(ui->m_lpName, &cLineEdit::textChanged, this, &cChapterWindow::onNameChanged);
|
||||
connect(ui->m_lpDescription, &cTextEdit::textChanged, this, &cChapterWindow::onDescriptionChanged);
|
||||
connect(ui->m_lpText, &cTextEdit::textChanged, this, &cChapterWindow::onTextChanged);
|
||||
}
|
||||
|
||||
cChapterWindow::~cChapterWindow()
|
||||
@@ -88,3 +91,19 @@ void cChapterWindow::onSceneDoubleClicked(const QModelIndex& index)
|
||||
if(lpScene)
|
||||
showSceneWindow(lpScene);
|
||||
}
|
||||
|
||||
void cChapterWindow::onNameChanged(const QString& szName)
|
||||
{
|
||||
m_lpChapter->setName(szName);
|
||||
m_lpMainWindow->somethingChanged();
|
||||
}
|
||||
|
||||
void cChapterWindow::onDescriptionChanged()
|
||||
{
|
||||
m_lpMainWindow->somethingChanged();
|
||||
}
|
||||
|
||||
void cChapterWindow::onTextChanged()
|
||||
{
|
||||
m_lpMainWindow->somethingChanged();
|
||||
}
|
||||
|
||||
+12
-11
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cchapterwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHAPTERWINDOW_H
|
||||
#define CCHAPTERWINDOW_H
|
||||
|
||||
@@ -13,6 +8,8 @@
|
||||
|
||||
#include "cmdisubwindow.h"
|
||||
|
||||
#include "cmainwindow.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
@@ -52,14 +49,14 @@ public:
|
||||
\param lpChapter
|
||||
\param lpSceneList
|
||||
*/
|
||||
void setChapter(cChapter* lpChapter, cSceneList* lpSceneList);
|
||||
void setChapter(cChapter* lpChapter, cSceneList* lpSceneList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn chapter
|
||||
\return cChapter
|
||||
*/
|
||||
cChapter* chapter();
|
||||
cChapter* chapter();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
@@ -70,6 +67,9 @@ private slots:
|
||||
*/
|
||||
void onSceneDoubleClicked(const QModelIndex& index);
|
||||
|
||||
void onNameChanged(const QString& szName);
|
||||
void onDescriptionChanged();
|
||||
void onTextChanged();
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
@@ -80,10 +80,11 @@ signals:
|
||||
void showSceneWindow(cScene* lpScene);
|
||||
|
||||
private:
|
||||
Ui::cChapterWindow *ui; /*!< TODO: describe */
|
||||
cChapter* m_lpChapter; /*!< TODO: describe */
|
||||
cSceneList* m_lpSceneList; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpSceneModel; /*!< TODO: describe */
|
||||
Ui::cChapterWindow* ui; /*!< TODO: describe */
|
||||
cMainWindow* m_lpMainWindow; /*!< TODO: describe */
|
||||
cChapter* m_lpChapter; /*!< TODO: describe */
|
||||
cSceneList* m_lpSceneList; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpSceneModel; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CCHAPTERWINDOW_H
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file ccharacterwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHARACTERWINDOW_H
|
||||
#define CCHARACTERWINDOW_H
|
||||
|
||||
|
||||
+49
-3
@@ -31,7 +31,11 @@
|
||||
|
||||
#include <QToolBar>
|
||||
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlError>
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
|
||||
|
||||
cMainWindow::cMainWindow(QWidget *parent) :
|
||||
@@ -76,6 +80,15 @@ cMainWindow::~cMainWindow()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cMainWindow::somethingChanged()
|
||||
{
|
||||
if(!m_bSomethingChanged)
|
||||
{
|
||||
m_bSomethingChanged = true;
|
||||
updateWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
QAction* cMainWindow::actionAlignLeft()
|
||||
{
|
||||
return(m_lpActionAlignLeft);
|
||||
@@ -572,11 +585,16 @@ void cMainWindow::updateWindowTitle()
|
||||
|
||||
QString szTitle = m_lpStoryBook->title();
|
||||
QString szAuthor = m_lpStoryBook->author();
|
||||
|
||||
QString szWindowTitle;
|
||||
if(szAuthor.isEmpty())
|
||||
setWindowTitle(QString("\"%1\" - qtStoryWriter").arg(szTitle));
|
||||
szWindowTitle = QString("\"%1\" - qtStoryWriter").arg(szTitle);
|
||||
else
|
||||
setWindowTitle(QString("\"%1\" by %2 - qtStoryWriter").arg(szTitle).arg(szAuthor));
|
||||
szWindowTitle = QString("\"%1\" by %2 - qtStoryWriter").arg(szTitle).arg(szAuthor);
|
||||
|
||||
if(m_bSomethingChanged)
|
||||
szWindowTitle.append(" *");
|
||||
|
||||
setWindowTitle(szWindowTitle);
|
||||
}
|
||||
|
||||
void cMainWindow::onTextEditGotFocus(cTextEdit* lpTextEdit)
|
||||
@@ -1178,6 +1196,34 @@ void cMainWindow::onAlignmentChanged(const Qt::Alignment &alignment)
|
||||
|
||||
void cMainWindow::onAddPart()
|
||||
{
|
||||
bool bOK;
|
||||
QString szPartName = "";
|
||||
|
||||
for(;;)
|
||||
{
|
||||
szPartName = QInputDialog::getText(this, tr("New Part"), tr("Name:"), QLineEdit::Normal, "", &bOK);
|
||||
if(!bOK)
|
||||
return;
|
||||
|
||||
if(szPartName.isEmpty())
|
||||
{
|
||||
QMessageBox::critical(this, tr("New Part"), tr("Part Name is empty."));
|
||||
bOK = false;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if(bOK && !szPartName.isEmpty())
|
||||
{
|
||||
if(!m_lpStoryBook->addPart(szPartName))
|
||||
{
|
||||
QMessageBox::critical(this, tr("New Part"), tr("Part could not be created."));
|
||||
return;
|
||||
}
|
||||
|
||||
m_lpStoryBook->fillOutlineList(ui->m_lpOutlineList);
|
||||
}
|
||||
}
|
||||
|
||||
void cMainWindow::onEditPart()
|
||||
|
||||
+117
-1
@@ -61,6 +61,13 @@ public:
|
||||
*/
|
||||
~cMainWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn somethingChanged
|
||||
*/
|
||||
void somethingChanged();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
@@ -97,7 +104,7 @@ public:
|
||||
*/
|
||||
QAction* actionAlignJustify();
|
||||
|
||||
private slots:
|
||||
public slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
@@ -225,6 +232,7 @@ private slots:
|
||||
*/
|
||||
void onComboBoxLostFocus(cComboBox* lpComboBox);
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
@@ -451,32 +459,139 @@ private slots:
|
||||
*/
|
||||
void onAlignmentChanged(const Qt::Alignment& alignment);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddPart
|
||||
*/
|
||||
void onAddPart();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditPart
|
||||
*/
|
||||
void onEditPart();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeletePart
|
||||
*/
|
||||
void onDeletePart();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddChapter
|
||||
*/
|
||||
void onAddChapter();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditChapter
|
||||
*/
|
||||
void onEditChapter();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeleteChapter
|
||||
*/
|
||||
void onDeleteChapter();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddScene
|
||||
*/
|
||||
void onAddScene();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditScene
|
||||
*/
|
||||
void onEditScene();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeleteScene
|
||||
*/
|
||||
void onDeleteScene();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddCharacter
|
||||
*/
|
||||
void onAddCharacter();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditCharacter
|
||||
*/
|
||||
void onEditCharacter();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeleteCharacter
|
||||
*/
|
||||
void onDeleteCharacter();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddPlace
|
||||
*/
|
||||
void onAddPlace();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditPlace
|
||||
*/
|
||||
void onEditPlace();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeletePlace
|
||||
*/
|
||||
void onDeletePlace();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddObject
|
||||
*/
|
||||
void onAddObject();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditObject
|
||||
*/
|
||||
void onEditObject();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeleteObject
|
||||
*/
|
||||
void onDeleteObject();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAddRecherche
|
||||
*/
|
||||
void onAddRecherche();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onEditRecherche
|
||||
*/
|
||||
void onEditRecherche();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDeleteRecherche
|
||||
*/
|
||||
void onDeleteRecherche();
|
||||
|
||||
private:
|
||||
@@ -487,6 +602,7 @@ private:
|
||||
QStandardItemModel* m_lpObjectModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpRechercheModel; /*!< TODO: describe */
|
||||
bool m_bUpdatingTab; /*!< TODO: describe */
|
||||
bool m_bSomethingChanged; /*!< TODO: describe */
|
||||
cStoryBook* m_lpStoryBook; /*!< TODO: describe */
|
||||
|
||||
QList<QWidget*> m_focusException; /*!< TODO: describe */
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cobjectwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef COBJECTWINDOW_H
|
||||
#define COBJECTWINDOW_H
|
||||
|
||||
|
||||
@@ -86,6 +86,9 @@ cPart* cPartList::add(const qint32& iID)
|
||||
|
||||
cPart* cPartList::find(const qint32& iID)
|
||||
{
|
||||
if(iID == -1)
|
||||
return(0);
|
||||
|
||||
for(int x = 0;x < count();x++)
|
||||
{
|
||||
if(at(x)->id() == iID)
|
||||
|
||||
+2
-7
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cpartwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPARTWINDOW_H
|
||||
#define CPARTWINDOW_H
|
||||
|
||||
@@ -73,8 +68,8 @@ signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showPartWindow
|
||||
\param lpPart
|
||||
\fn showChapterWindow
|
||||
\param lpChapter
|
||||
*/
|
||||
void showChapterWindow(cChapter* lpChapter);
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cplacewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPLACEWINDOW_H
|
||||
#define CPLACEWINDOW_H
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file crecherchewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CRECHERCHEWINDOW_H
|
||||
#define CRECHERCHEWINDOW_H
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cscenewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CSCENEWINDOW_H
|
||||
#define CSCENEWINDOW_H
|
||||
|
||||
|
||||
+9
-1
@@ -410,6 +410,13 @@ cSceneList* cStoryBook::sceneList()
|
||||
return(&m_sceneList);
|
||||
}
|
||||
|
||||
bool cStoryBook::addPart(const QString& szPartName)
|
||||
{
|
||||
cPart* lpPart = m_partList.add(-1);
|
||||
lpPart->setName(szPartName);
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cStoryBook::fillOutlineList(QTreeView* lpView)
|
||||
{
|
||||
QMap<qint32, QStandardItem*> part;
|
||||
@@ -436,7 +443,8 @@ bool cStoryBook::fillOutlineList(QTreeView* lpView)
|
||||
lpItem->setData(QVariant::fromValue(lpPart));
|
||||
lpItem->setFont(fontPart);
|
||||
lpItem->setBackground(QBrush(background));
|
||||
lpItem->setToolTip(lpPart->description()->toPlainText());
|
||||
if(lpPart->description())
|
||||
lpItem->setToolTip(lpPart->description()->toPlainText());
|
||||
part.insert(lpPart->id(), lpItem);
|
||||
lpModel->appendRow(lpItem);
|
||||
|
||||
|
||||
@@ -135,6 +135,15 @@ public:
|
||||
\return cSceneList
|
||||
*/
|
||||
cSceneList* sceneList();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addPart
|
||||
\param szPartName
|
||||
\return bool
|
||||
*/
|
||||
bool addPart(const QString& szPartName);
|
||||
private:
|
||||
QString m_szProject; /*!< TODO: describe */
|
||||
bool m_bIsOpen; /*!< TODO: describe */
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*!
|
||||
\file cwidget.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CWIDGET_H
|
||||
#define CWIDGET_H
|
||||
|
||||
@@ -40,7 +35,7 @@ public:
|
||||
TYPE_chapter = 2,
|
||||
TYPE_scene = 3,
|
||||
TYPE_character = 4,
|
||||
TYPE_object = 5,
|
||||
TYPE_object = 5, /*!< TODO: describe */
|
||||
TYPE_place = 6,
|
||||
TYPE_recherche = 7,
|
||||
};
|
||||
@@ -124,7 +119,6 @@ public:
|
||||
\return QMdiSubWindow
|
||||
*/
|
||||
QMdiSubWindow* window();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
|
||||
Reference in New Issue
Block a user