keepassxc/src/gui/DatabaseOpenDialog.h

60 lines
1.5 KiB
C
Raw Normal View History

2011-11-13 08:55:20 -05:00
/*
* Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 or (at your option)
* version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2012-04-18 16:08:22 -04:00
#ifndef KEEPASSX_DATABASEOPENDIALOG_H
#define KEEPASSX_DATABASEOPENDIALOG_H
2011-11-13 08:55:20 -05:00
#include <QtCore/QScopedPointer>
#include <QtGui/QDialog>
#include "keys/CompositeKey.h"
class Database;
class QFile;
2011-11-13 08:55:20 -05:00
namespace Ui {
class DatabaseOpenDialog;
2011-11-13 08:55:20 -05:00
}
class DatabaseOpenDialog : public QDialog
2011-11-13 08:55:20 -05:00
{
Q_OBJECT
public:
explicit DatabaseOpenDialog(QFile* file, QString filename, QWidget* parent = 0);
~DatabaseOpenDialog();
Database* database();
2011-11-13 08:55:20 -05:00
private Q_SLOTS:
void openDatabase();
void togglePassword(bool checked);
void activatePassword();
void activateKeyFile();
void setOkButtonEnabled();
void browseKeyFile();
2011-11-13 08:55:20 -05:00
private:
2012-04-23 13:44:43 -04:00
const QScopedPointer<Ui::DatabaseOpenDialog> m_ui;
Database* m_db;
2012-04-23 13:44:43 -04:00
QFile* const m_file;
const QString m_filename;
2011-11-13 08:55:20 -05:00
Q_DISABLE_COPY(DatabaseOpenDialog)
2011-11-13 08:55:20 -05:00
};
2012-04-18 16:08:22 -04:00
#endif // KEEPASSX_DATABASEOPENDIALOG_H