Results 1 to 3 of 3

Thread: modal/view architecture

  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default modal/view architecture

    hi,
    I have a screen with 10 labels.And based on the key I press, the screen should change and a dialog has to appear.
    I want to do it using Modal/view architecture.I am not getting any idea how to do.Plz help/.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: modal/view architecture

    Your problem seems related only to GUI, where is the data ??
    I am not sure of the Model View architecture... but can suggest the following pseudo code for ur problem -

    Qt Code:
    1. class MyWindow : public QMainWindow
    2. {
    3.  
    4. LabelWidget * m_pLabelWidget;
    5. Screen * m_pScreen;
    6.  
    7. MyWindow()
    8. {
    9. connect(m_pLabelWidget,SIGNAL(buttonClicked(QString),this,SLOT(handleButtonClick(QString));
    10. }
    11. }
    12.  
    13. void MyWindow::handleButton(QString button)
    14. {
    15. if(button == "1")
    16. {
    17. m_pScreen->changeColor(green);
    18. // pop dialog
    19. // other things you want to do....
    20. }
    21. else ...
    22. ...
    23. }
    To copy to clipboard, switch view to plain text mode 
    Hope it helps

  3. #3
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post Re: modal/view architecture

    What is that Screen* and LabelWidget*?

Similar Threads

  1. Qt/Embedded support for MIPS architecture
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 30th November 2010, 04:14
  2. Application plug-in architecture
    By brcain in forum Qt Programming
    Replies: 3
    Last Post: 13th September 2006, 00:39
  3. Replies: 16
    Last Post: 7th March 2006, 15:57
  4. Replies: 1
    Last Post: 1st March 2006, 11:43
  5. Qt Cryptographic Architecture
    By derick in forum Qt Programming
    Replies: 2
    Last Post: 16th February 2006, 12:10

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.