-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renamed all classes etc Removed redundant code left over from copy
- Loading branch information
1 parent
4c067c6
commit 5eb468c
Showing
7 changed files
with
107 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "ExampleActionsPlugin.h" | ||
|
||
#include <CoreInterface.h> | ||
|
||
#include <QDebug> | ||
|
||
Q_PLUGIN_METADATA(IID "studio.manivault.ExampleActionsPlugin") | ||
|
||
using namespace mv; | ||
|
||
ExampleActionsPlugin::ExampleActionsPlugin(const PluginFactory* factory) : | ||
ViewPlugin(factory) | ||
{ | ||
} | ||
|
||
void ExampleActionsPlugin::init() | ||
{ | ||
// Create layout | ||
auto layout = new QVBoxLayout(); | ||
|
||
layout->setContentsMargins(0, 0, 0, 0); | ||
|
||
// Apply the layout | ||
getWidget().setLayout(layout); | ||
} | ||
|
||
ViewPlugin* ExampleActionsPluginFactory::produce() | ||
{ | ||
return new ExampleActionsPlugin(this); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#pragma once | ||
|
||
#include <ViewPlugin.h> | ||
|
||
#include <QWidget> | ||
|
||
/** All plugin related classes are in the ManiVault plugin namespace */ | ||
using namespace mv::plugin; | ||
|
||
/** Drop widget used in this plugin is located in the ManiVault gui namespace */ | ||
using namespace mv::gui; | ||
|
||
/** Dataset reference used in this plugin is located in the ManiVault util namespace */ | ||
using namespace mv::util; | ||
|
||
/** | ||
* Example actions view plugin class | ||
* | ||
* This view plugin class provides skeleton code that shows how to use GUI building | ||
* blocks (aka actions) to build interfaces. | ||
* | ||
* To see the plugin in action, please follow the steps below: | ||
* | ||
* 1. Go to the visualization menu in ManiVault | ||
* 2. Choose the Example actions menu item, the view will be added to the layout | ||
* | ||
* @author T. Kroes | ||
*/ | ||
class ExampleActionsPlugin : public ViewPlugin | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
|
||
/** | ||
* Construct with pointer to plugin \p factory | ||
* @param factory Pointer to the plugin factory | ||
*/ | ||
ExampleActionsPlugin(const PluginFactory* factory); | ||
|
||
/** Destructor */ | ||
~ExampleActionsPlugin() override = default; | ||
|
||
/** This function is called by the core after the view plugin has been created */ | ||
void init() override; | ||
}; | ||
|
||
/** | ||
* Example actions plugin factory class | ||
* | ||
* Note: Factory does not need to be altered (merely responsible for generating new plugins when requested) | ||
*/ | ||
class ExampleActionsPluginFactory : public ViewPluginFactory | ||
{ | ||
Q_INTERFACES(mv::plugin::ViewPluginFactory mv::plugin::PluginFactory) | ||
Q_OBJECT | ||
Q_PLUGIN_METADATA(IID "studio.manivault.ExampleActionsPlugin" | ||
FILE "ExampleActionsPlugin.json") | ||
|
||
public: | ||
|
||
/** Default constructor */ | ||
ExampleActionsPluginFactory() {} | ||
|
||
/** Destructor */ | ||
~ExampleActionsPluginFactory() override {} | ||
|
||
/** Creates an instance of the example view plugin */ | ||
ViewPlugin* produce() override; | ||
}; |
2 changes: 1 addition & 1 deletion
2
ExampleActions/src/ExampleViewPlugin.json → ExampleActions/src/ExampleActionsPlugin.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name" : "Example View", | ||
"name" : "Example Actions", | ||
"version" : "1.1", | ||
"dependencies" : ["Points"] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.