Where to get C++ GUI prgramming tutorials?

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2007
Posts: 68
Reputation: ongxizhe is an unknown quantity at this point 
Solved Threads: 1
ongxizhe's Avatar
ongxizhe ongxizhe is offline Offline
Junior Poster in Training

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #21
May 22nd, 2007
I mean more specifically.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,066
Reputation: Sturm is on a distinguished road 
Solved Threads: 24
Sturm's Avatar
Sturm Sturm is offline Offline
Veteran Poster

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #22
May 22nd, 2007
I dont really know it python.......but it looks like this:
  1. def run( self ):
  2. self.dialog.show_all()
  3. return self.dialog.run()
  4.  
  5. def destroy( self ):
  6. self.dialog.destroy()
  7. del self.dialog
  8.  
  9. def toggle_use_dhcp( self, widget, data = None ):
  10. expanded = self.dhcp_expander.get_expanded()
  11. if expanded:
  12. self.dhcp_expander.set_label( USE_IP_LABEL )
  13. else:
  14. self.dhcp_expander.set_label( USE_DHCP_LABEL )
  15.  
  16. def toggle_use_wpa( self, widget, data = None ):
  17. expanded = self.wpa_expander.get_expanded()
  18. if expanded:
  19. self.wpa_expander.set_label( USE_WPA_LABEL )
  20. else:
  21. self.wpa_expander.set_label( NO_WPA_LABEL )
  22.  
  23. def get_profile( self ):
  24. profile = {}
  25. profile['ssid'] = self.ssid.get_text().strip()
  26. profile['key'] = self.key.get_text().strip()
  27. profile['mode'] = self.get_array_item( self.mode.get_active(), WIFI_MODES )
  28. profile['security'] = self.get_array_item( self.security.get_active(), WIFI_SECURITY )
  29. profile['channel'] = self.get_array_item( self.channel.get_active(), WIFI_CHANNELS )
  30. profile['protocol'] = 'b'
  31. profile['signal'] = '0'
  32. profile['prescript'] = self.prescript.get_text().strip()
  33. profile['postscript'] = self.postscript.get_text().strip()
  34. # wpa
  35. use_wpa = ( self.wpa_expander.get_expanded() == False )
  36. if use_wpa:
  37. profile['use_wpa'] = False
  38. else:
  39. profile['use_wpa'] = True
  40. profile['wpa_driver']= self.wpa_driver.get_text().strip()
  41. # dhcp
  42. use_dhcp = ( self.dhcp_expander.get_expanded() == False )
  43. if use_dhcp:
  44. profile['use_dhcp'] = True
  45. else:
  46. profile['use_dhcp'] = False
  47. profile['ip'] = self.ip.get_text().strip()
  48. profile['netmask'] = self.netmask.get_text().strip()
  49. profile['gateway'] = self.gw.get_text().strip()
  50. profile['domain'] = self.domain.get_text().strip()
  51. profile['dns1'] = self.dns1.get_text().strip()
  52. profile['dns2'] = self.dns2.get_text().strip()
  53. return profile
  54.  
  55. def set_profile( self, profile, known ):
  56. if __debug__:
  57. print profile
  58. self.ssid.set_text( profile['ssid'] )
  59. if known:
  60. self.ssid.set_editable( False )
  61. self.dialog.set_title( "WiFi Profile for %s" % profile['ssid'] )
  62. self.key.set_text( profile['key'] )
  63. self.mode.set_active( self.get_array_index( profile['mode'], WIFI_MODES ) )
  64. self.channel.set_active( self.get_array_index( profile['channel'], WIFI_CHANNELS ) )
  65. self.security.set_active( self.get_array_index( profile['security'], WIFI_SECURITY ) )
  66. #self.protocol.set_text( profile['protocol'] )
  67. self.prescript.set_text( profile['prescript'] )
  68. self.postscript.set_text( profile['postscript'] )
  69. # wpa
  70. if profile['use_wpa'] == True:
  71. self.wpa_expander.set_expanded( True )
  72. self.wpa_driver.set_text( profile['wpa_driver'] )
  73. else:
  74. self.wpa_expander.set_expanded( False )
  75. # dhcp
  76. if profile['use_dhcp'] == True:
  77. self.dhcp_expander.set_expanded( False)
  78. else:
  79. self.dhcp_expander.set_expanded( True )
  80. self.ip.set_text( profile['ip'] )
  81. self.netmask.set_text( profile['netmask'] )
  82. self.gw.set_text( profile['gateway'] )
  83. self.domain.set_text( profile['domain'] )
  84. self.dns1.set_text( profile['dns1'] )
  85. self.dns2.set_text( profile['dns2'] )
  86.  
  87. def get_array_index( self, item, array ):
  88. try:
  89. return array.index( item.strip() )
  90. except:
  91. pass
  92. return 0
  93.  
  94. def get_array_item( self, index, array ):
  95. try:
  96. return array[ index ]
  97. except:
  98. pass
  99. return ''
thats a code snippet from wifi-radar.
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 68
Reputation: ongxizhe is an unknown quantity at this point 
Solved Threads: 1
ongxizhe's Avatar
ongxizhe ongxizhe is offline Offline
Junior Poster in Training

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #23
May 22nd, 2007
And what did you mean by "It's nice not to have to compile it"? Did you mean something like after typing codes and straight away save as type executable file format? Or other type of "compilation"?
Last edited by ongxizhe; May 22nd, 2007 at 10:59 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,652
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #24
May 22nd, 2007
Yes something like that. Python is basically a scripting language which means it is an interpreted language. You don't need to compile the program. Just type and run it !! Thats why Python is used for quick prototyping of small projects.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,066
Reputation: Sturm is on a distinguished road 
Solved Threads: 24
Sturm's Avatar
Sturm Sturm is offline Offline
Veteran Poster

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #25
May 22nd, 2007
its kind of nice. With big projects compiling can take a while. But with python your ready to go! But alas, like all scripting languages is not what you would call a "high performance langauge." At least its portable ;-)
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,652
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #26
May 22nd, 2007
Its a misconception among many people. They always talk about performance without knowing the actually implications of what they are saying considering 80% of the people who cry about performance run no real test or profile their code.

Come on, I mean there has to be some difference between C and Python. But think of it this way, I would rather write a small text based RPG game in Python in one week and have 95% performance than spend 3 weeks writing it in C and have 100% performance benefits.

With the kind of benefits Python offers over its fast counterparts, its kind of acceptable. I mean, you can't have everything, can you ? ;-)
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 68
Reputation: ongxizhe is an unknown quantity at this point 
Solved Threads: 1
ongxizhe's Avatar
ongxizhe ongxizhe is offline Offline
Junior Poster in Training

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #27
May 23rd, 2007
Well, thanks. Any suggestion about some must-know or must-do or must-learn before starting python?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,066
Reputation: Sturm is on a distinguished road 
Solved Threads: 24
Sturm's Avatar
Sturm Sturm is offline Offline
Veteran Poster

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #28
May 23rd, 2007
Originally Posted by s.o.s

Come on, I mean there has to be some difference between C and Python. But think of it this way, I would rather write a small text based RPG game in Python in one week and have 95% performance than spend 3 weeks writing it in C and have 100% performance benefits
Yeah in that example I would use python too.(unless I was programming the RPG to improve my c/c++ skills) But even so performance matters! For example: I do some programming for the ARM (at least I think it is) based gp2x, and performace is the only thing that matters.

Originally Posted by ongxizhe
Well, thanks. Any suggestion about some must-know or must-do or must-learn before starting python?
I know this may seem odd but some programmers just do not respect python, ruby, perl, and even java to some extent.
They see "c/c++" as the hardcore programming language and anything other language short of assembly and maybe lisp noobish.
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 68
Reputation: ongxizhe is an unknown quantity at this point 
Solved Threads: 1
ongxizhe's Avatar
ongxizhe ongxizhe is offline Offline
Junior Poster in Training

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #29
May 23rd, 2007
Well, lots of people say that C/C++ is more useful. That's why I am learning.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,066
Reputation: Sturm is on a distinguished road 
Solved Threads: 24
Sturm's Avatar
Sturm Sturm is offline Offline
Veteran Poster

Re: Where to get C++ GUI prgramming tutorials?

 
0
  #30
May 23rd, 2007
it is in the "real world"
"Hey ass, don't hijack my thread. This is serious." -JoshSCH
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 7744 | Replies: 47
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC