Blame toonz/sources/include/tools/imagegrouping.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef IMAGE_GROUPING_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define IMAGE_GROUPING_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
#include <qobject></qobject>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class StrokeSelection;
|
|
Toshihiro Shimizu |
890ddd |
class QMenu;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZTOOLS_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI TGroupCommand final : public QObject {
|
|
Shinya Kitaoka |
120a6e |
Q_OBJECT
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
enum {
|
|
Shinya Kitaoka |
120a6e |
NONE = 0,
|
|
Shinya Kitaoka |
120a6e |
FRONT = 1,
|
|
Shinya Kitaoka |
120a6e |
FORWARD = 2,
|
|
Shinya Kitaoka |
120a6e |
BACKWARD = 4,
|
|
Shinya Kitaoka |
120a6e |
BACK = 8,
|
|
Shinya Kitaoka |
120a6e |
GROUP = 16,
|
|
Shinya Kitaoka |
120a6e |
UNGROUP = 32
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
StrokeSelection *m_sel;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TGroupCommand() : m_sel(0) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setSelection(StrokeSelection *sel) { m_sel = sel; }
|
|
Shinya Kitaoka |
120a6e |
UCHAR getGroupingOptions();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void addMenuItems(QMenu *menu);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void back() {
|
|
Shinya Kitaoka |
120a6e |
if (!(getGroupingOptions() & BACK)) return;
|
|
Shinya Kitaoka |
120a6e |
moveGroup(BACK);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void backward() {
|
|
Shinya Kitaoka |
120a6e |
if (!(getGroupingOptions() & BACKWARD)) return;
|
|
Shinya Kitaoka |
120a6e |
moveGroup(BACKWARD);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void front() {
|
|
Shinya Kitaoka |
120a6e |
if (!(getGroupingOptions() & FRONT)) return;
|
|
Shinya Kitaoka |
120a6e |
moveGroup(FRONT);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void forward() {
|
|
Shinya Kitaoka |
120a6e |
if (!(getGroupingOptions() & FORWARD)) return;
|
|
Shinya Kitaoka |
120a6e |
moveGroup(FORWARD);
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
void group();
|
|
Shinya Kitaoka |
120a6e |
void ungroup();
|
|
Shinya Kitaoka |
120a6e |
void enterGroup();
|
|
Shinya Kitaoka |
120a6e |
void exitGroup();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
void moveGroup(UCHAR moveType);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|