Files
pilotclient/src/blackgui/views/applicationinfoview.h
Klaus Basan 7fc6fcb867 Improved version of "Allow to delete data directory from application view"
- split functions into dynamic loading and const versions (loading at startup)
- reload other versions from wizard in case they changed
- some renaming/formatting
2018-12-02 04:27:59 +01:00

60 lines
2.0 KiB
C++

/* 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/menus/menudelegate.h"
#include "blackgui/blackguiexport.h"
#include <QAction>
namespace BlackGui
{
namespace Views
{
//! Network servers
class BLACKGUI_EXPORT CApplicationInfoView : public CViewBase<Models::CApplicationInfoListModel, BlackMisc::CApplicationInfoList, BlackMisc::CApplicationInfo>
{
public:
//! Constructor
explicit CApplicationInfoView(QWidget *parent = nullptr);
//! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
int otherSwiftVersionsFromDataDirectories(bool reInit = false);
//! Delete the selected directories
void deleteSelectedDataDirectories();
};
//! Menu base class for aircraft model view menus
class CApplicationInfoMenu : public Menus::IMenuDelegate
{
public:
//! Constructor
CApplicationInfoMenu(CApplicationInfoView *modelView) : Menus::IMenuDelegate(modelView)
{}
//! \copydoc Menus::IMenuDelegate::customMenu
virtual void customMenu(Menus::CMenuActions &menuActions);
private:
//! Model view
CApplicationInfoView *view() const;
QAction *m_menuActionDeleteDirectory = nullptr; //!< action to delete menu
};
} // ns
} // ns
#endif // guard