~ubuntu-branches/ubuntu/trusty/robojournal/trusty

« back to all changes in this revision

Viewing changes to editor.h

  • Committer: Package Import Robot
  • Author(s): Ritesh Raj Sarraf
  • Date: 2012-05-15 18:53:20 UTC
  • Revision ID: package-import@ubuntu.com-20120515185320-wycjnuhl1b3kf99i
Tags: upstream-0.2.1
ImportĀ upstreamĀ versionĀ 0.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    This file is part of RoboJournal.
 
3
    Copyright (c) 2012 by Will Kraft <pwizard@gmail.com>.
 
4
 
 
5
 
 
6
    RoboJournal is free software: you can redistribute it and/or modify
 
7
    it under the terms of the GNU General Public License as published by
 
8
    the Free Software Foundation, either version 3 of the License, or
 
9
    (at your option) any later version.
 
10
 
 
11
    RoboJournal is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
    GNU General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU General Public License
 
17
    along with RoboJournal.  If not, see <http://www.gnu.org/licenses/>.
 
18
  */
 
19
 
 
20
#ifndef EDITOR_H
 
21
#define EDITOR_H
 
22
 
 
23
#include <QDialog>
 
24
 
 
25
namespace Ui {
 
26
    class Editor;
 
27
}
 
28
 
 
29
class Editor : public QDialog
 
30
{
 
31
    Q_OBJECT
 
32
 
 
33
public:
 
34
    explicit Editor(QWidget *parent = 0);
 
35
    ~Editor();
 
36
 
 
37
    bool NewEntry();
 
38
 
 
39
    void LoadEntry(QString entry);
 
40
 
 
41
    void InitiateEditMode();
 
42
 
 
43
    bool UpdateEntry();
 
44
 
 
45
 
 
46
    static QString title;
 
47
    static QString body;
 
48
    static int month;
 
49
    static int day;
 
50
    static int year;
 
51
 
 
52
 
 
53
 
 
54
 
 
55
 
 
56
private slots:
 
57
    void DocumentStats();
 
58
 
 
59
 
 
60
    void on_EntryTitle_textChanged(const QString &arg1);
 
61
 
 
62
    void on_EntryPost_textChanged();
 
63
 
 
64
 
 
65
 
 
66
    void on_UndoButton_clicked();
 
67
 
 
68
    void on_RedoButton_clicked();
 
69
 
 
70
 
 
71
 
 
72
    void on_Cancel_clicked();
 
73
 
 
74
    void on_CutButton_clicked();
 
75
 
 
76
    void on_CopyButton_clicked();
 
77
 
 
78
    void on_PasteButton_clicked();
 
79
 
 
80
 
 
81
 
 
82
    void on_PostEntry_clicked();
 
83
 
 
84
private:
 
85
    Ui::Editor *ui;
 
86
 
 
87
    void SetDate();
 
88
    void setTitle(QString title);
 
89
    void SetupMenu();
 
90
    QString WordCount(QString data);
 
91
    void ConfirmExit();
 
92
 
 
93
    void reject();
 
94
 
 
95
};
 
96
 
 
97
#endif // EDITOR_H