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:
QScopedPointer<Ui::DatabaseOpenDialog> m_ui;
Database* m_db;
QFile* m_file;
2011-12-25 14:36:45 -05:00
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