Results 1 to 8 of 8

Thread: Project interface idea

  1. #1
    Join Date
    Jul 2012
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Project interface idea

    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)
    Interface.ui
    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
    Qt Code:
    1. QStandardItem *item=new QStandardItem(/*QString*/ (skel->getBone(i)->getName().c_str()));
    2.  
    3.  
    4. emit itemAded(item,0);
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. --
    2. void MainWindow::itemAded( QStandardItem *mItem,int i )
    3. {
    4. cout<<"iam in itemAded";
    5. pItem[i]->appendRow( mItem );
    6. }
    To copy to clipboard, switch view to plain text mode 
    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
    Last edited by robel; 9th September 2015 at 14:08.

  2. #2
    Join Date
    Jul 2012
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Project interface idea

    Hi,,
    taht's the code of my interface
    Qt Code:
    1. void MainWindow::createDockWidget()
    2. {
    3. dockWidgetContents_5 = new QWidget(this);
    4. dockWidgetContents_5->setObjectName(QString::fromUtf8("dockWidgetContents_5"));
    5.  
    6. dockWidgetContents_8 = new QWidget();
    7. dockWidgetContents_8->setObjectName(QString::fromUtf8("dockWidgetContents_8"));
    8.  
    9. dockWidget_2 = new QDockWidget(this);
    10. dockWidget_2->setObjectName(QString::fromUtf8("dockWidget_2"));
    11. dockWidget_2->setGeometry(QRect(0, 0, 211, 361));
    12. dockWidget_2->setMinimumSize(QSize(183, 327));
    13. dockWidget_2->setWidget(dockWidgetContents_5);
    14. dockWidget_2->raise();
    15. dockWidget_2->setWindowTitle(QApplication::translate("MainWindow", "Tools", 0, QApplication::UnicodeUTF8));
    16. dockWidget_2->setFloating(false);
    17.  
    18.  
    19. dockWidget_5 = new QDockWidget(this);
    20. dockWidget_5->setObjectName(QString::fromUtf8("dockWidget_5"));
    21. dockWidget_5->setWidget(dockWidgetContents_8);
    22. addDockWidget(static_cast<Qt::DockWidgetArea>(2), dockWidget_5);
    23. dockWidget_5->setWindowTitle(QApplication::translate("MainWindow", "Object liste", 0, QApplication::UnicodeUTF8));
    24. dockWidget_5->setFloating(false);
    25. dockWidget_5->raise();
    26. page_13 = new QWidget(this);
    27. page_13->setObjectName(QString::fromUtf8("page_13"));
    28. page_13->setGeometry(QRect(0, 0, 98, 28));
    29.  
    30.  
    31. page_14 = new Coordinate3dWidget;
    32. page_14->setGeometry(QRect(0, 0, 211, 250));
    33.  
    34.  
    35.  
    36.  
    37. page_15 = new QWidget(this);
    38. page_15->setObjectName(QString::fromUtf8("page_15"));
    39. page_15->setGeometry(QRect(0, 0, 211, 250));
    40.  
    41.  
    42. toolBox_5 = new QToolBox(dockWidgetContents_5);
    43. toolBox_5->setObjectName(QString::fromUtf8("toolBox_5"));
    44. toolBox_5->setGeometry(QRect(0, 0, 211, 331));
    45. toolBox_5->setAutoFillBackground(false);
    46. toolBox_5->setFrameShape(QFrame::NoFrame);
    47. toolBox_5->setFrameShadow(QFrame::Plain);
    48. toolBox_5->addItem(page_13, QString::fromUtf8("Object"));
    49. toolBox_5->addItem(page_14, QString::fromUtf8("Camera"));
    50. toolBox_5->addItem(page_15, QString::fromUtf8("Movement"));
    51. toolBox_5->setCurrentIndex(1);
    52. toolBox_5->setItemText(toolBox_5->indexOf(page_13), QApplication::translate("MainWindow", "Object", 0, QApplication::UnicodeUTF8));
    53. toolBox_5->setItemText(toolBox_5->indexOf(page_14), QApplication::translate("MainWindow", "Camera", 0, QApplication::UnicodeUTF8));
    54. toolBox_5->setItemText(toolBox_5->indexOf(page_15), QApplication::translate("MainWindow", "Movement", 0, QApplication::UnicodeUTF8));
    55.  
    56.  
    57.  
    58. groupBox_7 = new QGroupBox(page_14);
    59. groupBox_7->setObjectName(QString::fromUtf8("groupBox_7"));
    60. groupBox_7->setGeometry(QRect(10, 130, 191, 51));
    61. groupBox_7->setTitle(QApplication::translate("MainWindow", "Orientation", 0, QApplication::UnicodeUTF8));
    62.  
    63. ///////////////////////////////
    64.  
    65. cube=new QToolButton(page_13);
    66. cube->setGeometry(QRect(10, 70, 101, 91));
    67. cube->setIcon(QIcon("E:/project/image/cc.jpg"));
    68. foreach(QString imageType, QImageReader::supportedImageFormats())
    69. qDebug() << imageType;
    70.  
    71. add_O = new QToolButton(page_13);
    72. add_O->setGeometry(QRect(10, 10, 61, 31))/*setGeometry(QRect(0, 10, 71, 31))*/;
    73. add_O->setText(QApplication::translate("MainWindow", "Ajouter", 0, QApplication::UnicodeUTF8));
    74. add_O->setCheckable(true);
    75. ////////////////////////////////////////////////connexion create scene///////////////
    76. connect(add_O, SIGNAL(clicked()),mQOgreWidget,SLOT(createScene()));
    77.  
    78. /////////////////////////////////////////////////////////////////////////////////////
    79. repo_O = new QToolButton(page_13);
    80. repo_O->setObjectName(QString::fromUtf8("repo_O"));
    81. repo_O->setGeometry(QRect(80, 10, 71, 31));/*setGeometry(QRect(90, 10, 91, 31));*/
    82. repo_O->setText(QApplication::translate("MainWindow", "Lire C3D", 0, QApplication::UnicodeUTF8));
    83. ////////////////////////connexion motion capture data////////////////////////////////////////////////
    84. connect(repo_O, SIGNAL(clicked()), mQOgreWidget, SLOT( create_Scene_motion_data()));
    85. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    86.  
    87. AddSegm = new QToolButton(page_13);
    88. AddSegm->setObjectName(QString::fromUtf8("AddSegm"));
    89. AddSegm->setGeometry(QRect(150, 9, 51, 31));
    90. AddSegm->setText("Ajouter Segment");
    91. connect(AddSegm, SIGNAL(clicked()),this,SLOT(/*AddSegment()*/showdialogue()));
    92.  
    93. ////////////////////////////////////
    94. list_O = new QToolButton(page_13);
    95. list_O->setObjectName(QString::fromUtf8("list_O"));
    96. list_O->setGeometry(QRect(30, 210, 101, 31));
    97. list_O->setText(QApplication::translate("MainWindow", "Object Liste", 0, QApplication::UnicodeUTF8));
    98.  
    99. ////////////////////////////////////////////////////////
    100.  
    101.  
    102.  
    103. repo_cam = new QToolButton(page_14);
    104. repo_cam->setObjectName(QString::fromUtf8("repo_cam"));
    105. repo_cam->setGeometry(QRect(150, 10, 51, 31));
    106. repo_cam->setText(QApplication::translate("MainWindow", "Repositionner", 0, QApplication::UnicodeUTF8));
    107.  
    108.  
    109. supp_cam = new QToolButton(page_14);
    110. supp_cam->setObjectName(QString::fromUtf8("supp_cam"));
    111. supp_cam->setGeometry(QRect(80, 10, 51, 31));
    112. supp_cam->setText(QApplication::translate("MainWindow", "Supprimer", 0, QApplication::UnicodeUTF8));
    113.  
    114.  
    115. ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    116. ////////////////////////////////////////////////////////////////////////////////////////
    117. anim=false;
    118. move = new QToolButton(page_15);
    119. move->setObjectName(QString::fromUtf8("mouvement"));
    120. move->setGeometry(QRect(10, 100, 131, 51));
    121. move->setText(QApplication::translate("MainWindow", "animation", 0, QApplication::UnicodeUTF8));
    122. connect( move, SIGNAL(clicked()), this, SLOT( faire_anim()));
    123. anim_motion = new QToolButton(page_15);
    124. anim_motion->setObjectName(QString::fromUtf8("anim_motion"));
    125. anim_motion->setGeometry(QRect(10, 30, 131, 51));
    126. anim_motion->setText("motion data ");
    127. connect( anim_motion, SIGNAL(clicked()), this, SLOT( faire_anim()));
    128.  
    129. connect(page_14, SIGNAL(coordinateChanged(const Ogre::Vector3&)),
    130. mQOgreWidget , SLOT(setCameraPosition(const Ogre::Vector3&)));
    131. connect(this, SIGNAL(boolischanged(bool)), mQOgreWidget , SLOT(result(bool)));
    132. connect(mQOgreWidget , SIGNAL(cameraPositionChanged(const Ogre::Vector3&)),
    133. page_14, SLOT(setNewCoordinate(const Ogre::Vector3&)));
    134.  
    135.  
    136. listView = new /*QListView*/QTreeView(dockWidgetContents_8);
    137. listView->setObjectName(QString::fromUtf8("listView"));
    138. listView->setGeometry(QRect(0, 0, 281, 290));
    139. listView->setModel( model );
    To copy to clipboard, switch view to plain text mode 
    and that's picture of the interface
    pict_interface.png
    Last edited by robel; 9th September 2015 at 20:21.

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,370
    Thanks
    36
    Thanked 1,537 Times in 1,488 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Project interface idea

    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,
    _

  4. #4
    Join Date
    Jul 2012
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Project interface idea

    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

  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,370
    Thanks
    36
    Thanked 1,537 Times in 1,488 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Project interface idea

    Quote Originally Posted by robel View Post
    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.

    Quote Originally Posted by robel View 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
    Only you know your requirements.

    Maybe you should start with a simpler interface first?

    Cheers,
    _

  6. #6
    Join Date
    Jul 2012
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Project interface idea

    yes i know that, but i can't design my requerement in interface
    i can't imaginate them

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,370
    Thanks
    36
    Thanked 1,537 Times in 1,488 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Project interface idea

    Well, then you are out of luck.

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

    Cheers,
    _

  8. #8
    Join Date
    Jul 2012
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Project interface idea

    Even if i explain all my requirement ?

Similar Threads

  1. Replies: 1
    Last Post: 12th August 2012, 17:37
  2. problem with interface Class - Error:undefined interface
    By k.qasempour in forum Qt Programming
    Replies: 4
    Last Post: 12th August 2012, 02:11
  3. Replies: 7
    Last Post: 21st June 2011, 01:15
  4. ???any one have idea about this ???
    By damodharan in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2010, 09:08
  5. UI Idea please
    By munna in forum General Discussion
    Replies: 1
    Last Post: 9th May 2006, 11:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.