diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2020-10-26 21:39:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-26 21:39:13 +0100 |
| commit | 61308ae2a6ed1123d3043659e72e300dc5c68cca (patch) | |
| tree | 69976cb8870e1bffda3d149627123e1ecf24c654 /src/organizercore.cpp | |
| parent | 0ca5d2843e48169e58978439f9f6bc60c579efce (diff) | |
| parent | d42399e419fa6b769e343b8cf77480b6ac172b0f (diff) | |
Merge branch 'master' into imodlist-updates
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 82305c1a..b39d3ec0 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -377,6 +377,22 @@ void OrganizerCore::userInterfaceInitialized() m_UserInterfaceInitialized(m_UserInterface->mainWindow()); } +void OrganizerCore::profileCreated(MOBase::IProfile* profile) +{ + m_ProfileCreated(profile); +} + +void OrganizerCore::profileRenamed(MOBase::IProfile* profile, QString const& oldName, QString const& newName) +{ + m_ProfileRenamed(profile, oldName, newName); +} + +void OrganizerCore::profileRemoved(QString const& profileName) +{ + m_ProfileRemoved(profileName); +} + + void OrganizerCore::externalMessage(const QString &message) { if (MOShortcut moshortcut{ message } ) { @@ -469,6 +485,7 @@ void OrganizerCore::createDefaultProfile() if (QDir(profilesPath).entryList(QDir::AllDirs | QDir::NoDotAndDotDot).size() == 0) { Profile newProf("Default", managedGame(), false); + m_ProfileCreated(&newProf); } } @@ -1120,6 +1137,21 @@ bool OrganizerCore::onUserInterfaceInitialized(std::function<void(QMainWindow*)> return m_UserInterfaceInitialized.connect(func).connected(); } +bool OrganizerCore::onProfileCreated(std::function<void(MOBase::IProfile*)> const& func) +{ + return m_ProfileCreated.connect(func).connected(); +} + +bool OrganizerCore::onProfileRenamed(std::function<void(MOBase::IProfile*, QString const&, QString const&)> const& func) +{ + return m_ProfileRenamed.connect(func).connected(); +} + +bool OrganizerCore::onProfileRemoved(std::function<void(QString const&)> const& func) +{ + return m_ProfileRemoved.connect(func).connected(); +} + bool OrganizerCore::onProfileChanged(std::function<void(IProfile*, IProfile*)> const& func) { return m_ProfileChanged.connect(func).connected(); |
