diff options
| author | Tannin <devnull@localhost> | 2013-10-12 13:21:37 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-10-12 13:21:37 +0200 |
| commit | f3cb50057ba5cfe5496fda6ed860b14331fdb5c0 (patch) | |
| tree | 4ec838fbf29740dc94537b801e37f71ce04105dd /src/mainwindow.h | |
| parent | 55183093005318c051d45f35baca6000fe5f430c (diff) | |
- bugfixes to last merge
- fnis-check plugin can now be disabled
Diffstat (limited to 'src/mainwindow.h')
| -rw-r--r-- | src/mainwindow.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/mainwindow.h b/src/mainwindow.h index fab850cf..7d5d4a63 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -50,6 +50,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "savegameinfowidgetgamebryo.h" #include <guessedvalue.h> #include <directoryentry.h> +#include <boost/signals2.hpp> namespace Ui { class MainWindow; @@ -64,6 +65,28 @@ class MainWindow : public QMainWindow, public MOBase::IOrganizer, public MOBase: Q_OBJECT Q_INTERFACES(MOBase::IPluginDiagnose) +private: + + struct SignalCombinerAnd + { + typedef bool result_type; + template<typename InputIterator> + bool operator()(InputIterator first, InputIterator last) const + { + while (first != last) { + if (!(*first)) { + return false; + } + ++first; + } + return true; + } + }; + +public: + + typedef boost::signals2::signal<bool (const QString&), SignalCombinerAnd> SignalAboutToRunApplication; + public: explicit MainWindow(const QString &exeName, QSettings &initSettings, QWidget *parent = 0); ~MainWindow(); @@ -115,7 +138,7 @@ public: virtual QStringList findFiles(const QString &path, const std::function<bool(const QString &)> &filter) const; virtual MOBase::IDownloadManager *downloadManager(); virtual HANDLE startApplication(const QString &executable, const QStringList &args = QStringList(), const QString &cwd = "", const QString &profile = ""); - virtual bool onAboutToRun(const boost::function<bool(const QString&)> &func); + virtual bool onAboutToRun(const std::function<bool(const QString&)> &func); virtual std::vector<unsigned int> activeProblems() const; virtual QString shortDescription(unsigned int key) const; |
