21#include "ui_qavimator.h"
37#define ANIM_FILTER "Animation Files (*.avm *.bvh)"
38#define PROP_FILTER "Props (*.prp)"
41#define SVN_ID "$Id: qavimator.cpp,v 1.1 2014/12/19 10:33:13 dperrone Exp $"
50 ui->animationView->init(config);
60 if (config.check(
"name")){
61 GUI_NAME=std::string(config.find(
"name").asString().c_str());
66 if (config.check(
"width")){
67 width=config.find(
"width").asInt32();
69 if (config.check(
"height")){
70 height=config.find(
"height").asInt32();
81 this->resize(width, height);
84 if (config.check(
"xpos")){
85 xpos=config.find(
"xpos").asInt32();
87 if (config.check(
"ypos")){
88 ypos=config.find(
"ypos").asInt32();
90 this->move(xpos,ypos);
97 ui->animationView->startTimer(1000/nFPS);
115 QToolBar *toolBar = ui->toolBar;
116 QLabel *label =
new QLabel(
"FPS:",
this);
117 QSpinBox *fpsSpin =
new QSpinBox(
this);
118 fpsSpin->setMaximum(1);
119 fpsSpin->setMaximum(50);
120 fpsSpin->setValue(10);
121 QIcon ico = QIcon(
":/icons/resetcamera.png");
122 QPushButton *
resetCamera =
new QPushButton(ico,
"",
this);
123 resetCamera->setToolTip(
"Reset camera view to default position");
124 toolBar->addWidget(label);
125 toolBar->addWidget(fpsSpin);
126 toolBar->addSeparator();
136 QSettings settings(
"iCub",
"iCubGui");
137 settings.beginGroup(
"/qavimator");
150 bool settingsFound=settings.value(
"/settings").toBool();
152 width=settings.value(
"/mainwindow_width").toInt();
153 height=settings.value(
"/mainwindow_height").toInt();
159 figureType=settings.value(
"/figure").toInt();
182 QSettings settings(
"iCub",
"iCubGui");
183 settings.beginGroup(
"/qavimator");
186 settings.setValue(
"/settings",
true);
189 settings.setValue(
"/mainwindow_width",size().width());
190 settings.setValue(
"/mainwindow_height",size().height());
204 ui->animationView->stopTimer();
222 ui->animationView->repaint();
228 QMessageBox::about(
this,QObject::tr(
"About iCubGui"),QObject::tr(
"iCubGui - joint gui for iCub<br />%1").arg(
SVN_ID));
235 ui->animationView->stopTimer();
270 qDebug(
"qavimator::setFPS(%d)",fps);
271 if (fps<1) fps=1;
else if (fps>50) fps=50;
274 ui->animationView->stopTimer();
275 ui->animationView->startTimer(1000/nFPS);
static void setEaseIn(bool on)
static void setFog(bool on)
static void setEaseOut(bool on)
static void setFloorTranslucency(int value)
static int floorTranslucency()
void enableRotation(bool)
void onFpsSpinValueChanged(int num)
void on_optionsConfigureiCubGUIAction_triggered()
void on_helpAboutAction_triggered()
virtual void closeEvent(QCloseEvent *event)
qavimator(yarp::os::ResourceFinder &config, QWidget *parent=0)
void on_fileExitAction_triggered()