2018-10-25 00:19:38 +00:00
|
|
|
#ifndef DUST3D_DOCUMENT_WINDOW_H
|
|
|
|
#define DUST3D_DOCUMENT_WINDOW_H
|
2018-04-07 08:44:39 +00:00
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QShowEvent>
|
2018-04-08 08:05:12 +00:00
|
|
|
#include <QPushButton>
|
2018-04-10 07:59:20 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QAction>
|
|
|
|
#include <QTextBrowser>
|
2018-10-25 00:19:38 +00:00
|
|
|
#include "document.h"
|
2018-04-07 08:44:39 +00:00
|
|
|
#include "modelwidget.h"
|
2018-05-10 09:16:22 +00:00
|
|
|
#include "exportpreviewwidget.h"
|
2018-09-14 09:45:05 +00:00
|
|
|
#include "rigwidget.h"
|
2018-10-25 00:19:38 +00:00
|
|
|
#include "bonemark.h"
|
2018-09-21 07:10:18 +00:00
|
|
|
#include "posemanagewidget.h"
|
2018-09-22 10:31:02 +00:00
|
|
|
#include "advancesettingwidget.h"
|
2018-04-07 08:44:39 +00:00
|
|
|
|
2018-04-10 07:59:20 +00:00
|
|
|
class SkeletonGraphicsWidget;
|
|
|
|
|
2018-11-05 15:47:21 +00:00
|
|
|
class DocumentWindow : public QMainWindow
|
2018-04-07 08:44:39 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
|
|
void initialized();
|
|
|
|
public:
|
2018-11-05 15:47:21 +00:00
|
|
|
DocumentWindow();
|
|
|
|
~DocumentWindow();
|
|
|
|
static DocumentWindow *createDocumentWindow();
|
2018-04-10 07:59:20 +00:00
|
|
|
static void showAcknowlegements();
|
2018-08-27 08:50:40 +00:00
|
|
|
static void showContributors();
|
2018-04-10 07:59:20 +00:00
|
|
|
static void showAbout();
|
2018-04-07 08:44:39 +00:00
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
2018-04-10 07:59:20 +00:00
|
|
|
void closeEvent(QCloseEvent *event);
|
2018-04-13 01:42:19 +00:00
|
|
|
void mousePressEvent(QMouseEvent *event);
|
2018-04-07 08:44:39 +00:00
|
|
|
public slots:
|
|
|
|
void changeTurnaround();
|
2018-04-10 07:59:20 +00:00
|
|
|
void save();
|
|
|
|
void saveTo(const QString &saveAsFilename);
|
|
|
|
void open();
|
2019-03-01 13:04:46 +00:00
|
|
|
void openExample();
|
2018-09-05 03:14:36 +00:00
|
|
|
void exportObjResult();
|
2018-10-25 09:18:04 +00:00
|
|
|
void exportGlbResult();
|
2018-10-20 05:07:11 +00:00
|
|
|
void exportFbxResult();
|
2018-05-10 09:16:22 +00:00
|
|
|
void showExportPreview();
|
2018-04-10 07:59:20 +00:00
|
|
|
void newWindow();
|
|
|
|
void newDocument();
|
|
|
|
void saveAs();
|
|
|
|
void saveAll();
|
|
|
|
void viewSource();
|
|
|
|
void about();
|
|
|
|
void reportIssues();
|
|
|
|
void seeAcknowlegements();
|
2018-08-27 08:50:40 +00:00
|
|
|
void seeContributors();
|
2018-04-18 13:18:10 +00:00
|
|
|
void seeReferenceGuide();
|
2018-04-10 07:59:20 +00:00
|
|
|
void documentChanged();
|
2018-04-16 22:54:41 +00:00
|
|
|
void updateXlockButtonState();
|
|
|
|
void updateYlockButtonState();
|
|
|
|
void updateZlockButtonState();
|
2018-09-08 04:20:31 +00:00
|
|
|
void updateRadiusLockButtonState();
|
2018-09-18 14:23:28 +00:00
|
|
|
void updateRigWeightRenderWidget();
|
2018-09-21 07:10:18 +00:00
|
|
|
void registerDialog(QWidget *widget);
|
|
|
|
void unregisterDialog(QWidget *widget);
|
2018-09-22 10:31:02 +00:00
|
|
|
void showAdvanceSetting();
|
2018-04-08 08:05:12 +00:00
|
|
|
private:
|
2018-04-16 22:54:41 +00:00
|
|
|
void initLockButton(QPushButton *button);
|
2018-04-10 07:59:20 +00:00
|
|
|
void setCurrentFilename(const QString &filename);
|
|
|
|
void updateTitle();
|
2018-04-07 08:44:39 +00:00
|
|
|
private:
|
2018-10-25 00:19:38 +00:00
|
|
|
Document *m_document;
|
2018-04-07 08:44:39 +00:00
|
|
|
bool m_firstShow;
|
2018-04-16 22:54:41 +00:00
|
|
|
bool m_documentSaved;
|
2018-05-10 09:16:22 +00:00
|
|
|
ExportPreviewWidget *m_exportPreviewWidget;
|
2018-09-22 10:31:02 +00:00
|
|
|
AdvanceSettingWidget *m_advanceSettingWidget;
|
2018-09-21 07:10:18 +00:00
|
|
|
std::vector<QWidget *> m_dialogs;
|
2019-01-07 13:03:42 +00:00
|
|
|
bool m_isLastMeshGenerationSucceed;
|
2018-04-16 22:54:41 +00:00
|
|
|
private:
|
|
|
|
QString m_currentFilename;
|
|
|
|
|
2018-04-30 11:31:09 +00:00
|
|
|
ModelWidget *m_modelRenderWidget;
|
2018-04-10 07:59:20 +00:00
|
|
|
SkeletonGraphicsWidget *m_graphicsWidget;
|
2018-09-18 14:23:28 +00:00
|
|
|
RigWidget *m_rigWidget;
|
2018-04-10 07:59:20 +00:00
|
|
|
|
|
|
|
QMenu *m_fileMenu;
|
|
|
|
QAction *m_newWindowAction;
|
|
|
|
QAction *m_newDocumentAction;
|
|
|
|
QAction *m_openAction;
|
2019-03-01 13:04:46 +00:00
|
|
|
QAction *m_openExampleAction;
|
2018-04-10 07:59:20 +00:00
|
|
|
QAction *m_saveAction;
|
|
|
|
QAction *m_saveAsAction;
|
|
|
|
QAction *m_saveAllAction;
|
2018-04-26 02:23:22 +00:00
|
|
|
QMenu *m_exportMenu;
|
2018-04-10 07:59:20 +00:00
|
|
|
QAction *m_changeTurnaroundAction;
|
|
|
|
|
2018-09-05 03:14:36 +00:00
|
|
|
QAction *m_exportAsObjAction;
|
|
|
|
QAction *m_exportAsObjPlusMaterialsAction;
|
2018-09-14 09:45:05 +00:00
|
|
|
QAction *m_exportAction;
|
|
|
|
QAction *m_exportRenderedAsImageAction;
|
2018-04-26 02:23:22 +00:00
|
|
|
|
2018-04-10 07:59:20 +00:00
|
|
|
QMenu *m_editMenu;
|
|
|
|
QAction *m_addAction;
|
|
|
|
QAction *m_undoAction;
|
|
|
|
QAction *m_redoAction;
|
|
|
|
QAction *m_deleteAction;
|
2018-04-12 12:27:21 +00:00
|
|
|
QAction *m_breakAction;
|
2018-04-12 12:46:13 +00:00
|
|
|
QAction *m_connectAction;
|
2018-04-10 07:59:20 +00:00
|
|
|
QAction *m_cutAction;
|
|
|
|
QAction *m_copyAction;
|
|
|
|
QAction *m_pasteAction;
|
|
|
|
QAction *m_flipHorizontallyAction;
|
|
|
|
QAction *m_flipVerticallyAction;
|
2018-06-15 09:58:46 +00:00
|
|
|
QAction *m_rotateClockwiseAction;
|
|
|
|
QAction *m_rotateCounterclockwiseAction;
|
2018-06-21 08:24:18 +00:00
|
|
|
QAction *m_switchXzAction;
|
2018-06-02 09:34:48 +00:00
|
|
|
|
|
|
|
QMenu *m_alignToMenu;
|
|
|
|
QAction *m_alignToGlobalCenterAction;
|
|
|
|
QAction *m_alignToGlobalVerticalCenterAction;
|
|
|
|
QAction *m_alignToGlobalHorizontalCenterAction;
|
|
|
|
QAction *m_alignToLocalCenterAction;
|
|
|
|
QAction *m_alignToLocalVerticalCenterAction;
|
|
|
|
QAction *m_alignToLocalHorizontalCenterAction;
|
|
|
|
|
2018-04-10 07:59:20 +00:00
|
|
|
QAction *m_selectAllAction;
|
|
|
|
QAction *m_selectPartAllAction;
|
|
|
|
QAction *m_unselectAllAction;
|
|
|
|
|
2018-09-14 09:45:05 +00:00
|
|
|
QMenu *m_markAsMenu;
|
|
|
|
QAction *m_markAsNoneAction;
|
2018-10-25 00:19:38 +00:00
|
|
|
QAction *m_markAsActions[(int)BoneMark::Count - 1];
|
2018-09-14 09:45:05 +00:00
|
|
|
|
2018-04-10 07:59:20 +00:00
|
|
|
QMenu *m_viewMenu;
|
|
|
|
QAction *m_resetModelWidgetPosAction;
|
2018-04-15 12:48:54 +00:00
|
|
|
QAction *m_toggleWireframeAction;
|
2018-09-07 12:51:33 +00:00
|
|
|
QAction *m_toggleSmoothNormalAction;
|
2018-08-27 08:50:40 +00:00
|
|
|
QAction *m_showMotionsListAction;
|
2018-04-10 07:59:20 +00:00
|
|
|
|
2018-09-14 09:45:05 +00:00
|
|
|
QMenu *m_windowMenu;
|
|
|
|
QAction *m_showPartsListAction;
|
|
|
|
QAction *m_showDebugDialogAction;
|
2018-10-09 02:19:12 +00:00
|
|
|
QAction *m_showMaterialsAction;
|
2018-09-14 09:45:05 +00:00
|
|
|
QAction *m_showRigAction;
|
2018-09-21 08:14:37 +00:00
|
|
|
QAction *m_showPosesAction;
|
2018-10-02 04:59:30 +00:00
|
|
|
QAction *m_showMotionsAction;
|
2018-09-22 10:31:02 +00:00
|
|
|
QAction *m_showAdvanceSettingAction;
|
2018-09-14 09:45:05 +00:00
|
|
|
|
2018-04-10 07:59:20 +00:00
|
|
|
QMenu *m_helpMenu;
|
|
|
|
QAction *m_viewSourceAction;
|
|
|
|
QAction *m_aboutAction;
|
|
|
|
QAction *m_reportIssuesAction;
|
2018-08-27 08:50:40 +00:00
|
|
|
QAction *m_seeContributorsAction;
|
2018-04-10 07:59:20 +00:00
|
|
|
QAction *m_seeAcknowlegementsAction;
|
2018-04-18 13:18:10 +00:00
|
|
|
QAction *m_seeReferenceGuideAction;
|
2018-04-16 22:54:41 +00:00
|
|
|
|
|
|
|
QPushButton *m_xlockButton;
|
|
|
|
QPushButton *m_ylockButton;
|
|
|
|
QPushButton *m_zlockButton;
|
2018-09-08 04:20:31 +00:00
|
|
|
QPushButton *m_radiusLockButton;
|
2018-04-30 11:31:09 +00:00
|
|
|
|
2018-05-10 09:16:22 +00:00
|
|
|
QMetaObject::Connection m_partListDockerVisibleSwitchConnection;
|
2018-04-30 11:31:09 +00:00
|
|
|
public:
|
|
|
|
static int m_modelRenderWidgetInitialX;
|
|
|
|
static int m_modelRenderWidgetInitialY;
|
|
|
|
static int m_modelRenderWidgetInitialSize;
|
|
|
|
static int m_skeletonRenderWidgetInitialX;
|
|
|
|
static int m_skeletonRenderWidgetInitialY;
|
|
|
|
static int m_skeletonRenderWidgetInitialSize;
|
2018-04-07 08:44:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|