129 lines
2.8 KiB
C++
129 lines
2.8 KiB
C++
#ifndef FORMSCENEDLG_H
|
|
#define FORMSCENEDLG_H
|
|
|
|
#include <QWidget>
|
|
#include <QGraphicsView>
|
|
#include <QKeyEvent>
|
|
//#include <QWSServer>
|
|
#include <QBoxLayout>
|
|
#include <QTimer>
|
|
#include <QLabel>
|
|
#include <QTextEdit>
|
|
#include <QFontDatabase>
|
|
#include <qmath.h>
|
|
#include "picscene.h"
|
|
#include "DialogFileOperation.h"
|
|
#include "pictextitem.h"
|
|
#include "myinclude.h"
|
|
#include "Public.h"
|
|
namespace Ui {
|
|
class FormScenedlg;
|
|
}
|
|
|
|
class FormScenedlg : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FormScenedlg(QWidget *parent = 0);
|
|
~FormScenedlg();
|
|
void bindScene(PicScene *pPicScene, QGraphicsView *pGraphicViewer,QTextEdit *pTextEdit);
|
|
|
|
|
|
static void showQLayout(QLayout *layout, bool visible=true);
|
|
static QObject *findChildAll(const QLayout *layout, const QString &name);
|
|
void Layout_ToNew();
|
|
void Layout_ToDefault();
|
|
public slots:
|
|
//void onSceneRectChanged(const QString &text);
|
|
protected:
|
|
void changeEvent(QEvent *e);
|
|
|
|
signals:
|
|
void delButton();
|
|
void saveButton();
|
|
void openfileButton();
|
|
void previewButton();
|
|
void addButton();
|
|
void EditItemButton();
|
|
void saveAsButton();
|
|
void newfileButton();
|
|
void enlargeButton();
|
|
void reduceButton();
|
|
void ZoomOrigin();
|
|
void btn_test2();
|
|
void insertImage(QString,bool);
|
|
private slots:
|
|
void on_addButton_clicked();
|
|
|
|
void on_EditItemButton_clicked();
|
|
|
|
void on_delButton_clicked();
|
|
|
|
void on_newfileButton_clicked();
|
|
|
|
void on_openfileButton_clicked();
|
|
|
|
void on_previewButton_clicked();
|
|
|
|
void on_saveButton_clicked();
|
|
|
|
void on_saveAsButton_clicked();
|
|
|
|
void on_enlargeButton_clicked();
|
|
|
|
void on_reduceButton_clicked();
|
|
|
|
void on_KeyLeft_clicked();
|
|
|
|
void on_KeyUp_clicked();
|
|
|
|
void on_KeyRight_clicked();
|
|
|
|
void on_KeyDown_clicked();
|
|
|
|
void on_insertImage_clicked();
|
|
|
|
void on_ZoomOrigin_clicked();
|
|
|
|
void on_btn_test2_clicked();
|
|
|
|
void on_itemNext_clicked();
|
|
|
|
void on_itemPrev_clicked();
|
|
|
|
void PrintselectedItemInfo();
|
|
void adjustItemsPos(bool bMoveScrollBar=true);
|
|
void adjustItemsPosFalse(){adjustItemsPos(false);}
|
|
void sceneRectChanged_timerHandler();
|
|
void verticalScrollBar_valueChanged(int value);
|
|
void horizontalScrollBar_valueChanged(int value);
|
|
void onFileOpen(QString filePath, bool insertFlag);
|
|
void reset_showTextWidthHeight();
|
|
void on_itemFirst_clicked();
|
|
|
|
void on_itemLast_clicked();
|
|
|
|
|
|
private:
|
|
Ui::FormScenedlg *ui;
|
|
PicScene *pPicScene;
|
|
QGraphicsView *pViewer;
|
|
|
|
QSize SWmaximumSize1;
|
|
QRect SWgeometry1;
|
|
QRect FVgeometry2;
|
|
QRect GVgeometry3;
|
|
QPoint lastOriginScene;
|
|
QWidget *tabMainWindow;
|
|
DialogFileOperation *dialogFileOperation;
|
|
QTextEdit *textEdit;
|
|
PicTextItem *textItem;
|
|
|
|
|
|
// QWidget interface
|
|
protected:
|
|
};
|
|
|
|
#endif // FORMSCENEDLG_H
|