2 * This file is part of Secret Notes.
3 * Copyright (C) 2010 Janusz Sobczak
5 * Secret Notes is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * Secret Notes is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Secret Notes. If not, see <http://www.gnu.org/licenses/>.
21 #include <QMainWindow>
27 class MainWindow : public QMainWindow {
30 MainWindow(QWidget *parent = 0);
34 void changeEvent(QEvent *e);
35 void closeEvent(QCloseEvent *);
39 void queryPassword(bool retry);
40 unsigned char* password;
42 bool hasPasswordChanged;
44 bool decode(QString& output, const QByteArray& input);
45 void encode(QByteArray& output, const QString& input);
46 void blowfish(unsigned char *output, const unsigned char *input,
48 void setPassword(const QString& text);
49 void askNewPassword();
52 void enableTextEdit(bool);
53 void enableUndoReset(bool);
54 QAction *undoResetAction;
55 QAction *undoEditAction;
59 void on_actionReset_secret_notes_triggered();
60 void on_actionChange_password_triggered();
61 void on_textEdit_undoAvailable(bool b);
67 #endif // MAINWINDOW_H