CppAgendaTel-proiect/ro: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
Doresc sa implementez un proiect de agenda telefonica care sa stocheze:<br /> 1. numele,<br /> 2. prenumele,<br /> 3. adresa e-mail,<br /> 4. un nr. de telefon.<br /> Aceasta trebuie sa aiba interfata grafica, si sa salveze datele pe hard disk.<br />


<div class="cpp-qt geshi">
# <div class="de1"><span class="co2"><nowiki>#ifndef MAINWINDOW_H</nowiki></span></div>
# <div class="de1"><span class="co2">#define MAINWINDOW_H</span></div>
# <div class="de1"> </div>
# <div class="de1"><span class="co2">#include &lt;QMainWindow&gt;</span></div>
# <div class="de2"> </div>
# <div class="de1"><span class="kw2">namespace</span> Ui <span class="br0">{</span></div>
# <div class="de1"><span class="kw2">class</span> MainWindow<span class="sy0">;</span></div>
# <div class="de1"><span class="br0">}</span></div>
# <div class="de1"> </div>
# <div class="de2"><span class="kw2">class</span> MainWindow <span class="sy0">:</span> <span class="kw2">public</span> [http://doc.qt.io/QMainWindow.html <span class="kw5">QMainWindow</span>]</div>
# <div class="de1"><span class="br0">{</span></div>
# <div class="de1">    <span class="kw2">Q_OBJECT</span></div>
# <div class="de1">    </div>
# <div class="de1"><span class="kw2">public</span><span class="sy0">:</span></div>
# <div class="de2">    <span class="kw2">explicit</span> MainWindow<span class="br0">(</span>[http://doc.qt.io/QWidget.html <span class="kw5">QWidget</span>] <span class="sy0">*</span>parent <span class="sy0">=</span> <span class="nu0">0</span><span class="br0">)</span><span class="sy0">;</span></div>
# <div class="de1">    ~MainWindow<span class="br0">(</span><span class="br0">)</span><span class="sy0">;</span></div>
# <div class="de1">    </div>
# <div class="de1"><span class="kw2">private</span><span class="sy0">:</span></div>
# <div class="de1">    Ui<span class="sy0">::</span><span class="me2">MainWindow</span> <span class="sy0">*</span>ui<span class="sy0">;</span></div>
# <div class="de2"><span class="br0">}</span><span class="sy0">;</span></div>
# <div class="de1"> </div>
# <div class="de1"><span class="co2">#endif // MAINWINDOW_H</span></div>
</div>
[http://www.youtube.com/watch?v=wUH_gu2HdQE Tutorial video] ''[youtube.com]''
[[Image:snapshot2.png]](Imagine <span class="caps">GUI</span>
Inserarea TableView [http://www.thedazzlersinc.com/source/2012/06/04/qt-qtableview-example-short-and-quick/ tableView…] ''[thedazzlersinc.com]''
[http://forum.qt.io/viewthread/3682 Your text to link here…] ''[qt.io]''
S-a implementat tableView-&gt;02/02/2013.<br />http://www.informit.com/articles/article.aspx?p=1405225 ''[informit.com]''<br />[http://harmattan-dev.nokia.com/docs/library/html/qt4/qmainwindow.html Your text to link here…] ''[harmattan-dev.nokia.com]''
[[Image:snapshot3.png|Image]]

Revision as of 14:00, 25 February 2015

Doresc sa implementez un proiect de agenda telefonica care sa stocheze:
1. numele,
2. prenumele,
3. adresa e-mail,
4. un nr. de telefon.
Aceasta trebuie sa aiba interfata grafica, si sa salveze datele pe hard disk.

  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QMainWindow>
  5.  
  6. namespace Ui {
  7. class MainWindow;
  8. }
  9.  
  10. class MainWindow : public QMainWindow
  11. {
  12.     Q_OBJECT
  13.    
  14. public:
  15.     explicit MainWindow(QWidget *parent = 0);
  16.     ~MainWindow();
  17.    
  18. private:
  19.     Ui::MainWindow *ui;
  20. };
  21.  
  22. #endif // MAINWINDOW_H

Tutorial video [youtube.com]

File:Snapshot2.png(Imagine GUI

Inserarea TableView tableView… [thedazzlersinc.com]

Your text to link here… [qt.io]

S-a implementat tableView->02/02/2013.
http://www.informit.com/articles/article.aspx?p=1405225 [informit.com]
Your text to link here… [harmattan-dev.nokia.com]

Image