From ef3f312bc580186574032645f4fae4877b8e5763 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 19 May 2018 07:43:56 +0200 Subject: [PATCH] Ref T264, application info list view --- src/blackgui/views/applicationinfoview.cpp | 31 ++++++++++++++++++ src/blackgui/views/applicationinfoview.h | 37 ++++++++++++++++++++++ src/blackgui/views/viewbase.cpp | 1 + 3 files changed, 69 insertions(+) create mode 100644 src/blackgui/views/applicationinfoview.cpp create mode 100644 src/blackgui/views/applicationinfoview.h diff --git a/src/blackgui/views/applicationinfoview.cpp b/src/blackgui/views/applicationinfoview.cpp new file mode 100644 index 000000000..1158bca15 --- /dev/null +++ b/src/blackgui/views/applicationinfoview.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2013 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +#include "applicationinfoview.h" + +using namespace BlackMisc; +using namespace BlackGui::Models; + +namespace BlackGui +{ + namespace Views + { + CApplicationInfoView::CApplicationInfoView(QWidget *parent) : CViewBase(parent) + { + this->standardInit(new CApplicationInfoListModel(this)); + } + + int CApplicationInfoView::otherSwiftVersionsFromDataDirectories() + { + const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories(); + this->updateContainer(others); + return others.size(); + } + } // namespace +} // namespace diff --git a/src/blackgui/views/applicationinfoview.h b/src/blackgui/views/applicationinfoview.h new file mode 100644 index 000000000..80b720e70 --- /dev/null +++ b/src/blackgui/views/applicationinfoview.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2013 + * swift project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level + * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, + * including this file, may be copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE file. + */ + +//! \file + +#ifndef BLACKGUI_VIEWS_APPLICATIONINFOVIEW_H +#define BLACKGUI_VIEWS_APPLICATIONINFOVIEW_H + +#include "blackgui/views/viewbase.h" +#include "blackgui/models/applicationinfolistmodel.h" +#include "blackgui/blackguiexport.h" + +class QWidget; + +namespace BlackGui +{ + namespace Views + { + //! Network servers + class BLACKGUI_EXPORT CApplicationInfoView : public CViewBase + { + public: + //! Constructor + explicit CApplicationInfoView(QWidget *parent = nullptr); + + //! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories + int otherSwiftVersionsFromDataDirectories(); + }; + } +} // ns +#endif // guard diff --git a/src/blackgui/views/viewbase.cpp b/src/blackgui/views/viewbase.cpp index 0fcb02c40..e66852430 100644 --- a/src/blackgui/views/viewbase.cpp +++ b/src/blackgui/views/viewbase.cpp @@ -1708,6 +1708,7 @@ namespace BlackGui template class CViewBase; template class CViewBase; template class CViewBase; + template class CViewBase; template class CViewBase; template class CViewBase; template class CViewBase;