2013-08-09 06:57:18 +02:00
|
|
|
#ifndef _LC_QMAINWINDOW_H_
|
|
|
|
#define _LC_QMAINWINDOW_H_
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QPrinter>
|
2013-08-16 01:43:18 +02:00
|
|
|
#include "lc_array.h"
|
2013-08-09 06:57:18 +02:00
|
|
|
#include "lc_commands.h"
|
|
|
|
|
|
|
|
class QComboBox;
|
|
|
|
class lcQGLWidget;
|
|
|
|
class lcQPartsTree;
|
|
|
|
class lcQColorList;
|
|
|
|
class lcQPropertiesTree;
|
2013-12-17 03:43:16 +01:00
|
|
|
class View;
|
2013-08-09 06:57:18 +02:00
|
|
|
|
|
|
|
class lcQMainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit lcQMainWindow(QWidget *parent = 0);
|
|
|
|
~lcQMainWindow();
|
|
|
|
|
|
|
|
void showPrintDialog();
|
|
|
|
|
|
|
|
void splitHorizontal();
|
|
|
|
void splitVertical();
|
|
|
|
void removeView();
|
|
|
|
void resetViews();
|
|
|
|
void togglePrintPreview();
|
|
|
|
void toggleFullScreen();
|
|
|
|
|
2014-08-07 17:22:33 +02:00
|
|
|
void updateFocusObject(lcObject *focus);
|
|
|
|
void updateSelectedObjects(int flags, int selectedCount, lcObject* focus);
|
2013-08-09 06:57:18 +02:00
|
|
|
void updateAction(int newAction);
|
|
|
|
void updatePaste(bool enabled);
|
2014-07-06 08:04:09 +02:00
|
|
|
void updateCurrentStep();
|
2014-05-21 00:15:42 +02:00
|
|
|
void setAddKeys(bool addKeys);
|
2013-08-09 06:57:18 +02:00
|
|
|
void updateLockSnap(lcuint32 snap);
|
|
|
|
void updateSnap();
|
|
|
|
void updateUndoRedo(const char* undoText, const char* redoText);
|
|
|
|
void updateTransformType(int newType);
|
2014-05-03 23:16:48 +02:00
|
|
|
void updateCameraMenu();
|
2013-08-09 06:57:18 +02:00
|
|
|
void updateCurrentCamera(int cameraIndex);
|
2013-12-17 03:43:16 +01:00
|
|
|
void updatePerspective(View* view);
|
2013-08-09 06:57:18 +02:00
|
|
|
void updateCategories();
|
|
|
|
void updateTitle(const char* title, bool modified);
|
|
|
|
void updateModified(bool modified);
|
|
|
|
void updateRecentFiles(const char** fileNames);
|
|
|
|
void updateShortcuts();
|
|
|
|
|
|
|
|
lcVector3 getTransformAmount();
|
|
|
|
|
|
|
|
QAction *actions[LC_NUM_COMMANDS];
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void print(QPrinter *printer);
|
|
|
|
void actionTriggered();
|
|
|
|
void partsTreeItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
|
|
|
void colorChanged(int colorIndex);
|
|
|
|
void partSearchReturn();
|
|
|
|
void partSearchChanged(const QString& text);
|
|
|
|
void clipboardChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void createActions();
|
|
|
|
void createMenus();
|
|
|
|
void createToolBars();
|
|
|
|
void createStatusBar();
|
|
|
|
void splitView(Qt::Orientation orientation);
|
|
|
|
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
QMenu *createPopupMenu();
|
|
|
|
|
|
|
|
QAction *actionFileRecentSeparator;
|
|
|
|
QMenu *menuCamera;
|
|
|
|
|
|
|
|
QMenu *menuFile;
|
|
|
|
QMenu *menuEdit;
|
|
|
|
QMenu *menuView;
|
|
|
|
QMenu *menuPiece;
|
|
|
|
QMenu *menuHelp;
|
|
|
|
|
|
|
|
QToolBar *standardToolBar;
|
|
|
|
QToolBar *toolsToolBar;
|
|
|
|
QToolBar *timeToolBar;
|
|
|
|
QDockWidget *partsToolBar;
|
|
|
|
QDockWidget *propertiesToolBar;
|
|
|
|
|
|
|
|
lcQGLWidget *piecePreview;
|
|
|
|
lcQPartsTree *partsTree;
|
|
|
|
QLineEdit *partSearch;
|
|
|
|
lcQColorList *colorList;
|
|
|
|
lcQPropertiesTree *propertiesWidget;
|
|
|
|
QLineEdit *transformX;
|
|
|
|
QLineEdit *transformY;
|
|
|
|
QLineEdit *transformZ;
|
|
|
|
|
|
|
|
QStatusBar *statusBar;
|
|
|
|
QLabel *statusBarLabel;
|
|
|
|
QLabel *statusPositionLabel;
|
|
|
|
QLabel *statusSnapLabel;
|
|
|
|
QLabel *statusTimeLabel;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _LC_QMAINWINDOW_H_
|