Files
keepassxc/src/gui/dbsettings/DatabaseSettingsWidgetBrowser.h
Jonathan White a145bf9119 Complete refactor of Browser Integration classes
* Removed option to attach KeePassXC to the browser extension. Users must use the proxy application to communicate with KeePassXC.
* Significantly streamlined proxy code. Used same implementation of stdin/stdout interface across all platforms.
* Moved browser service entry point to BrowserService class instead of NativeMessagingHost. BrowserService now coordinates the communication to/from clients.
* Moved settings page definition out of MainWindow
* Decoupled BrowserService from DatabaseTabWidget
* Reduced complexity of various functions and cleaned the ABI (public vs private).
* Eliminated BrowserClients class, moved functionality into the BrowserService
* Renamed HostInstaller to NativeMessageInstaller and renamed NativeMessageHost to BrowserHost.
* Recognize XDG_CONFIG_HOME when installing native message file on Linux. Fix #4121 and fix #4123.
2020-05-14 17:14:17 -04:00

83 lines
2.3 KiB
C++

/*
* Copyright (C) 2018 KeePassXC Team <team@keepassxc.org>
* Copyright (C) 2018 Sami Vänttinen <sami.vanttinen@protonmail.com>
*
* 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/>.
*/
#ifndef KEEPASSXC_DATABASESETTINGSWIDGETBROWSER_H
#define KEEPASSXC_DATABASESETTINGSWIDGETBROWSER_H
#include "DatabaseSettingsWidget.h"
#include "browser/BrowserService.h"
#include "core/CustomData.h"
#include "gui/DatabaseTabWidget.h"
#include <QItemSelection>
#include <QPointer>
#include <QScopedPointer>
#include <QStandardItemModel>
class Database;
namespace Ui
{
class DatabaseSettingsWidgetBrowser;
}
class DatabaseSettingsWidgetBrowser : public DatabaseSettingsWidget
{
Q_OBJECT
public:
explicit DatabaseSettingsWidgetBrowser(QWidget* parent = nullptr);
Q_DISABLE_COPY(DatabaseSettingsWidgetBrowser);
~DatabaseSettingsWidgetBrowser() override;
CustomData* customData() const;
inline bool hasAdvancedMode() const override
{
return false;
}
public slots:
void initialize() override;
void uninitialize() override;
bool save() override;
private slots:
void removeSelectedKey();
void toggleRemoveButton(const QItemSelection& selected);
void updateSharedKeyList();
void removeSharedEncryptionKeys();
void removeStoredPermissions();
void convertAttributesToCustomData();
void refreshDatabaseID();
private:
void updateModel();
void settingsWarning();
protected:
void showEvent(QShowEvent* event) override;
const QScopedPointer<Ui::DatabaseSettingsWidgetBrowser> m_ui;
private:
QPointer<CustomData> m_customData;
QPointer<QStandardItemModel> m_customDataModel;
};
#endif // KEEPASSXC_DATABASESETTINGSWIDGETBROWSER_H