Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexidb/kexidbconnectiondata.h
Show All 31 Lines | |||||
32 | /** | 32 | /** | ||
33 | * A KexiDBConnectionData is used to store the details needed for | 33 | * A KexiDBConnectionData is used to store the details needed for | ||
34 | * a connection with a database. | 34 | * a connection with a database. | ||
35 | */ | 35 | */ | ||
36 | class KexiDBConnectionData : public QObject | 36 | class KexiDBConnectionData : public QObject | ||
37 | { | 37 | { | ||
38 | Q_OBJECT | 38 | Q_OBJECT | ||
39 | public: | 39 | public: | ||
40 | KexiDBConnectionData(QObject* parent, KDbConnectionData* data, bool owner); | 40 | KexiDBConnectionData(); | ||
41 | KexiDBConnectionData(QObject* parent, KDbConnectionData* data); | ||||
41 | virtual ~KexiDBConnectionData(); | 42 | virtual ~KexiDBConnectionData(); | ||
42 | KDbConnectionData* data() { | 43 | KDbConnectionData* data() { | ||
43 | return m_data; | 44 | return m_data; | ||
44 | } | 45 | } | ||
45 | 46 | | |||
46 | public Q_SLOTS: | 47 | public Q_SLOTS: | ||
47 | 48 | | |||
48 | /** Return the connection name. */ | 49 | /** Return the connection name. */ | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
91 | /** Set the password. */ | 92 | /** Set the password. */ | ||
92 | void setPassword(const QString& passwd); | 93 | void setPassword(const QString& passwd); | ||
93 | 94 | | |||
94 | /** Return the username. */ | 95 | /** Return the username. */ | ||
95 | const QString userName() const; | 96 | const QString userName() const; | ||
96 | /** Set the username. */ | 97 | /** Set the username. */ | ||
97 | void setUserName(const QString& username); | 98 | void setUserName(const QString& username); | ||
98 | 99 | | |||
99 | // For filebased drivers | | |||
100 | | ||||
101 | /** Return the filename. */ | | |||
102 | const QString fileName() const; | | |||
103 | /** Set the filename. */ | | |||
104 | void setFileName(const QString& filename); | | |||
105 | | ||||
106 | /** Return the database path. */ | | |||
107 | const QString dbPath() const; | | |||
108 | /** Return the database filename. */ | | |||
109 | const QString databaseName() const; | | |||
110 | | ||||
111 | /** Return a user-friendly string representation. */ | 100 | /** Return a user-friendly string representation. */ | ||
112 | const QString toUserVisibleString() const; | 101 | const QString toUserVisibleString() const; | ||
113 | 102 | | |||
114 | private: | 103 | private: | ||
115 | KDbConnectionData* m_data; | 104 | KDbConnectionData *m_data = nullptr; | ||
116 | QString m_dbname; | | |||
117 | bool m_owner; | | |||
118 | }; | 105 | }; | ||
119 | 106 | | |||
120 | } | 107 | } | ||
121 | 108 | | |||
122 | #endif | 109 | #endif | ||
123 | 110 | |