22 #include <dtkCoreSupport/dtkGlobal.h>
24 #include <dtkGuiSupport/dtkSpacer.h>
28 class axlInspectorSidePanePrivate
31 QAction *side_pane_action_world_camera;
32 QAction *side_pane_action_object_camera;
33 QAction *side_pane_action_joystick_interactor;
34 QAction *side_pane_action_trackball_interactor;
35 QAction *side_pane_action_settings;
36 QAction *side_pane_action_switch_fullScreen_normal;
41 d->side_pane_action_world_camera =
new QAction(
"World mode",
this);
42 d->side_pane_action_world_camera->setShortcut(Qt::Key_C);
43 d->side_pane_action_world_camera->setCheckable(
true);
44 d->side_pane_action_world_camera->setChecked(
true);
45 d->side_pane_action_world_camera->setToolTip(
"Set world mode");
46 d->side_pane_action_world_camera->setIcon(QPixmap(
":axlGui/pixmaps/video-camera.png"));
48 d->side_pane_action_object_camera =
new QAction(
"Object mode",
this);
49 d->side_pane_action_object_camera->setShortcut(Qt::Key_A);
50 d->side_pane_action_object_camera->setCheckable(
true);
51 d->side_pane_action_object_camera->setChecked(
false);
52 d->side_pane_action_object_camera->setToolTip(
"Set object mode");
53 d->side_pane_action_object_camera->setIcon(QPixmap(
":axlGui/pixmaps/emblem-generic.png"));
55 d->side_pane_action_trackball_interactor =
new QAction(
"Trackball mode",
this);
56 d->side_pane_action_trackball_interactor->setShortcut(Qt::Key_T);
57 d->side_pane_action_trackball_interactor->setCheckable(
true);
58 d->side_pane_action_trackball_interactor->setChecked(
true);
59 d->side_pane_action_trackball_interactor->setToolTip(
"Set trackball mode");
60 d->side_pane_action_trackball_interactor->setIcon(QPixmap(
":axlGui/pixmaps/applications-science.png"));
62 d->side_pane_action_joystick_interactor =
new QAction(
"Joystick mode",
this);
63 d->side_pane_action_joystick_interactor->setShortcut(Qt::Key_J);
64 d->side_pane_action_joystick_interactor->setCheckable(
true);
65 d->side_pane_action_joystick_interactor->setChecked(
false);
66 d->side_pane_action_joystick_interactor->setToolTip(
"Set joytick mode");
67 d->side_pane_action_joystick_interactor->setIcon(QPixmap(
":axlGui/pixmaps/applications-games.png"));
69 d->side_pane_action_settings =
new QAction(
"Setting...",
this);
70 d->side_pane_action_settings->setShortcut(Qt::ControlModifier + Qt::AltModifier + Qt::Key_I);
71 d->side_pane_action_settings->setCheckable(
true);
72 d->side_pane_action_settings->setChecked(
false);
73 d->side_pane_action_settings->setToolTip(
"Configure Axel");
74 d->side_pane_action_settings->setIcon(QPixmap(
":axlGui/pixmaps/applications-engineering.png"));
76 d->side_pane_action_switch_fullScreen_normal =
new QAction(QIcon(QPixmap(
":axlGui/pixmaps/view-fullscreen.png")), QString(
"Show fullscreen"),
this);
77 d->side_pane_action_switch_fullScreen_normal->setShortcut(Qt::ControlModifier + Qt::Key_F);
79 QActionGroup *camera_action_group =
new QActionGroup(
this);
80 camera_action_group->addAction(d->side_pane_action_world_camera);
81 camera_action_group->addAction(d->side_pane_action_object_camera);
82 camera_action_group->setExclusive(
true);
84 QActionGroup *interactor_action_group =
new QActionGroup(
this);
85 interactor_action_group->addAction(d->side_pane_action_trackball_interactor);
86 interactor_action_group->addAction(d->side_pane_action_joystick_interactor);
87 interactor_action_group->setExclusive(
true);
89 QAction *inspectorAction =
new QAction(
"Inspector",
this);
90 inspectorAction->setIcon(QIcon(
":axlGui/pixmaps/info2.png"));
91 inspectorAction->setShortcut(Qt::ControlModifier + Qt::Key_I);
92 inspectorAction->setCheckable(
true);
93 inspectorAction->setChecked(
false);
95 this->addAction(inspectorAction);
96 this->addWidget(
new dtkSpacer(
this, 0, 50));
97 this->addAction(d->side_pane_action_world_camera);
98 this->addAction(d->side_pane_action_object_camera);
99 this->addAction(d->side_pane_action_trackball_interactor);
100 this->addAction(d->side_pane_action_joystick_interactor);
101 this->addWidget(
new dtkSpacer(
this));
102 this->addAction(d->side_pane_action_settings);
103 this->addWidget(
new dtkSpacer(
this, 0, 50));
104 this->addAction(d->side_pane_action_switch_fullScreen_normal);
106 this->setFloatable(
false);
107 this->setIconSize(QSize(24, 24));
108 this->setMovable(
false);
109 this->setOrientation(Qt::Vertical);
110 this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
111 this->setStyleSheet(dtkReadFile(
":axlGui/axlInspectorSidePane.qss"));
113 connect(d->side_pane_action_world_camera, SIGNAL(triggered()),
this, SIGNAL(
worldCamera()));
114 connect(d->side_pane_action_object_camera, SIGNAL(triggered()),
this, SIGNAL(
objectCamera()));
115 connect(d->side_pane_action_trackball_interactor, SIGNAL(triggered()),
this, SIGNAL(
trackballCamera()));
116 connect(d->side_pane_action_joystick_interactor, SIGNAL(triggered()),
this, SIGNAL(
joystickCamera()));
117 connect(d->side_pane_action_settings, SIGNAL(triggered(
bool)),
this, SIGNAL(
showSettings(
bool)));
118 connect(d->side_pane_action_switch_fullScreen_normal, SIGNAL(triggered()),
this, SIGNAL(
switchFullScreen()));
120 connect(inspectorAction, SIGNAL(triggered(
bool)),
this, SIGNAL(
showInspector(
bool)));
132 return QSize(30, 100);
axlInspectorSidePane(QWidget *parent=0)
~axlInspectorSidePane(void)
void trackballCamera(void)
void joystickCamera(void)
QSize sizeHint(void) const
void switchFullScreen(void)