Advertisement
BeamNG_IRC

Untitled

Feb 4th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.52 KB | None | 0 0
  1. maindiary.cpp:
  2. void MainDiary::on_EditButton_clicked() { // here we will control what the edit button does
  3.     /* in this function we will do the following:
  4.      * - show the edit dialog
  5.      * - retrieve all local entries (they will be stored in %userprofile%\diary)
  6.      * - display all these entries in a formated matter
  7.      */
  8.     QWidget* Edit = new QWidget(); // set an object for our new window
  9.     Edit->show();
  10.     //Edit.ParseFile(); // retrieve each local file
  11.     qDebug("done");
  12.  
  13. }
  14.  
  15. maindiary.h:
  16. #ifndef MAINDIARY_H
  17. #define MAINDIARY_H
  18.  
  19. #include <QMainWindow>
  20.  
  21. namespace Ui {
  22. class MainDiary;
  23. }
  24.  
  25. class MainDiary : public QMainWindow
  26. {
  27.     Q_OBJECT
  28.  
  29. public:
  30.     explicit MainDiary(QWidget *parent = 0);
  31.     ~MainDiary();
  32.  
  33. private slots:
  34.     void on_EditButton_clicked();
  35.  
  36.     void on_NewButton_clicked();
  37.  
  38. private:
  39.     Ui::MainDiary *ui;
  40. };
  41.  
  42. #endif // MAINDIARY_H
  43.  
  44.  
  45. edidiaryentry.cpp:
  46. #include "editdiaryentry.h"
  47. #include "ui_editdiaryentry.h"
  48.  
  49. EditDiaryEntry::EditDiaryEntry(QWidget *parent) :
  50.     QWidget(parent),
  51.     ui(new Ui::EditDiaryEntry) {
  52.     ui->setupUi(this);
  53. }
  54.  
  55. EditDiaryEntry::~EditDiaryEntry(){
  56.     delete ui;
  57. }
  58.  
  59. editdiaryentry.h:
  60. #ifndef EDITDIARYENTRY_H
  61. #define EDITDIARYENTRY_H
  62.  
  63. #include <QWidget>
  64.  
  65. namespace Ui {
  66. class EditDiaryEntry;
  67. }
  68.  
  69. class EditDiaryEntry : public QWidget
  70. {
  71.     Q_OBJECT
  72.  
  73. public:
  74.     explicit EditDiaryEntry(QWidget *parent = 0);
  75.     ~EditDiaryEntry();
  76.  
  77. private:
  78.     Ui::EditDiaryEntry *ui;
  79. };
  80.  
  81. #endif // EDITDIARYENTRY_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement