mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +08:00
Allow to delete data directory from application view
* allow to re-init applicazion list (needed because directories can be deleted) * context menu for "delete data directory"
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
|
||||
#include "blackgui/views/viewbase.h"
|
||||
#include "blackgui/models/applicationinfolistmodel.h"
|
||||
#include "blackgui/menus/menudelegate.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
|
||||
class QWidget;
|
||||
#include <QAction>
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
@@ -31,7 +32,28 @@ namespace BlackGui
|
||||
|
||||
//! BlackMisc::CApplicationInfoList::otherSwiftVersionsFromDataDirectories
|
||||
int otherSwiftVersionsFromDataDirectories();
|
||||
|
||||
//! 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
|
||||
|
||||
Reference in New Issue
Block a user