ConnectionManager overhaul
- connection settings are now changed by seperate component currently called in a seperate window - old settings pane on the right of the connections had been removed - new edit config button added between new connection and remove connection
This commit is contained in:
parent
78247c7abe
commit
b09e8a6d4b
20 changed files with 836 additions and 733 deletions
|
|
@ -8,15 +8,6 @@
|
|||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
//namespace Botan {
|
||||
// class Sqlite3_Database;
|
||||
//}
|
||||
|
||||
class ConnectionConfig;
|
||||
class ConnectionList;
|
||||
class ConnectionListModel;
|
||||
class ConnectionManagerWindow;
|
||||
class PasswordManager;
|
||||
|
||||
class ConnectionController;
|
||||
/** \brief Controller class responsible for all things global.
|
||||
|
|
@ -43,47 +34,5 @@ private:
|
|||
ConnectionController* m_connectionController = nullptr;
|
||||
};
|
||||
|
||||
class ConnectionController : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ConnectionController(MasterController *parent = nullptr);
|
||||
~ConnectionController();
|
||||
|
||||
void init();
|
||||
|
||||
ConnectionListModel *getConnectionListModel()
|
||||
{
|
||||
return m_connectionListModel;
|
||||
}
|
||||
|
||||
void showConnectionManager();
|
||||
void openSqlWindowForConnection(size_t connection_index);
|
||||
void openServerWindowForConnection(size_t connection_index);
|
||||
void openBackupDlgForConnection(size_t connection_index);
|
||||
|
||||
private:
|
||||
MasterController *m_masterController;
|
||||
ConnectionList *m_connectionList = nullptr;
|
||||
ConnectionListModel *m_connectionListModel = nullptr;
|
||||
ConnectionManagerWindow *m_connectionManagerWindow = nullptr;
|
||||
|
||||
/** Using long lived object so it can remember its master password for sometime
|
||||
* if the user wishes it.
|
||||
*/
|
||||
std::shared_ptr<PasswordManager> m_passwordManager;
|
||||
|
||||
/** Retrieves the connection password from the user (directly or through the psk db)
|
||||
*
|
||||
*/
|
||||
bool retrieveConnectionPassword(ConnectionConfig &cc);
|
||||
|
||||
bool getPasswordFromPskdb(const std::string &password_id, std::string &password);
|
||||
|
||||
bool storePasswordInPskdb(const std::string &password_id, const std::string password);
|
||||
|
||||
bool UnlockPasswordManagerIfNeeded();
|
||||
|
||||
static std::string getPskId(const ConnectionConfig &cc);
|
||||
};
|
||||
|
||||
#endif // MASTERCONTROLLER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue