Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- maindiary.cpp:
- void MainDiary::on_EditButton_clicked() { // here we will control what the edit button does
- /* in this function we will do the following:
- * - show the edit dialog
- * - retrieve all local entries (they will be stored in %userprofile%\diary)
- * - display all these entries in a formated matter
- */
- QWidget* Edit = new QWidget(); // set an object for our new window
- Edit->show();
- //Edit.ParseFile(); // retrieve each local file
- qDebug("done");
- }
- maindiary.h:
- #ifndef MAINDIARY_H
- #define MAINDIARY_H
- #include <QMainWindow>
- namespace Ui {
- class MainDiary;
- }
- class MainDiary : public QMainWindow
- {
- Q_OBJECT
- public:
- explicit MainDiary(QWidget *parent = 0);
- ~MainDiary();
- private slots:
- void on_EditButton_clicked();
- void on_NewButton_clicked();
- private:
- Ui::MainDiary *ui;
- };
- #endif // MAINDIARY_H
- edidiaryentry.cpp:
- #include "editdiaryentry.h"
- #include "ui_editdiaryentry.h"
- EditDiaryEntry::EditDiaryEntry(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::EditDiaryEntry) {
- ui->setupUi(this);
- }
- EditDiaryEntry::~EditDiaryEntry(){
- delete ui;
- }
- editdiaryentry.h:
- #ifndef EDITDIARYENTRY_H
- #define EDITDIARYENTRY_H
- #include <QWidget>
- namespace Ui {
- class EditDiaryEntry;
- }
- class EditDiaryEntry : public QWidget
- {
- Q_OBJECT
- public:
- explicit EditDiaryEntry(QWidget *parent = 0);
- ~EditDiaryEntry();
- private:
- Ui::EditDiaryEntry *ui;
- };
- #endif // EDITDIARYENTRY_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement