mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 11:02:21 +03:00
gui: Don't use friends to limit access to Hotkey
This commit is contained in:
parent
a691b31b8e
commit
0579101272
@ -68,8 +68,8 @@ void Hotkey::saveSettings(QSettings& settings) const
|
||||
|
||||
QTextStream& operator<<(QTextStream& outStream, const Hotkey& hotkey)
|
||||
{
|
||||
for (int i = 0; i < hotkey.m_Actions.size(); i++)
|
||||
outStream << "\t" << hotkey.text() << " = " << hotkey.m_Actions[i] << endl;
|
||||
for (int i = 0; i < hotkey.actions().size(); i++)
|
||||
outStream << "\t" << hotkey.text() << " = " << hotkey.actions()[i] << endl;
|
||||
|
||||
return outStream;
|
||||
}
|
||||
|
@ -33,17 +33,14 @@ class QSettings;
|
||||
|
||||
class Hotkey
|
||||
{
|
||||
friend class HotkeyDialog;
|
||||
friend QTextStream& operator<<(QTextStream& outStream, const Hotkey& hotkey);
|
||||
|
||||
public:
|
||||
Hotkey();
|
||||
|
||||
public:
|
||||
QString text() const;
|
||||
const KeySequence& keySequence() const { return m_KeySequence; }
|
||||
const ActionList& actions() const { return m_Actions; }
|
||||
void setKeySequence(const KeySequence& seq) { m_KeySequence = seq; }
|
||||
|
||||
const ActionList& actions() const { return m_Actions; }
|
||||
void appendAction(const Action& action) { m_Actions.append(action); }
|
||||
void setAction(int index, const Action& action) { m_Actions[index] = action; }
|
||||
void removeAction(int index) { m_Actions.removeAt(index); }
|
||||
@ -51,8 +48,6 @@ class Hotkey
|
||||
void loadSettings(QSettings& settings);
|
||||
void saveSettings(QSettings& settings) const;
|
||||
|
||||
protected:
|
||||
void setKeySequence(const KeySequence& seq) { m_KeySequence = seq; }
|
||||
|
||||
private:
|
||||
KeySequence m_KeySequence;
|
||||
|
Loading…
Reference in New Issue
Block a user