mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #525, stash view
* allow to stash and unstash models from vPilot and own models * removed stash main area and moved it into mapping component * own stash component * use the new functions for modles/views from the prevuous steps
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#define BLACKGUI_COMPONENTS_DBSTASHCOMPONENT_H
|
||||
|
||||
#include "blackgui/components/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/menudelegate.h"
|
||||
#include "blackgui/views/aircraftmodelview.h"
|
||||
#include "blackmisc/network/webdataservicesprovider.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
@@ -46,10 +48,43 @@ namespace BlackGui
|
||||
//! Graceful shutdown
|
||||
void gracefulShutdown();
|
||||
|
||||
//! Test the given model if it can be stashed
|
||||
BlackMisc::CStatusMessage validateStashModel(const BlackMisc::Simulation::CAircraftModel &model) const;
|
||||
|
||||
//! Stash given model
|
||||
BlackMisc::CStatusMessage stashModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
//! Stash given models
|
||||
BlackMisc::CStatusMessageList stashModels(const BlackMisc::Simulation::CAircraftModelList &models);
|
||||
|
||||
//! The embedded view
|
||||
const BlackGui::Views::CAircraftModelView *getView() const;
|
||||
|
||||
signals:
|
||||
//! Unstash
|
||||
void unstashed(BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
private slots:
|
||||
//! Unstash pressed
|
||||
void ps_onUnstashPressed();
|
||||
|
||||
//! Validate pressed
|
||||
void ps_onValidatePressed();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CDbStashComponent> ui;
|
||||
};
|
||||
|
||||
//! Custom menu for the stashed models
|
||||
class CStashModelsMenu : public BlackGui::IMenuDelegate
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
CStashModelsMenu(CDbStashComponent *parent, bool separatorAtEnd) : IMenuDelegate(parent, separatorAtEnd) {}
|
||||
|
||||
//! \copydoc IMenuDelegate::customMenu
|
||||
virtual void customMenu(QMenu &menu) const override;
|
||||
};
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
|
||||
Reference in New Issue
Block a user