added doxygen
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cbook.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cbook.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cbook.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CBOOK_H
|
||||
#define CBOOK_H
|
||||
|
||||
@@ -10,47 +15,167 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cBook cbook.h "cbook.h"
|
||||
*/
|
||||
class cBook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief constructor of cBook
|
||||
|
||||
\fn cBook
|
||||
\param szTitle title of the book
|
||||
\param parent parent object
|
||||
*/
|
||||
explicit cBook(const QString& szTitle = "", QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\return bool
|
||||
*/
|
||||
bool load();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setTitle
|
||||
\param szTitle
|
||||
*/
|
||||
void setTitle(const QString& szTitle);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn title
|
||||
\return QString
|
||||
*/
|
||||
QString title();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSubTitle
|
||||
\param szSubTitle
|
||||
*/
|
||||
void setSubTitle(const QString& szSubTitle);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn subTitle
|
||||
\return QString
|
||||
*/
|
||||
QString subTitle();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setShortDescription
|
||||
\param lpShortDescription
|
||||
*/
|
||||
void setShortDescription(cTextDocument* lpShortDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn shortDescription
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* shortDescription();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setAuthor
|
||||
\param szAuthor
|
||||
*/
|
||||
void setAuthor(const QString& szAuthor);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn author
|
||||
\return QString
|
||||
*/
|
||||
QString author();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setStartedAt
|
||||
\param startedAt
|
||||
*/
|
||||
void setStartedAt(const QDateTime& startedAt);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn startedAt
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime startedAt();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setFinishedAt
|
||||
\param finishedAt
|
||||
*/
|
||||
void setFinishedAt(const QDateTime& finishedAt);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn finishedAt
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime finishedAt();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setTargetDate
|
||||
\param targetDate
|
||||
*/
|
||||
void setTargetDate(const QDateTime& targetDate);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn targetDate
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime targetDate();
|
||||
private:
|
||||
QString m_szTitle;
|
||||
QString m_szSubtitle;
|
||||
cTextDocument* m_lpShortDescription;
|
||||
cTextDocument* m_lpDescription;
|
||||
QString m_szAuthor;
|
||||
QDateTime m_startedAt;
|
||||
QDateTime m_finishedAt;
|
||||
QDateTime m_targetDate;
|
||||
QString m_szTitle; /*!< TODO: describe */
|
||||
QString m_szSubtitle; /*!< TODO: describe */
|
||||
cTextDocument* m_lpShortDescription; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
QString m_szAuthor; /*!< TODO: describe */
|
||||
QDateTime m_startedAt; /*!< TODO: describe */
|
||||
QDateTime m_finishedAt; /*!< TODO: describe */
|
||||
QDateTime m_targetDate; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cBook*)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cchapter.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cchapter.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
+134
-6
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cchapter.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHAPTER_H
|
||||
#define CCHAPTER_H
|
||||
|
||||
@@ -12,50 +17,173 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cChapter cchapter.h "cchapter.h"
|
||||
*/
|
||||
class cChapter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cChapter
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cChapter(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setPart
|
||||
\param lpPart
|
||||
*/
|
||||
void setPart(cPart *lpPart);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn part
|
||||
\return cPart
|
||||
*/
|
||||
cPart* part();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSortOrder
|
||||
\param iSortOrder
|
||||
*/
|
||||
void setSortOrder(const qint32& iSortOrder);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn sortOrder
|
||||
\return qint32
|
||||
*/
|
||||
qint32 sortOrder();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setText
|
||||
\param lpText
|
||||
*/
|
||||
void setText(cTextDocument* lpText);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn text
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* text();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
cPart* m_lpPart;
|
||||
QString m_szName;
|
||||
qint32 m_iSortOrder;
|
||||
cTextDocument* m_lpDescription;
|
||||
cTextDocument* m_lpText;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
cPart* m_lpPart; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
qint32 m_iSortOrder; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
cTextDocument* m_lpText; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cChapter*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cChapterList cchapter.h "cchapter.h"
|
||||
*/
|
||||
class cChapterList : public QList<cChapter*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpPartList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cPartList *lpPartList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cChapter
|
||||
*/
|
||||
cChapter* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cChapter
|
||||
*/
|
||||
cChapter* find(const qint32& iID);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param lpPart
|
||||
\return QList<cChapter *>
|
||||
*/
|
||||
QList<cChapter*> find(cPart* lpPart);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cchapterwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cchapterwindow.h"
|
||||
#include "ui_cchapterwindow.h"
|
||||
|
||||
|
||||
+38
-4
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cchapterwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHAPTERWINDOW_H
|
||||
#define CCHAPTERWINDOW_H
|
||||
|
||||
@@ -16,22 +21,51 @@ namespace Ui {
|
||||
class cChapterWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cChapterWindow cchapterwindow.h "cchapterwindow.h"
|
||||
*/
|
||||
class cChapterWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cChapterWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cChapterWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cChapterWindow
|
||||
*/
|
||||
~cChapterWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setChapter
|
||||
\param lpChapter
|
||||
\param lpSceneList
|
||||
*/
|
||||
void setChapter(cChapter* lpChapter, cSceneList* lpSceneList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn chapter
|
||||
\return cChapter
|
||||
*/
|
||||
cChapter* chapter();
|
||||
|
||||
private:
|
||||
Ui::cChapterWindow *ui;
|
||||
cChapter* m_lpChapter;
|
||||
cSceneList* m_lpSceneList;
|
||||
QStandardItemModel* m_lpSceneModel;
|
||||
Ui::cChapterWindow *ui; /*!< TODO: describe */
|
||||
cChapter* m_lpChapter; /*!< TODO: describe */
|
||||
cSceneList* m_lpSceneList; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpSceneModel; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CCHAPTERWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccharacter.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ccharacter.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
+424
-27
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccharacter.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHARACTER_H
|
||||
#define CCHARACTER_H
|
||||
|
||||
@@ -13,10 +18,20 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cCharacter ccharacter.h "ccharacter.h"
|
||||
*/
|
||||
class cCharacter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\enum GENDER
|
||||
*/
|
||||
enum GENDER
|
||||
{
|
||||
GENDER_undefined = 0,
|
||||
@@ -24,120 +39,470 @@ public:
|
||||
GENDER_female = 2,
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cCharacter
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cCharacter(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setMainCharacter
|
||||
\param bMainCharacter
|
||||
*/
|
||||
void setMainCharacter(bool bMainCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn mainCharacter
|
||||
\return bool
|
||||
*/
|
||||
bool mainCharacter();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setCreature
|
||||
\param szCreature
|
||||
*/
|
||||
void setCreature(const QString& szCreature);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn creature
|
||||
\return QString
|
||||
*/
|
||||
QString creature();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setGender
|
||||
\param gender
|
||||
*/
|
||||
void setGender(GENDER gender);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gender
|
||||
\return GENDER
|
||||
*/
|
||||
GENDER gender();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn genderText
|
||||
\return QString
|
||||
*/
|
||||
QString genderText();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn genderText
|
||||
\param gender
|
||||
\return QString
|
||||
*/
|
||||
QString genderText(GENDER gender) const;
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setTitle
|
||||
\param szTitle
|
||||
*/
|
||||
void setTitle(const QString& szTitle);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn title
|
||||
\return QString
|
||||
*/
|
||||
QString title();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setFirstName
|
||||
\param szFirstName
|
||||
*/
|
||||
void setFirstName(const QString& szFirstName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn firstName
|
||||
\return QString
|
||||
*/
|
||||
QString firstName();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setMiddleName
|
||||
\param szMiddleName
|
||||
*/
|
||||
void setMiddleName(const QString& szMiddleName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn middleName
|
||||
\return QString
|
||||
*/
|
||||
QString middleName();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setLastName
|
||||
\param szLastName
|
||||
*/
|
||||
void setLastName(const QString& szLastName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lastName
|
||||
\return QString
|
||||
*/
|
||||
QString lastName();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setNickName
|
||||
\param szNickName
|
||||
*/
|
||||
void setNickName(const QString& szNickName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn nickName
|
||||
\return QString
|
||||
*/
|
||||
QString nickName();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setHeight
|
||||
\param dHeight
|
||||
*/
|
||||
void setHeight(qreal dHeight);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn height
|
||||
\return qreal
|
||||
*/
|
||||
qreal height();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setWeight
|
||||
\param dWeight
|
||||
*/
|
||||
void setWeight(qreal dWeight);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn weight
|
||||
\return qreal
|
||||
*/
|
||||
qreal weight();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setAge
|
||||
\param dAge
|
||||
*/
|
||||
void setAge(qreal dAge);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn age
|
||||
\return qreal
|
||||
*/
|
||||
qreal age();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDateOfBirth
|
||||
\param dateOfBirth
|
||||
*/
|
||||
void setDateOfBirth(const QDate& dateOfBirth);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn dateOfBirth
|
||||
\return QDate
|
||||
*/
|
||||
QDate dateOfBirth();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setPlaceOfBirth
|
||||
\param szPlaceOfBirth
|
||||
*/
|
||||
void setPlaceOfBirth(const QString& szPlaceOfBirth);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn placeOfBirth
|
||||
\return QString
|
||||
*/
|
||||
QString placeOfBirth();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDateOfDeath
|
||||
\param dateOfDeath
|
||||
*/
|
||||
void setDateOfDeath(const QDate& dateOfDeath);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn dateOfDeath
|
||||
\return QDate
|
||||
*/
|
||||
QDate dateOfDeath();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setPlaceOfDeath
|
||||
\param szPlaceOfDeath
|
||||
*/
|
||||
void setPlaceOfDeath(const QString& szPlaceOfDeath);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn placeOfDeath
|
||||
\return QString
|
||||
*/
|
||||
QString placeOfDeath();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setHairColor
|
||||
\param szHairColor
|
||||
*/
|
||||
void setHairColor(const QString& szHairColor);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn hairColor
|
||||
\return QString
|
||||
*/
|
||||
QString hairColor();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setHairCut
|
||||
\param szHairCut
|
||||
*/
|
||||
void setHairCut(const QString& szHairCut);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn hairCut
|
||||
\return QString
|
||||
*/
|
||||
QString hairCut();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setHairLength
|
||||
\param szHairLength
|
||||
*/
|
||||
void setHairLength(const QString& szHairLength);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn hairLength
|
||||
\return QString
|
||||
*/
|
||||
QString hairLength();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setFigure
|
||||
\param szFigure
|
||||
*/
|
||||
void setFigure(const QString& szFigure);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn figure
|
||||
\return QString
|
||||
*/
|
||||
QString figure();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setNature
|
||||
\param szNature
|
||||
*/
|
||||
void setNature(const QString& szNature);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn nature
|
||||
\return QString
|
||||
*/
|
||||
QString nature();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSpokenLanguages
|
||||
\param szSpokenLanguages
|
||||
*/
|
||||
void setSpokenLanguages(const QString& szSpokenLanguages);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn spokenLanguages
|
||||
\return QString
|
||||
*/
|
||||
QString spokenLanguages();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSkin
|
||||
\param szSkin
|
||||
*/
|
||||
void setSkin(const QString& szSkin);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn skin
|
||||
\return QString
|
||||
*/
|
||||
QString skin();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSchool
|
||||
\param szSchool
|
||||
*/
|
||||
void setSchool(const QString& szSchool);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn school
|
||||
\return QString
|
||||
*/
|
||||
QString school();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setJob
|
||||
\param szJob
|
||||
*/
|
||||
void setJob(const QString& szJob);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn job
|
||||
\return QString
|
||||
*/
|
||||
QString job();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addImage
|
||||
\param lpImage
|
||||
*/
|
||||
void addImage(cImage* lpImage);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn images
|
||||
\return QList<cImage *>
|
||||
*/
|
||||
QList<cImage*> images();
|
||||
private:
|
||||
qint32 m_id;
|
||||
bool m_bMainCharacter;
|
||||
QString m_szCreature;
|
||||
GENDER m_gender;
|
||||
QString m_szTitle;
|
||||
QString m_szFirstName;
|
||||
QString m_szMiddleName;
|
||||
QString m_szLastName;
|
||||
QString m_szNickName;
|
||||
qreal m_dHeight;
|
||||
qreal m_dWeight;
|
||||
qreal m_dAge;
|
||||
QDate m_dateOfBirth;
|
||||
QString m_szPlaceOfBirth;
|
||||
QDate m_dateOfDeath;
|
||||
QString m_szPlaceOfDeath;
|
||||
QString m_szHairColor;
|
||||
QString m_szHairCut;
|
||||
QString m_szHairLength;
|
||||
QString m_szFigure;
|
||||
QString m_szNature;
|
||||
QString m_szSpokenLanguages;
|
||||
QString m_szSkin;
|
||||
QString m_szSchool;
|
||||
QString m_szJob;
|
||||
cTextDocument* m_lpDescription;
|
||||
QList<cImage*> m_imageList;
|
||||
qint32 m_id; /*!< TODO: describe */
|
||||
bool m_bMainCharacter; /*!< TODO: describe */
|
||||
QString m_szCreature; /*!< TODO: describe */
|
||||
GENDER m_gender; /*!< TODO: describe */
|
||||
QString m_szTitle; /*!< TODO: describe */
|
||||
QString m_szFirstName; /*!< TODO: describe */
|
||||
QString m_szMiddleName; /*!< TODO: describe */
|
||||
QString m_szLastName; /*!< TODO: describe */
|
||||
QString m_szNickName; /*!< TODO: describe */
|
||||
qreal m_dHeight; /*!< TODO: describe */
|
||||
qreal m_dWeight; /*!< TODO: describe */
|
||||
qreal m_dAge; /*!< TODO: describe */
|
||||
QDate m_dateOfBirth; /*!< TODO: describe */
|
||||
QString m_szPlaceOfBirth; /*!< TODO: describe */
|
||||
QDate m_dateOfDeath; /*!< TODO: describe */
|
||||
QString m_szPlaceOfDeath; /*!< TODO: describe */
|
||||
QString m_szHairColor; /*!< TODO: describe */
|
||||
QString m_szHairCut; /*!< TODO: describe */
|
||||
QString m_szHairLength; /*!< TODO: describe */
|
||||
QString m_szFigure; /*!< TODO: describe */
|
||||
QString m_szNature; /*!< TODO: describe */
|
||||
QString m_szSpokenLanguages; /*!< TODO: describe */
|
||||
QString m_szSkin; /*!< TODO: describe */
|
||||
QString m_szSchool; /*!< TODO: describe */
|
||||
QString m_szJob; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
QList<cImage*> m_imageList; /*!< TODO: describe */
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
@@ -145,13 +510,45 @@ public slots:
|
||||
|
||||
Q_DECLARE_METATYPE(cCharacter*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cCharacterList ccharacter.h "ccharacter.h"
|
||||
*/
|
||||
class cCharacterList : public QList<cCharacter*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpImageList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cImageList* lpImageList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cCharacter
|
||||
*/
|
||||
cCharacter* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cCharacter
|
||||
*/
|
||||
cCharacter* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccharacterwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ccharacterwindow.h"
|
||||
#include "ui_ccharacterwindow.h"
|
||||
|
||||
|
||||
+35
-2
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccharacterwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHARACTERWINDOW_H
|
||||
#define CCHARACTERWINDOW_H
|
||||
|
||||
@@ -14,20 +19,48 @@ namespace Ui {
|
||||
class cCharacterWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cCharacterWindow ccharacterwindow.h "ccharacterwindow.h"
|
||||
*/
|
||||
class cCharacterWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cCharacterWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cCharacterWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cCharacterWindow
|
||||
*/
|
||||
~cCharacterWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setCharacter
|
||||
\param lpCharacter
|
||||
*/
|
||||
void setCharacter(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn character
|
||||
\return cCharacter
|
||||
*/
|
||||
cCharacter* character();
|
||||
|
||||
private:
|
||||
Ui::cCharacterWindow* ui;
|
||||
cCharacter* m_lpCharacter;
|
||||
Ui::cCharacterWindow* ui; /*!< TODO: describe */
|
||||
cCharacter* m_lpCharacter; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CCHARACTERWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccheckbox.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ccheckbox.h"
|
||||
|
||||
|
||||
|
||||
+34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccheckbox.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCHECKBOX_H
|
||||
#define CCHECKBOX_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cCheckBox ccheckbox.h "ccheckbox.h"
|
||||
*/
|
||||
class cCheckBox : public QCheckBox
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cCheckBox(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpCheckBox
|
||||
*/
|
||||
void gotFocus(cCheckBox* lpCheckBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpCheckBox
|
||||
*/
|
||||
void lostFocus(cCheckBox* lpCheckBox);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccombobox.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ccombobox.h"
|
||||
|
||||
|
||||
|
||||
+34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ccombobox.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CCOMBOBOX_H
|
||||
#define CCOMBOBOX_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cComboBox ccombobox.h "ccombobox.h"
|
||||
*/
|
||||
class cComboBox : public QComboBox
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cComboBox(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpComboBox
|
||||
*/
|
||||
void gotFocus(cComboBox* lpComboBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpComboBox
|
||||
*/
|
||||
void lostFocus(cComboBox* lpComboBox);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdateedit.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cdateedit.h"
|
||||
|
||||
|
||||
|
||||
+34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdateedit.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CDATEEDIT_H
|
||||
#define CDATEEDIT_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cDateEdit cdateedit.h "cdateedit.h"
|
||||
*/
|
||||
class cDateEdit : public QDateEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cDateEdit(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpDateEdit
|
||||
*/
|
||||
void gotFocus(cDateEdit* lpDateEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpDateEdit
|
||||
*/
|
||||
void lostFocus(cDateEdit* lpDateEdit);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdatetimeedit.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cdatetimeedit.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdatetimeedit.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CDATETIMEEDIT_H
|
||||
#define CDATETIMEEDIT_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cDateTimeEdit cdatetimeedit.h "cdatetimeedit.h"
|
||||
*/
|
||||
class cDateTimeEdit : public QDateTimeEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cDateTimeEdit(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpDateTimeEdit
|
||||
*/
|
||||
void gotFocus(cDateTimeEdit* lpDateTimeEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpDateTimeEdit
|
||||
*/
|
||||
void lostFocus(cDateTimeEdit* lpDateTimeEdit);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdoublespinbox.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cdoublespinbox.h"
|
||||
|
||||
cDoubleSpinBox::cDoubleSpinBox(QWidget* parent) :
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cdoublespinbox.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CDOUBLESPINBOX_H
|
||||
#define CDOUBLESPINBOX_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cDoubleSpinBox cdoublespinbox.h "cdoublespinbox.h"
|
||||
*/
|
||||
class cDoubleSpinBox : public QDoubleSpinBox
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cDoubleSpinBox(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpDoubleSpinBox
|
||||
*/
|
||||
void gotFocus(cDoubleSpinBox* lpDoubleSpinBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpDoubleSpinBox
|
||||
*/
|
||||
void lostFocus(cDoubleSpinBox* lpDoubleSpinBox);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cimage.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cimage.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cimage.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CIMAGE_H
|
||||
#define CIMAGE_H
|
||||
|
||||
@@ -10,42 +15,132 @@
|
||||
#include <QPixmap>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cImage cimage.h "cimage.h"
|
||||
*/
|
||||
class cImage : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
cImage(qint32 iID = -1, QObject* parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setType
|
||||
\param szType
|
||||
*/
|
||||
void setType(const QString& szType);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn type
|
||||
\return QString
|
||||
*/
|
||||
QString type();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\return QPixmap
|
||||
*/
|
||||
QPixmap load();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
QString m_szName;
|
||||
QString m_szType;
|
||||
cTextDocument* m_lpDescription;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
QString m_szType; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cImage*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cImageList cimage.h "cimage.h"
|
||||
*/
|
||||
class cImageList : public QList<cImage*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\return bool
|
||||
*/
|
||||
bool load();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cImage
|
||||
*/
|
||||
cImage* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cImage
|
||||
*/
|
||||
cImage* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cimagewidget.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cimagewidget.h"
|
||||
#include "ui_cimagewidget.h"
|
||||
|
||||
|
||||
+31
-1
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cimagewidget.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CIMAGEWIDGET_H
|
||||
#define CIMAGEWIDGET_H
|
||||
|
||||
@@ -11,17 +16,42 @@ namespace Ui {
|
||||
class cImageWidget;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cImageWidget cimagewidget.h "cimagewidget.h"
|
||||
*/
|
||||
class cImageWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cImageWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cImageWidget(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cImageWidget
|
||||
*/
|
||||
~cImageWidget();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setValues
|
||||
\param szName
|
||||
\param szType
|
||||
\param lpDocument
|
||||
\param pixmap
|
||||
*/
|
||||
void setValues(const QString& szName, const QString& szType, cTextDocument* lpDocument, const QPixmap& pixmap);
|
||||
private:
|
||||
Ui::cImageWidget* ui;
|
||||
Ui::cImageWidget* ui; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CIMAGEWIDGET_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file clineedit.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "clineedit.h"
|
||||
|
||||
|
||||
|
||||
+34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file clineedit.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CLINEEDIT_H
|
||||
#define CLINEEDIT_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cLineEdit clineedit.h "clineedit.h"
|
||||
*/
|
||||
class cLineEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cLineEdit(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpLineEdit
|
||||
*/
|
||||
void gotFocus(cLineEdit* lpLineEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpLineEdit
|
||||
*/
|
||||
void lostFocus(cLineEdit* lpLineEdit);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cmainwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "cmainwindow.h"
|
||||
|
||||
+395
-34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cmainwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CMAINWINDOW_H
|
||||
#define CMAINWINDOW_H
|
||||
|
||||
@@ -30,133 +35,489 @@ namespace Ui {
|
||||
class cMainWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cMainWindow cmainwindow.h "cmainwindow.h"
|
||||
*/
|
||||
class cMainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cMainWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cMainWindow(QWidget* parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cMainWindow
|
||||
*/
|
||||
~cMainWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn updateWindowTitle
|
||||
*/
|
||||
void updateWindowTitle();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn actionAlignLeft
|
||||
\return QAction
|
||||
*/
|
||||
QAction* actionAlignLeft();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn actionAlignCenter
|
||||
\return QAction
|
||||
*/
|
||||
QAction* actionAlignCenter();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn actionAlignRight
|
||||
\return QAction
|
||||
*/
|
||||
QAction* actionAlignRight();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn actionAlignJustify
|
||||
\return QAction
|
||||
*/
|
||||
QAction* actionAlignJustify();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextEditGotFocus
|
||||
\param lpTextEdit
|
||||
*/
|
||||
void onTextEditGotFocus(cTextEdit* lpTextEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextEditLostFocus
|
||||
\param lpTextEdit
|
||||
*/
|
||||
void onTextEditLostFocus(cTextEdit* lpTextEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onLineEditGotFocus
|
||||
\param lpLineEdit
|
||||
*/
|
||||
void onLineEditGotFocus(cLineEdit* lpLineEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onLineEditLostFocus
|
||||
\param lpLineEdit
|
||||
*/
|
||||
void onLineEditLostFocus(cLineEdit* lpLineEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTreeViewGotFocus
|
||||
\param lpTreeView
|
||||
*/
|
||||
void onTreeViewGotFocus(cTreeView* lpTreeView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTreeViewLostFocus
|
||||
\param lpTreeView
|
||||
*/
|
||||
void onTreeViewLostFocus(cTreeView* lpTreeView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCheckBoxGotFocus
|
||||
\param CheckBox
|
||||
*/
|
||||
void onCheckBoxGotFocus(cCheckBox* CheckBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCheckBoxLostFocus
|
||||
\param lpCheckBox
|
||||
*/
|
||||
void onCheckBoxLostFocus(cCheckBox* lpCheckBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onRadioButtonGotFocus
|
||||
\param lpRadioButton
|
||||
*/
|
||||
void onRadioButtonGotFocus(cRadioButton* lpRadioButton);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onRadioButtonLostFocus
|
||||
\param lpRadioButton
|
||||
*/
|
||||
void onRadioButtonLostFocus(cRadioButton* lpRadioButton);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDateEditGotFocus
|
||||
\param lpDateEdit
|
||||
*/
|
||||
void onDateEditGotFocus(cDateEdit* lpDateEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDateEditLostFocus
|
||||
\param lpDateEdit
|
||||
*/
|
||||
void onDateEditLostFocus(cDateEdit* lpDateEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDoubleSpinBoxGotFocus
|
||||
\param lpDoubleSpinBox
|
||||
*/
|
||||
void onDoubleSpinBoxGotFocus(cDoubleSpinBox* lpDoubleSpinBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDoubleSpinBoxLostFocus
|
||||
\param lpDoubleSpinBox
|
||||
*/
|
||||
void onDoubleSpinBoxLostFocus(cDoubleSpinBox* lpDoubleSpinBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDateTimeEditGotFocus
|
||||
\param lpDateTimeEdit
|
||||
*/
|
||||
void onDateTimeEditGotFocus(cDateTimeEdit* lpDateTimeEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onDateTimeEditLostFocus
|
||||
\param lpDateTimeEdit
|
||||
*/
|
||||
void onDateTimeEditLostFocus(cDateTimeEdit* lpDateTimeEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onComboBoxGotFocus
|
||||
\param lpComboBox
|
||||
*/
|
||||
void onComboBoxGotFocus(cComboBox* lpComboBox);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onComboBoxLostFocus
|
||||
\param lpComboBox
|
||||
*/
|
||||
void onComboBoxLostFocus(cComboBox* lpComboBox);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onMainTabCurrentChanged
|
||||
\param index
|
||||
*/
|
||||
void onMainTabCurrentChanged(int index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onMainTabTabCloseRequested
|
||||
\param index
|
||||
*/
|
||||
void onMainTabTabCloseRequested(int index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onMdiAreaSubWindowActivated
|
||||
\param arg1
|
||||
*/
|
||||
void onMdiAreaSubWindowActivated(QMdiSubWindow *arg1);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onSubWindowClosed
|
||||
\param lpSubWindow
|
||||
*/
|
||||
void onSubWindowClosed(QWidget* lpSubWindow);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onOutlineDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onOutlineDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCharacterDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onCharacterDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onPlaceDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onPlaceDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onObjectDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onObjectDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onRechercheDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onRechercheDoubleClicked(const QModelIndex& index);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowPartWindow
|
||||
\param lpPart
|
||||
*/
|
||||
void onShowPartWindow(cPart* lpPart);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowChapterWindow
|
||||
\param lpChapter
|
||||
*/
|
||||
void onShowChapterWindow(cChapter* lpChapter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowSceneWindow
|
||||
\param lpScene
|
||||
*/
|
||||
void onShowSceneWindow(cScene* lpScene);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowCharacterWindow
|
||||
\param lpCharacter
|
||||
*/
|
||||
void onShowCharacterWindow(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowPlaceWindow
|
||||
\param lpPlace
|
||||
*/
|
||||
void onShowPlaceWindow(cPlace* lpPlace);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowObjectWindow
|
||||
\param lpObject
|
||||
*/
|
||||
void onShowObjectWindow(cObject* lpObject);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onShowRechercheWindow
|
||||
\param lpRecherche
|
||||
*/
|
||||
void onShowRechercheWindow(cRecherche* lpRecherche);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFileNew
|
||||
*/
|
||||
void onFileNew();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFileOpen
|
||||
*/
|
||||
void onFileOpen();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFileSave
|
||||
\return bool
|
||||
*/
|
||||
bool onFileSave();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFileSaveAs
|
||||
\return bool
|
||||
*/
|
||||
bool onFileSaveAs();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFilePrint
|
||||
*/
|
||||
void onFilePrint();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFilePrintPreview
|
||||
*/
|
||||
void onFilePrintPreview();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFilePrintPdf
|
||||
*/
|
||||
void onFilePrintPdf();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onClipboardDataChanged
|
||||
*/
|
||||
void onClipboardDataChanged();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onFontChanged
|
||||
\param font
|
||||
*/
|
||||
void onFontChanged(const QFont& font);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onColorChanged
|
||||
\param color
|
||||
*/
|
||||
void onColorChanged(const QColor& color);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onAlignmentChanged
|
||||
\param alignment
|
||||
*/
|
||||
void onAlignmentChanged(const Qt::Alignment& alignment);
|
||||
|
||||
private:
|
||||
Ui::cMainWindow* ui;
|
||||
QStandardItemModel* m_lpOutlineModel;
|
||||
QStandardItemModel* m_lpCharacterModel;
|
||||
QStandardItemModel* m_lpPlaceModel;
|
||||
QStandardItemModel* m_lpObjectModel;
|
||||
QStandardItemModel* m_lpRechercheModel;
|
||||
bool m_bUpdatingTab;
|
||||
cStoryBook* m_lpStoryBook;
|
||||
Ui::cMainWindow* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpOutlineModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpCharacterModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpPlaceModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpObjectModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpRechercheModel; /*!< TODO: describe */
|
||||
bool m_bUpdatingTab; /*!< TODO: describe */
|
||||
cStoryBook* m_lpStoryBook; /*!< TODO: describe */
|
||||
|
||||
QList<QWidget*> m_focusException;
|
||||
QList<QWidget*> m_focusException; /*!< TODO: describe */
|
||||
|
||||
QMenu* m_lpFileMenu;
|
||||
QMenu* m_lpEditMenu;
|
||||
QMenu* m_lpTextMenu;
|
||||
QMenu* m_lpFileMenu; /*!< TODO: describe */
|
||||
QMenu* m_lpEditMenu; /*!< TODO: describe */
|
||||
QMenu* m_lpTextMenu; /*!< TODO: describe */
|
||||
|
||||
QToolBar* m_lpFileToolBar;
|
||||
QToolBar* m_lpEditToolBar;
|
||||
QToolBar* m_lpTextToolBar;
|
||||
QToolBar* m_lpFormatToolBar;
|
||||
QAction* m_lpActionSave;
|
||||
QAction* m_lpActionUndo;
|
||||
QAction* m_lpActionRedo;
|
||||
QToolBar* m_lpFileToolBar; /*!< TODO: describe */
|
||||
QToolBar* m_lpEditToolBar; /*!< TODO: describe */
|
||||
QToolBar* m_lpTextToolBar; /*!< TODO: describe */
|
||||
QToolBar* m_lpFormatToolBar; /*!< TODO: describe */
|
||||
QAction* m_lpActionSave; /*!< TODO: describe */
|
||||
QAction* m_lpActionUndo; /*!< TODO: describe */
|
||||
QAction* m_lpActionRedo; /*!< TODO: describe */
|
||||
|
||||
QAction* m_lpActionTextBold;
|
||||
QAction* m_lpActionTextItalic;
|
||||
QAction* m_lpActionTextUnderline;
|
||||
QAction* m_lpActionTextBold; /*!< TODO: describe */
|
||||
QAction* m_lpActionTextItalic; /*!< TODO: describe */
|
||||
QAction* m_lpActionTextUnderline; /*!< TODO: describe */
|
||||
|
||||
QAction* m_lpActionAlignLeft;
|
||||
QAction* m_lpActionAlignCenter;
|
||||
QAction* m_lpActionAlignRight;
|
||||
QAction* m_lpActionAlignJustify;
|
||||
QAction* m_lpActionAlignLeft; /*!< TODO: describe */
|
||||
QAction* m_lpActionAlignCenter; /*!< TODO: describe */
|
||||
QAction* m_lpActionAlignRight; /*!< TODO: describe */
|
||||
QAction* m_lpActionAlignJustify; /*!< TODO: describe */
|
||||
|
||||
QAction* m_lpActionTextColor;
|
||||
QAction* m_lpActionTextColor; /*!< TODO: describe */
|
||||
|
||||
QAction* m_lpActionCut;
|
||||
QAction* m_lpActionCopy;
|
||||
QAction* m_lpActionPaste;
|
||||
QAction* m_lpActionCut; /*!< TODO: describe */
|
||||
QAction* m_lpActionCopy; /*!< TODO: describe */
|
||||
QAction* m_lpActionPaste; /*!< TODO: describe */
|
||||
|
||||
QActionGroup* m_lpAlignGroup;
|
||||
QActionGroup* m_lpAlignGroup; /*!< TODO: describe */
|
||||
|
||||
QFontComboBox* m_lpComboFont;
|
||||
QComboBox* m_lpComboSize;
|
||||
QFontComboBox* m_lpComboFont; /*!< TODO: describe */
|
||||
QComboBox* m_lpComboSize; /*!< TODO: describe */
|
||||
|
||||
cTextEdit* m_lpOldTextEdit;
|
||||
cTextEdit* m_lpOldTextEdit; /*!< TODO: describe */
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn initUI
|
||||
*/
|
||||
void initUI();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createActions
|
||||
*/
|
||||
void createActions();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createFileActions
|
||||
*/
|
||||
void createFileActions();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createEditActions
|
||||
*/
|
||||
void createEditActions();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createTextActions
|
||||
*/
|
||||
void createTextActions();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn disableTextEdit
|
||||
*/
|
||||
void disableTextEdit();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn prepareTextEdit
|
||||
\param lpTextEdit
|
||||
*/
|
||||
void prepareTextEdit(cTextEdit* lpTextEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn disconnectTextEdit
|
||||
*/
|
||||
void disconnectTextEdit();
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn closeEvent
|
||||
\param event
|
||||
*/
|
||||
void closeEvent(QCloseEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cmdisubwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cmdisubwindow.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cmdisubwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CMDISUBWINDOW_H
|
||||
#define CMDISUBWINDOW_H
|
||||
|
||||
@@ -5,18 +10,41 @@
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cMDISubWindow cmdisubwindow.h "cmdisubwindow.h"
|
||||
*/
|
||||
class cMDISubWindow : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cMDISubWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cMDISubWindow(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn subWindowClosed
|
||||
\param lpWidget
|
||||
*/
|
||||
void subWindowClosed(QWidget* lpWidget);
|
||||
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn closeEvent
|
||||
\param event
|
||||
*/
|
||||
void closeEvent(QCloseEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cobject.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cobject.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cobject.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef COBJECT_H
|
||||
#define COBJECT_H
|
||||
|
||||
@@ -11,33 +16,105 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cObject cobject.h "cobject.h"
|
||||
*/
|
||||
class cObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cObject
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cObject(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setType
|
||||
\param szType
|
||||
*/
|
||||
void setType(const QString& szType);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn type
|
||||
\return QString
|
||||
*/
|
||||
QString type();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addImage
|
||||
\param lpImage
|
||||
*/
|
||||
void addImage(cImage* lpImage);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn images
|
||||
\return QList<cImage *>
|
||||
*/
|
||||
QList<cImage*> images();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
QString m_szName;
|
||||
QString m_szType;
|
||||
cTextDocument* m_lpDescription;
|
||||
QList<cImage*> m_imageList;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
QString m_szType; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
QList<cImage*> m_imageList; /*!< TODO: describe */
|
||||
|
||||
signals:
|
||||
|
||||
@@ -46,13 +123,45 @@ public slots:
|
||||
|
||||
Q_DECLARE_METATYPE(cObject*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cObjectList cobject.h "cobject.h"
|
||||
*/
|
||||
class cObjectList : public QList<cObject*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpImageList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cImageList* lpImageList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cObject
|
||||
*/
|
||||
cObject* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cObject
|
||||
*/
|
||||
cObject* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cobjectwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cobjectwindow.h"
|
||||
#include "ui_cobjectwindow.h"
|
||||
|
||||
|
||||
+35
-2
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cobjectwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef COBJECTWINDOW_H
|
||||
#define COBJECTWINDOW_H
|
||||
|
||||
@@ -14,20 +19,48 @@ namespace Ui {
|
||||
class cObjectWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cObjectWindow cobjectwindow.h "cobjectwindow.h"
|
||||
*/
|
||||
class cObjectWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cObjectWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cObjectWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cObjectWindow
|
||||
*/
|
||||
~cObjectWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setObject
|
||||
\param lpObject
|
||||
*/
|
||||
void setObject(cObject* lpObject);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn object
|
||||
\return cObject
|
||||
*/
|
||||
cObject* object();
|
||||
|
||||
private:
|
||||
Ui::cObjectWindow* ui;
|
||||
cObject* m_lpObject;
|
||||
Ui::cObjectWindow* ui; /*!< TODO: describe */
|
||||
cObject* m_lpObject; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // COBJECTWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file common.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
QString uncompressText(const QByteArray& compressed)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file common.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
@@ -17,8 +22,29 @@
|
||||
#define myDebug qDebug() << __FILE__ << "(" << __LINE__ << ") - " << __FUNCTION__ << ":"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn uncompressText
|
||||
\param compressed
|
||||
\return QString
|
||||
*/
|
||||
QString uncompressText(const QByteArray& compressed);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn compressText
|
||||
\param uncompressed
|
||||
\return QByteArray
|
||||
*/
|
||||
QByteArray compressText(const QString& uncompressed);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn blob2TextDocument
|
||||
\param ba
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* blob2TextDocument(const QByteArray& ba);
|
||||
|
||||
#endif // COMMON_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cpart.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cpart.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cpart.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPART_H
|
||||
#define CPART_H
|
||||
|
||||
@@ -10,44 +15,147 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPart cpart.h "cpart.h"
|
||||
*/
|
||||
class cPart : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cPart
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cPart(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSortOrder
|
||||
\param iSortOrder
|
||||
*/
|
||||
void setSortOrder(const qint32& iSortOrder);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn sortOrder
|
||||
\return qint32
|
||||
*/
|
||||
qint32 sortOrder();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setText
|
||||
\param lpText
|
||||
*/
|
||||
void setText(cTextDocument* lpText);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn text
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* text();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
QString m_szName;
|
||||
qint32 m_iSortOrder;
|
||||
cTextDocument* m_lpDescription;
|
||||
cTextDocument* m_lpText;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
qint32 m_iSortOrder; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
cTextDocument* m_lpText; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cPart*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPartList cpart.h "cpart.h"
|
||||
*/
|
||||
class cPartList : public QList<cPart*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\return bool
|
||||
*/
|
||||
bool load();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cPart
|
||||
*/
|
||||
cPart* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cPart
|
||||
*/
|
||||
cPart* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cpartwindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cpartwindow.h"
|
||||
#include "ui_cpartwindow.h"
|
||||
|
||||
|
||||
+38
-4
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cpartwindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPARTWINDOW_H
|
||||
#define CPARTWINDOW_H
|
||||
|
||||
@@ -15,22 +20,51 @@ namespace Ui {
|
||||
class cPartWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPartWindow cpartwindow.h "cpartwindow.h"
|
||||
*/
|
||||
class cPartWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cPartWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cPartWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cPartWindow
|
||||
*/
|
||||
~cPartWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setPart
|
||||
\param lpPart
|
||||
\param lpChapterList
|
||||
*/
|
||||
void setPart(cPart* lpPart, cChapterList* lpChapterList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn part
|
||||
\return cPart
|
||||
*/
|
||||
cPart* part();
|
||||
|
||||
private:
|
||||
Ui::cPartWindow* ui;
|
||||
cPart* m_lpPart;
|
||||
cChapterList* m_lpChapterList;
|
||||
QStandardItemModel* m_lpChapterModel;
|
||||
Ui::cPartWindow* ui; /*!< TODO: describe */
|
||||
cPart* m_lpPart; /*!< TODO: describe */
|
||||
cChapterList* m_lpChapterList; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpChapterModel; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CPARTWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cplace.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cplace.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cplace.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPLACE_H
|
||||
#define CPLACE_H
|
||||
|
||||
@@ -11,37 +16,121 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPlace cplace.h "cplace.h"
|
||||
*/
|
||||
class cPlace : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cPlace
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cPlace(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setLocation
|
||||
\param szLocation
|
||||
*/
|
||||
void setLocation(const QString& szLocation);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn location
|
||||
\return QString
|
||||
*/
|
||||
QString location();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setType
|
||||
\param szType
|
||||
*/
|
||||
void setType(const QString& szType);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn type
|
||||
\return QString
|
||||
*/
|
||||
QString type();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addImage
|
||||
\param lpImage
|
||||
*/
|
||||
void addImage(cImage* lpImage);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn images
|
||||
\return QList<cImage *>
|
||||
*/
|
||||
QList<cImage*> images();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
QString m_szName;
|
||||
QString m_szLocation;
|
||||
QString m_szType;
|
||||
cTextDocument* m_lpDescription;
|
||||
QList<cImage*> m_imageList;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
QString m_szLocation; /*!< TODO: describe */
|
||||
QString m_szType; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
QList<cImage*> m_imageList; /*!< TODO: describe */
|
||||
|
||||
signals:
|
||||
|
||||
@@ -50,13 +139,45 @@ public slots:
|
||||
|
||||
Q_DECLARE_METATYPE(cPlace*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPlaceList cplace.h "cplace.h"
|
||||
*/
|
||||
class cPlaceList : public QList<cPlace*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpImageList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cImageList* lpImageList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cPlace
|
||||
*/
|
||||
cPlace* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cPlace
|
||||
*/
|
||||
cPlace* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cplacewindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cplacewindow.h"
|
||||
#include "ui_cplacewindow.h"
|
||||
|
||||
|
||||
+35
-2
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cplacewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CPLACEWINDOW_H
|
||||
#define CPLACEWINDOW_H
|
||||
|
||||
@@ -14,20 +19,48 @@ namespace Ui {
|
||||
class cPlaceWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cPlaceWindow cplacewindow.h "cplacewindow.h"
|
||||
*/
|
||||
class cPlaceWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cPlaceWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cPlaceWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cPlaceWindow
|
||||
*/
|
||||
~cPlaceWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setPlace
|
||||
\param lpPlace
|
||||
*/
|
||||
void setPlace(cPlace* lpPlace);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn place
|
||||
\return cPlace
|
||||
*/
|
||||
cPlace* place();
|
||||
|
||||
private:
|
||||
Ui::cPlaceWindow* ui;
|
||||
cPlace* m_lpPlace;
|
||||
Ui::cPlaceWindow* ui; /*!< TODO: describe */
|
||||
cPlace* m_lpPlace; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CPLACEWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cradiobutton.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cradiobutton.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cradiobutton.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CRADIOBUTTON_H
|
||||
#define CRADIOBUTTON_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cRadioButton cradiobutton.h "cradiobutton.h"
|
||||
*/
|
||||
class cRadioButton : public QRadioButton
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cRadioButton(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpRadioButton
|
||||
*/
|
||||
void gotFocus(cRadioButton* lpRadioButton);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpRadioButton
|
||||
*/
|
||||
void lostFocus(cRadioButton* lpRadioButton);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file crecherche.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "crecherche.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
+156
-8
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file crecherche.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CRECHERCHE_H
|
||||
#define CRECHERCHE_H
|
||||
|
||||
@@ -14,43 +19,151 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cRecherche crecherche.h "crecherche.h"
|
||||
*/
|
||||
class cRecherche : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cRecherche
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cRecherche(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setLink
|
||||
\param szLink
|
||||
*/
|
||||
void setLink(const QString& szLink);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn link
|
||||
\return QString
|
||||
*/
|
||||
QString link();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addImage
|
||||
\param lpImage
|
||||
*/
|
||||
void addImage(cImage* lpImage);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addCharacter
|
||||
\param lpCharacter
|
||||
*/
|
||||
void addCharacter(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addObject
|
||||
\param lpObject
|
||||
*/
|
||||
void addObject(cObject* lpObject);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addPlace
|
||||
\param lpPlace
|
||||
*/
|
||||
void addPlace(cPlace* lpPlace);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn images
|
||||
\return QList<cImage *>
|
||||
*/
|
||||
QList<cImage*> images();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn characterList
|
||||
\return QList<cCharacter *>
|
||||
*/
|
||||
QList<cCharacter*> characterList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn objectList
|
||||
\return QList<cObject *>
|
||||
*/
|
||||
QList<cObject*> objectList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn placeList
|
||||
\return QList<cPlace *>
|
||||
*/
|
||||
QList<cPlace*> placeList();
|
||||
|
||||
private:
|
||||
qint32 m_iID;
|
||||
QString m_szName;
|
||||
QString m_szLink;
|
||||
cTextDocument* m_lpDescription;
|
||||
QList<cImage*> m_imageList;
|
||||
QList<cCharacter*> m_characterList;
|
||||
QList<cObject*> m_objectList;
|
||||
QList<cPlace*> m_placeList;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
QString m_szLink; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
QList<cImage*> m_imageList; /*!< TODO: describe */
|
||||
QList<cCharacter*> m_characterList; /*!< TODO: describe */
|
||||
QList<cObject*> m_objectList; /*!< TODO: describe */
|
||||
QList<cPlace*> m_placeList; /*!< TODO: describe */
|
||||
|
||||
signals:
|
||||
|
||||
@@ -59,13 +172,48 @@ public slots:
|
||||
|
||||
Q_DECLARE_METATYPE(cRecherche*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cRechercheList crecherche.h "crecherche.h"
|
||||
*/
|
||||
class cRechercheList : public QList<cRecherche*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpImageList
|
||||
\param lpCharacterList
|
||||
\param lpObjectList
|
||||
\param lpPlaceList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cImageList* lpImageList, cCharacterList* lpCharacterList, cObjectList* lpObjectList, cPlaceList* lpPlaceList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cRecherche
|
||||
*/
|
||||
cRecherche* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cRecherche
|
||||
*/
|
||||
cRecherche* find(const qint32& iID);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file crecherchewindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "crecherchewindow.h"
|
||||
#include "ui_crecherchewindow.h"
|
||||
|
||||
|
||||
+74
-5
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file crecherchewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CRECHERCHEWINDOW_H
|
||||
#define CRECHERCHEWINDOW_H
|
||||
|
||||
@@ -14,33 +19,97 @@ namespace Ui {
|
||||
class cRechercheWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cRechercheWindow crecherchewindow.h "crecherchewindow.h"
|
||||
*/
|
||||
class cRechercheWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cRechercheWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cRechercheWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cRechercheWindow
|
||||
*/
|
||||
~cRechercheWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setRecherche
|
||||
\param lpRecherche
|
||||
*/
|
||||
void setRecherche(cRecherche* lpRecherche);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn recherche
|
||||
\return cRecherche
|
||||
*/
|
||||
cRecherche* recherche();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCharacterDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onCharacterDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onPlaceDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onPlaceDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onObjectDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onObjectDoubleClicked(const QModelIndex& index);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showCharacterWindow
|
||||
\param lpCharacter
|
||||
*/
|
||||
void showCharacterWindow(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showPlaceWindow
|
||||
\param lpPlace
|
||||
*/
|
||||
void showPlaceWindow(cPlace* lpPlace);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showObjectWindow
|
||||
\param lpObject
|
||||
*/
|
||||
void showObjectWindow(cObject* lpObject);
|
||||
|
||||
private:
|
||||
Ui::cRechercheWindow* ui;
|
||||
QStandardItemModel* m_lpCharacterModel;
|
||||
QStandardItemModel* m_lpPlaceModel;
|
||||
QStandardItemModel* m_lpObjectModel;
|
||||
cRecherche* m_lpRecherche;
|
||||
Ui::cRechercheWindow* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpCharacterModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpPlaceModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpObjectModel; /*!< TODO: describe */
|
||||
cRecherche* m_lpRecherche; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CRECHERCHEWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cscene.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cscene.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cscene.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CSCENE_H
|
||||
#define CSCENE_H
|
||||
|
||||
@@ -16,11 +21,21 @@
|
||||
#include <QObject>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cScene cscene.h "cscene.h"
|
||||
*/
|
||||
class cScene : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\enum STATE
|
||||
*/
|
||||
enum STATE
|
||||
{
|
||||
STATE_unknown = 0,
|
||||
@@ -30,78 +45,309 @@ public:
|
||||
STATE_finished = 4,
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cScene
|
||||
\param iID
|
||||
\param parent
|
||||
*/
|
||||
explicit cScene(qint32 iID = -1, QObject *parent = nullptr);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setID
|
||||
\param iID
|
||||
*/
|
||||
void setID(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn id
|
||||
\return qint32
|
||||
*/
|
||||
qint32 id();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setChapter
|
||||
\param lpChapter
|
||||
*/
|
||||
void setChapter(cChapter *lpChapter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn chapter
|
||||
\return cChapter
|
||||
*/
|
||||
cChapter* chapter();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setName
|
||||
\param szName
|
||||
*/
|
||||
void setName(const QString& szName);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn name
|
||||
\return QString
|
||||
*/
|
||||
QString name();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setSortOrder
|
||||
\param iSortOrder
|
||||
*/
|
||||
void setSortOrder(const qint32& iSortOrder);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn sortOrder
|
||||
\return qint32
|
||||
*/
|
||||
qint32 sortOrder();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setDescription
|
||||
\param lpDescription
|
||||
*/
|
||||
void setDescription(cTextDocument* lpDescription);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn description
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* description();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setState
|
||||
\param state
|
||||
*/
|
||||
void setState(const STATE state);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn state
|
||||
\return STATE
|
||||
*/
|
||||
STATE state();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setStartedAt
|
||||
\param startedAt
|
||||
*/
|
||||
void setStartedAt(const QDateTime& startedAt);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn startedAt
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime startedAt();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setFinishedAt
|
||||
\param finishedAt
|
||||
*/
|
||||
void setFinishedAt(const QDateTime& finishedAt);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn finishedAt
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime finishedAt();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setTargetDate
|
||||
\param targetDate
|
||||
*/
|
||||
void setTargetDate(const QDateTime& targetDate);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn targetDate
|
||||
\return QDateTime
|
||||
*/
|
||||
QDateTime targetDate();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setText
|
||||
\param lpText
|
||||
*/
|
||||
void setText(cTextDocument* lpText);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn text
|
||||
\return cTextDocument
|
||||
*/
|
||||
cTextDocument* text();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addCharacter
|
||||
\param lpCharacter
|
||||
*/
|
||||
void addCharacter(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn characterList
|
||||
\return QList<cCharacter *>
|
||||
*/
|
||||
QList<cCharacter*> characterList();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addObject
|
||||
\param lpObject
|
||||
*/
|
||||
void addObject(cObject* lpObject);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn objectList
|
||||
\return QList<cObject *>
|
||||
*/
|
||||
QList<cObject*> objectList();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn addPlace
|
||||
\param lpPlace
|
||||
*/
|
||||
void addPlace(cPlace* lpPlace);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn placeList
|
||||
\return QList<cPlace *>
|
||||
*/
|
||||
QList<cPlace*> placeList();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn stateText
|
||||
\return QString
|
||||
*/
|
||||
QString stateText();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn stateText
|
||||
\param state
|
||||
\return QString
|
||||
*/
|
||||
static QString stateText(STATE state);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn stateColor
|
||||
\return QColor
|
||||
*/
|
||||
QColor stateColor();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn stateColor
|
||||
\param state
|
||||
\return QColor
|
||||
*/
|
||||
static QColor stateColor(STATE state);
|
||||
private:
|
||||
qint32 m_iID;
|
||||
cChapter* m_lpChapter;
|
||||
QString m_szName;
|
||||
qint32 m_iSortOrder;
|
||||
cTextDocument* m_lpDescription;
|
||||
STATE m_state;
|
||||
QDateTime m_startedAt;
|
||||
QDateTime m_finishedAt;
|
||||
QDateTime m_targetDate;
|
||||
cTextDocument* m_lpText;
|
||||
QList<cCharacter*> m_characterList;
|
||||
QList<cObject*> m_objectList;
|
||||
QList<cPlace*> m_placeList;
|
||||
qint32 m_iID; /*!< TODO: describe */
|
||||
cChapter* m_lpChapter; /*!< TODO: describe */
|
||||
QString m_szName; /*!< TODO: describe */
|
||||
qint32 m_iSortOrder; /*!< TODO: describe */
|
||||
cTextDocument* m_lpDescription; /*!< TODO: describe */
|
||||
STATE m_state; /*!< TODO: describe */
|
||||
QDateTime m_startedAt; /*!< TODO: describe */
|
||||
QDateTime m_finishedAt; /*!< TODO: describe */
|
||||
QDateTime m_targetDate; /*!< TODO: describe */
|
||||
cTextDocument* m_lpText; /*!< TODO: describe */
|
||||
QList<cCharacter*> m_characterList; /*!< TODO: describe */
|
||||
QList<cObject*> m_objectList; /*!< TODO: describe */
|
||||
QList<cPlace*> m_placeList; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(cScene*)
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cSceneList cscene.h "cscene.h"
|
||||
*/
|
||||
class cSceneList : public QList<cScene*>
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn load
|
||||
\param lpChapterList
|
||||
\param lpCharacterList
|
||||
\param lpObjectList
|
||||
\param lpPlaceList
|
||||
\return bool
|
||||
*/
|
||||
bool load(cChapterList *lpChapterList, cCharacterList* lpCharacterList, cObjectList* lpObjectList, cPlaceList* lpPlaceList);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn add
|
||||
\param iID
|
||||
\return cScene
|
||||
*/
|
||||
cScene* add(const qint32& iID);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param iID
|
||||
\return cScene
|
||||
*/
|
||||
cScene* find(const qint32& iID);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn find
|
||||
\param lpChapter
|
||||
\return QList<cScene *>
|
||||
*/
|
||||
QList<cScene*> find(cChapter* lpChapter);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cscenewindow.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cscenewindow.h"
|
||||
#include "ui_cscenewindow.h"
|
||||
|
||||
|
||||
+80
-5
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cscenewindow.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CSCENEWINDOW_H
|
||||
#define CSCENEWINDOW_H
|
||||
|
||||
@@ -16,34 +21,104 @@ namespace Ui {
|
||||
class cSceneWindow;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cSceneWindow cscenewindow.h "cscenewindow.h"
|
||||
*/
|
||||
class cSceneWindow : public cMDISubWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cSceneWindow
|
||||
\param parent
|
||||
*/
|
||||
explicit cSceneWindow(QWidget *parent = 0);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cSceneWindow
|
||||
*/
|
||||
~cSceneWindow();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setScene
|
||||
\param lpScene
|
||||
*/
|
||||
void setScene(cScene* lpScene);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn scene
|
||||
\return cScene
|
||||
*/
|
||||
cScene* scene();
|
||||
|
||||
private slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onStateCurrentIndexChanged
|
||||
\param index
|
||||
*/
|
||||
void onStateCurrentIndexChanged(int index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCharacterDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onCharacterDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onPlaceDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onPlaceDoubleClicked(const QModelIndex& index);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onObjectDoubleClicked
|
||||
\param index
|
||||
*/
|
||||
void onObjectDoubleClicked(const QModelIndex& index);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showCharacterWindow
|
||||
\param lpCharacter
|
||||
*/
|
||||
void showCharacterWindow(cCharacter* lpCharacter);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showPlaceWindow
|
||||
\param lpPlace
|
||||
*/
|
||||
void showPlaceWindow(cPlace* lpPlace);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn showObjectWindow
|
||||
\param lpObject
|
||||
*/
|
||||
void showObjectWindow(cObject* lpObject);
|
||||
|
||||
private:
|
||||
Ui::cSceneWindow* ui;
|
||||
QStandardItemModel* m_lpCharacterModel;
|
||||
QStandardItemModel* m_lpPlaceModel;
|
||||
QStandardItemModel* m_lpObjectModel;
|
||||
cScene* m_lpScene;
|
||||
Ui::cSceneWindow* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpCharacterModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpPlaceModel; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpObjectModel; /*!< TODO: describe */
|
||||
cScene* m_lpScene; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CSCENEWINDOW_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cstorybook.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cstorybook.h"
|
||||
#include "common.h"
|
||||
|
||||
|
||||
+178
-12
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cstorybook.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CSTORYBOOK_H
|
||||
#define CSTORYBOOK_H
|
||||
|
||||
@@ -21,53 +26,214 @@
|
||||
#include <QSqlDatabase>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cStoryBook cstorybook.h "cstorybook.h"
|
||||
*/
|
||||
class cStoryBook : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cStoryBook
|
||||
\param szProject
|
||||
\param parent
|
||||
*/
|
||||
explicit cStoryBook(const QString& szProject, QObject *parent = nullptr);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn ~cStoryBook
|
||||
*/
|
||||
~cStoryBook();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn openDatabase
|
||||
\return bool
|
||||
*/
|
||||
bool openDatabase();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn verify
|
||||
\return bool
|
||||
*/
|
||||
bool verify();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn title
|
||||
\return QString
|
||||
*/
|
||||
QString title();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn author
|
||||
\return QString
|
||||
*/
|
||||
QString author();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fillOutlineList
|
||||
\param lpView
|
||||
\return bool
|
||||
*/
|
||||
bool fillOutlineList(QTreeView* lpView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fillCharacterList
|
||||
\param lpView
|
||||
\return bool
|
||||
*/
|
||||
bool fillCharacterList(QTreeView* lpView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fillPlaceList
|
||||
\param lpView
|
||||
\return bool
|
||||
*/
|
||||
bool fillPlaceList(QTreeView* lpView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fillObjectList
|
||||
\param lpView
|
||||
\return bool
|
||||
*/
|
||||
bool fillObjectList(QTreeView* lpView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fillRechercheList
|
||||
\param lpView
|
||||
\return bool
|
||||
*/
|
||||
bool fillRechercheList(QTreeView* lpView);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn chapterList
|
||||
\return cChapterList
|
||||
*/
|
||||
cChapterList* chapterList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn sceneList
|
||||
\return cSceneList
|
||||
*/
|
||||
cSceneList* sceneList();
|
||||
private:
|
||||
QString m_szProject;
|
||||
bool m_bIsOpen;
|
||||
QSqlDatabase m_db;
|
||||
cBook m_book;
|
||||
cPartList m_partList;
|
||||
cChapterList m_chapterList;
|
||||
cSceneList m_sceneList;
|
||||
cCharacterList m_characterList;
|
||||
cPlaceList m_placeList;
|
||||
cObjectList m_objectList;
|
||||
cRechercheList m_rechercheList;
|
||||
cImageList m_imageList;
|
||||
QString m_szProject; /*!< TODO: describe */
|
||||
bool m_bIsOpen; /*!< TODO: describe */
|
||||
QSqlDatabase m_db; /*!< TODO: describe */
|
||||
cBook m_book; /*!< TODO: describe */
|
||||
cPartList m_partList; /*!< TODO: describe */
|
||||
cChapterList m_chapterList; /*!< TODO: describe */
|
||||
cSceneList m_sceneList; /*!< TODO: describe */
|
||||
cCharacterList m_characterList; /*!< TODO: describe */
|
||||
cPlaceList m_placeList; /*!< TODO: describe */
|
||||
cObjectList m_objectList; /*!< TODO: describe */
|
||||
cRechercheList m_rechercheList; /*!< TODO: describe */
|
||||
cImageList m_imageList; /*!< TODO: describe */
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createDatabase
|
||||
\return bool
|
||||
*/
|
||||
bool createDatabase();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn updateDatabase
|
||||
\return bool
|
||||
*/
|
||||
bool updateDatabase();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn createTable
|
||||
\param szSQL
|
||||
\return bool
|
||||
*/
|
||||
bool createTable(const QString& szSQL);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadBook
|
||||
\return bool
|
||||
*/
|
||||
bool loadBook();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadPartList
|
||||
\return bool
|
||||
*/
|
||||
bool loadPartList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadChapterList
|
||||
\return bool
|
||||
*/
|
||||
bool loadChapterList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadSceneList
|
||||
\return bool
|
||||
*/
|
||||
bool loadSceneList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadCharacterList
|
||||
\return bool
|
||||
*/
|
||||
bool loadCharacterList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadPlaceList
|
||||
\return bool
|
||||
*/
|
||||
bool loadPlaceList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadObjectList
|
||||
\return bool
|
||||
*/
|
||||
bool loadObjectList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadRechercheList
|
||||
\return bool
|
||||
*/
|
||||
bool loadRechercheList();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn loadImageList
|
||||
\return bool
|
||||
*/
|
||||
bool loadImageList();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctextdocument.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ctextdocument.h"
|
||||
|
||||
#include <QVector>
|
||||
|
||||
+48
-1
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctextdocument.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CTEXTDOCUMENT_H
|
||||
#define CTEXTDOCUMENT_H
|
||||
|
||||
@@ -16,20 +21,62 @@ class QPrinter;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cTextDocument ctextdocument.h "ctextdocument.h"
|
||||
*/
|
||||
class cTextDocument : public QTextDocument
|
||||
{
|
||||
public:
|
||||
cTextDocument(QObject *parent = Q_NULLPTR);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cTextDocument
|
||||
\param text
|
||||
\param parent
|
||||
*/
|
||||
cTextDocument(const QString &text, QObject *parent = Q_NULLPTR);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn save
|
||||
\return bool
|
||||
*/
|
||||
bool save();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn saveAs
|
||||
\param szFileName
|
||||
\return bool
|
||||
*/
|
||||
bool saveAs(const QString& szFileName);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn printPreview
|
||||
\param lpPrinter
|
||||
*/
|
||||
void printPreview(QPrinter* lpPrinter);
|
||||
private:
|
||||
QString m_szFileName;
|
||||
QString m_szFileName; /*!< TODO: describe */
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn init
|
||||
*/
|
||||
void init();
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn saveDocument
|
||||
\return bool
|
||||
*/
|
||||
bool saveDocument();
|
||||
private slots:
|
||||
};
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctextedit.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "ctextedit.h"
|
||||
|
||||
+150
-1
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctextedit.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CTEXTEDIT_H
|
||||
#define CTEXTEDIT_H
|
||||
|
||||
@@ -8,51 +13,195 @@
|
||||
|
||||
class cMainWindow;
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cTextEdit ctextedit.h "ctextedit.h"
|
||||
*/
|
||||
class cTextEdit : public QTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
cTextEdit(QWidget* parent = Q_NULLPTR);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cTextEdit
|
||||
\param text
|
||||
\param parent
|
||||
*/
|
||||
cTextEdit(const QString& text, QWidget* parent = Q_NULLPTR);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn canInsertFromMimeData
|
||||
\param source
|
||||
\return bool
|
||||
*/
|
||||
bool canInsertFromMimeData(const QMimeData* source) const;
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn insertFromMimeData
|
||||
\param source
|
||||
*/
|
||||
void insertFromMimeData(const QMimeData* source);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpTextEdit
|
||||
*/
|
||||
void gotFocus(cTextEdit* lpTextEdit);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpTextEdit
|
||||
*/
|
||||
void lostFocus(cTextEdit* lpTextEdit);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn fontChanged
|
||||
\param font
|
||||
*/
|
||||
void fontChanged(const QFont& font);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn colorChanged
|
||||
\param color
|
||||
*/
|
||||
void colorChanged(const QColor& color);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn alignmentChanged
|
||||
\param alignment
|
||||
*/
|
||||
void alignmentChanged(const Qt::Alignment& alignment);
|
||||
|
||||
public slots:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextBold
|
||||
\param isChecked
|
||||
*/
|
||||
void onTextBold(bool isChecked);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextUnderline
|
||||
\param isChecked
|
||||
*/
|
||||
void onTextUnderline(bool isChecked);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextItalic
|
||||
\param isChecked
|
||||
*/
|
||||
void onTextItalic(bool isChecked);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextAlign
|
||||
\param a
|
||||
*/
|
||||
void onTextAlign(QAction *a);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextFamily
|
||||
\param f
|
||||
*/
|
||||
void onTextFamily(const QString &f);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextSize
|
||||
\param p
|
||||
*/
|
||||
void onTextSize(const QString &p);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextStyle
|
||||
\param styleIndex
|
||||
*/
|
||||
void onTextStyle(int styleIndex);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onTextColor
|
||||
*/
|
||||
void onTextColor();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCurrentCharFormatChanged
|
||||
\param format
|
||||
*/
|
||||
void onCurrentCharFormatChanged(const QTextCharFormat &format);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn onCursorPositionChanged
|
||||
*/
|
||||
void onCursorPositionChanged();
|
||||
|
||||
private:
|
||||
cMainWindow* m_lpMainWindow;
|
||||
cMainWindow* m_lpMainWindow; /*!< TODO: describe */
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn dropImage
|
||||
\param url
|
||||
\param image
|
||||
*/
|
||||
void dropImage(const QUrl& url, const QImage& image);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn dropTextFile
|
||||
\param url
|
||||
*/
|
||||
void dropTextFile(const QUrl& url);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn mergeFormatOnWordOrSelection
|
||||
\param format
|
||||
*/
|
||||
void mergeFormatOnWordOrSelection(const QTextCharFormat& format);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctreeview.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "ctreeview.h"
|
||||
|
||||
cTreeView::cTreeView(QWidget* parent) :
|
||||
|
||||
+34
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file ctreeview.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CTREEVIEW_H
|
||||
#define CTREEVIEW_H
|
||||
|
||||
@@ -6,6 +11,11 @@
|
||||
#include <QMetaType>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cTreeView ctreeview.h "ctreeview.h"
|
||||
*/
|
||||
class cTreeView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -14,11 +24,35 @@ public:
|
||||
cTreeView(QWidget* parent = Q_NULLPTR);
|
||||
|
||||
signals:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn gotFocus
|
||||
\param lpTreeView
|
||||
*/
|
||||
void gotFocus(cTreeView* lpTreeView);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn lostFocus
|
||||
\param lpTreeView
|
||||
*/
|
||||
void lostFocus(cTreeView* lpTreeView);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusInEvent
|
||||
\param event
|
||||
*/
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn focusOutEvent
|
||||
\param event
|
||||
*/
|
||||
void focusOutEvent(QFocusEvent *event);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cwidget.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cwidget.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file cwidget.h
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CWIDGET_H
|
||||
#define CWIDGET_H
|
||||
|
||||
@@ -14,10 +19,20 @@
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\class cWidget cwidget.h "cwidget.h"
|
||||
*/
|
||||
class cWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\enum TYPE
|
||||
*/
|
||||
enum TYPE
|
||||
{
|
||||
TYPE_unknown = 0,
|
||||
@@ -30,29 +45,101 @@ public:
|
||||
TYPE_recherche = 7,
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cPartWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cChapterWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cSceneWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cCharacterWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cObjectWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cPlaceWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(cRechercheWindow* parent);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn cWidget
|
||||
\param parent
|
||||
*/
|
||||
explicit cWidget(QWidget* parent);
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn widget
|
||||
\return QWidget
|
||||
*/
|
||||
QWidget* widget();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn setWindow
|
||||
\param lpWindow
|
||||
*/
|
||||
void setWindow(QMdiSubWindow* lpWindow);
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn window
|
||||
\return QMdiSubWindow
|
||||
*/
|
||||
QMdiSubWindow* window();
|
||||
|
||||
/*!
|
||||
\brief
|
||||
|
||||
\fn type
|
||||
\return TYPE
|
||||
*/
|
||||
TYPE type();
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
TYPE m_type;
|
||||
QWidget* m_lpWidget;
|
||||
QMdiSubWindow* m_lpWindow;
|
||||
TYPE m_type; /*!< TODO: describe */
|
||||
QWidget* m_lpWidget; /*!< TODO: describe */
|
||||
QMdiSubWindow* m_lpWindow; /*!< TODO: describe */
|
||||
};
|
||||
|
||||
#endif // CWIDGET_H
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/*!
|
||||
\file main.cpp
|
||||
|
||||
*/
|
||||
|
||||
#include "cmainwindow.h"
|
||||
#include <QApplication>
|
||||
#include <QSettings>
|
||||
|
||||
+2
-1
@@ -122,7 +122,8 @@ FORMS += \
|
||||
crecherchewindow.ui
|
||||
|
||||
DISTFILES += \
|
||||
storyBook.project
|
||||
storyBook.project \
|
||||
Doxyfile
|
||||
|
||||
RESOURCES += \
|
||||
qtstorywriter.qrc
|
||||
|
||||
Reference in New Issue
Block a user