logic: file associations for Mac and opening project files via Mac OS

* hide start screen when opening with project file
* added project icon file to bundle and file type association to plist
* listen for file open events from double click or drag and drop
* fixed crashes in window handling
This commit is contained in:
Eberhard Graether
2016-02-02 13:20:05 +01:00
parent 29a70b8f70
commit 3cbafa6456
18 changed files with 183 additions and 40 deletions
+8 -2
View File
@@ -5,7 +5,8 @@
#include "qt/window/QtMainWindow.h"
QtMainView::QtMainView()
: m_setTitleFunctor(std::bind(&QtMainView::doSetTitle, this, std::placeholders::_1))
: m_hideStartScreenFunctor(std::bind(&QtMainView::doHideStartScreen, this))
, m_setTitleFunctor(std::bind(&QtMainView::doSetTitle, this, std::placeholders::_1))
, m_activateWindowFunctor(std::bind(&QtMainView::doActivateWindow, this))
, m_updateRecentProjectMenuFunctor(std::bind(&QtMainView::doUpdateRecentProjectMenu, this))
, m_showLicenseScreenFunctor(std::bind(&QtMainView::doShowLicenseScreen, this))
@@ -69,7 +70,7 @@ void QtMainView::setStatusBar(QStatusBar* statusbar)
void QtMainView::hideStartScreen()
{
m_window->clearWindows();
m_hideStartScreenFunctor();
}
void QtMainView::setTitle(const std::string& title)
@@ -97,6 +98,11 @@ void QtMainView::doUpdateRecentProjectMenu()
m_window->updateRecentProjectMenu();
}
void QtMainView::doHideStartScreen()
{
m_window->clearWindows();
}
void QtMainView::doSetTitle(const std::string& title)
{
m_window->setWindowTitle(QString::fromStdString(title));