PDA

View Full Version : Project interface idea



robel
9th September 2015, 14:08
Hi,
i don't have real programation problem
what i need is an idea on how i design an interface
i designed my first version of interface (in the attachement)
11363
now i want to add another fonctionality to the interface but i do not know where i must add it to stay my interface elegant.
In the Object->addCharacter i will see in the gui an character
the character as we know have many joint (articulaition) i want to made an interface that dispaly a the character articulation and when i select an articulation i see an interface to enter the limits angle in x,y and z
i just whant design of tthis ineterface not the prgrammation , can somone helped me and change my interafce

Added after 1 20 minutes:

Hi,
i suceffuly display the character joint names using this code

QStandardItem *item=new QStandardItem(/*QString*/ (skel->getBone(i)->getName().c_str()));


emit itemAded(item,0);



--
void MainWindow::itemAded( QStandardItem *mItem,int i )
{
cout<<"iam in itemAded";
pItem[i]->appendRow( mItem );
}

it stay to when i clic on the names i see an interafce to inter the value of x, y and z
how i add this functionnality ? and keep a good interface

robel
9th September 2015, 20:11
Hi,,
taht's the code of my interface

void MainWindow::createDockWidget()
{
dockWidgetContents_5 = new QWidget(this);
dockWidgetContents_5->setObjectName(QString::fromUtf8("dockWidgetContents_5"));

dockWidgetContents_8 = new QWidget();
dockWidgetContents_8->setObjectName(QString::fromUtf8("dockWidgetContents_8"));

dockWidget_2 = new QDockWidget(this);
dockWidget_2->setObjectName(QString::fromUtf8("dockWidget_2"));
dockWidget_2->setGeometry(QRect(0, 0, 211, 361));
dockWidget_2->setMinimumSize(QSize(183, 327));
dockWidget_2->setWidget(dockWidgetContents_5);
dockWidget_2->raise();
dockWidget_2->setWindowTitle(QApplication::translate("MainWindow", "Tools", 0, QApplication::UnicodeUTF8));
dockWidget_2->setFloating(false);


dockWidget_5 = new QDockWidget(this);
dockWidget_5->setObjectName(QString::fromUtf8("dockWidget_5"));
dockWidget_5->setWidget(dockWidgetContents_8);
addDockWidget(static_cast<Qt::DockWidgetArea>(2), dockWidget_5);
dockWidget_5->setWindowTitle(QApplication::translate("MainWindow", "Object liste", 0, QApplication::UnicodeUTF8));
dockWidget_5->setFloating(false);
dockWidget_5->raise();
page_13 = new QWidget(this);
page_13->setObjectName(QString::fromUtf8("page_13"));
page_13->setGeometry(QRect(0, 0, 98, 28));


page_14 = new Coordinate3dWidget;
page_14->setGeometry(QRect(0, 0, 211, 250));




page_15 = new QWidget(this);
page_15->setObjectName(QString::fromUtf8("page_15"));
page_15->setGeometry(QRect(0, 0, 211, 250));


toolBox_5 = new QToolBox(dockWidgetContents_5);
toolBox_5->setObjectName(QString::fromUtf8("toolBox_5"));
toolBox_5->setGeometry(QRect(0, 0, 211, 331));
toolBox_5->setAutoFillBackground(false);
toolBox_5->setFrameShape(QFrame::NoFrame);
toolBox_5->setFrameShadow(QFrame::Plain);
toolBox_5->addItem(page_13, QString::fromUtf8("Object"));
toolBox_5->addItem(page_14, QString::fromUtf8("Camera"));
toolBox_5->addItem(page_15, QString::fromUtf8("Movement"));
toolBox_5->setCurrentIndex(1);
toolBox_5->setItemText(toolBox_5->indexOf(page_13), QApplication::translate("MainWindow", "Object", 0, QApplication::UnicodeUTF8));
toolBox_5->setItemText(toolBox_5->indexOf(page_14), QApplication::translate("MainWindow", "Camera", 0, QApplication::UnicodeUTF8));
toolBox_5->setItemText(toolBox_5->indexOf(page_15), QApplication::translate("MainWindow", "Movement", 0, QApplication::UnicodeUTF8));



groupBox_7 = new QGroupBox(page_14);
groupBox_7->setObjectName(QString::fromUtf8("groupBox_7"));
groupBox_7->setGeometry(QRect(10, 130, 191, 51));
groupBox_7->setTitle(QApplication::translate("MainWindow", "Orientation", 0, QApplication::UnicodeUTF8));

///////////////////////////////

cube=new QToolButton(page_13);
cube->setGeometry(QRect(10, 70, 101, 91));
cube->setIcon(QIcon("E:/project/image/cc.jpg"));
foreach(QString imageType, QImageReader::supportedImageFormats())
qDebug() << imageType;

add_O = new QToolButton(page_13);
add_O->setGeometry(QRect(10, 10, 61, 31))/*setGeometry(QRect(0, 10, 71, 31))*/;
add_O->setText(QApplication::translate("MainWindow", "Ajouter", 0, QApplication::UnicodeUTF8));
add_O->setCheckable(true);
////////////////////////////////////////////////connexion create scene///////////////
connect(add_O, SIGNAL(clicked()),mQOgreWidget,SLOT(createScene()) );

/////////////////////////////////////////////////////////////////////////////////////
repo_O = new QToolButton(page_13);
repo_O->setObjectName(QString::fromUtf8("repo_O"));
repo_O->setGeometry(QRect(80, 10, 71, 31));/*setGeometry(QRect(90, 10, 91, 31));*/
repo_O->setText(QApplication::translate("MainWindow", "Lire C3D", 0, QApplication::UnicodeUTF8));
////////////////////////connexion motion capture data////////////////////////////////////////////////
connect(repo_O, SIGNAL(clicked()), mQOgreWidget, SLOT( create_Scene_motion_data()));
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

AddSegm = new QToolButton(page_13);
AddSegm->setObjectName(QString::fromUtf8("AddSegm"));
AddSegm->setGeometry(QRect(150, 9, 51, 31));
AddSegm->setText("Ajouter Segment");
connect(AddSegm, SIGNAL(clicked()),this,SLOT(/*AddSegment()*/showdialogue()));

////////////////////////////////////
list_O = new QToolButton(page_13);
list_O->setObjectName(QString::fromUtf8("list_O"));
list_O->setGeometry(QRect(30, 210, 101, 31));
list_O->setText(QApplication::translate("MainWindow", "Object Liste", 0, QApplication::UnicodeUTF8));

////////////////////////////////////////////////////////



repo_cam = new QToolButton(page_14);
repo_cam->setObjectName(QString::fromUtf8("repo_cam"));
repo_cam->setGeometry(QRect(150, 10, 51, 31));
repo_cam->setText(QApplication::translate("MainWindow", "Repositionner", 0, QApplication::UnicodeUTF8));


supp_cam = new QToolButton(page_14);
supp_cam->setObjectName(QString::fromUtf8("supp_cam"));
supp_cam->setGeometry(QRect(80, 10, 51, 31));
supp_cam->setText(QApplication::translate("MainWindow", "Supprimer", 0, QApplication::UnicodeUTF8));


///////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////
anim=false;
move = new QToolButton(page_15);
move->setObjectName(QString::fromUtf8("mouvement"));
move->setGeometry(QRect(10, 100, 131, 51));
move->setText(QApplication::translate("MainWindow", "animation", 0, QApplication::UnicodeUTF8));
connect( move, SIGNAL(clicked()), this, SLOT( faire_anim()));
anim_motion = new QToolButton(page_15);
anim_motion->setObjectName(QString::fromUtf8("anim_motion"));
anim_motion->setGeometry(QRect(10, 30, 131, 51));
anim_motion->setText("motion data ");
connect( anim_motion, SIGNAL(clicked()), this, SLOT( faire_anim()));

connect(page_14, SIGNAL(coordinateChanged(const Ogre::Vector3&)),
mQOgreWidget , SLOT(setCameraPosition(const Ogre::Vector3&)));
connect(this, SIGNAL(boolischanged(bool)), mQOgreWidget , SLOT(result(bool)));
connect(mQOgreWidget , SIGNAL(cameraPositionChanged(const Ogre::Vector3&)),
page_14, SLOT(setNewCoordinate(const Ogre::Vector3&)));


listView = new /*QListView*/QTreeView(dockWidgetContents_8);
listView->setObjectName(QString::fromUtf8("listView"));
listView->setGeometry(QRect(0, 0, 281, 290));
listView->setModel( model );


and that's picture of the interface
11364

anda_skoa
9th September 2015, 22:01
That code looks like it was created by UIC from a designer .ui file.
And, like your .ui file from earlier, is missing all layouts.

Cheers,
_

robel
9th September 2015, 22:10
Yes
the code is the second ersion of the interface ffrom .ui file , it's an extension of the .ui interafce in the first post
but it's not good interface
i am not good at all when design an interface
can you Please , reorganize my interface ? thank you

anda_skoa
9th September 2015, 23:43
Yes
the code is the second ersion of the interface ffrom .ui file , it's an extension of the .ui interafce in the first post

That is definitely the wrong approach.
Keep it as a .ui file.



but it's not good interface
i am not good at all when design an interface
can you Please , reorganize my interface ? thank you

Only you know your requirements.

Maybe you should start with a simpler interface first?

Cheers,
_

robel
10th September 2015, 07:56
yes i know that, but i can't design my requerement in interface
i can't imaginate them

anda_skoa
10th September 2015, 08:13
Well, then you are out of luck.

Nobody else knows your requirements, so nobody else can design the interface for you.

Cheers,
_

robel
10th September 2015, 08:29
Even if i explain all my requirement ?