Skip to content

Format all cloud_composer files that are not in any open PRs. #6297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 32 additions & 37 deletions apps/cloud_composer/include/pcl/apps/cloud_composer/cloud_browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,35 @@

class QItemSelectionModel;

namespace pcl
{
namespace cloud_composer
{
/** \brief View class for displaying project composition
* \author Jeremie Papon
* \ingroup cloud_composer
*/
class ProjectModel;
class CloudBrowser : public QTreeView
{
Q_OBJECT
public:
CloudBrowser (QWidget* parent = nullptr);

void
setModel (QAbstractItemModel* new_model) override;

private:
ProjectModel* current_project_model_;

};

class BackgroundDelegate : public QStyledItemDelegate
{
public:
explicit
BackgroundDelegate (QObject *parent = nullptr)
: QStyledItemDelegate(parent) {}

void
paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;

};

}
}
namespace pcl {
namespace cloud_composer {
/** \brief View class for displaying project composition
* \author Jeremie Papon
* \ingroup cloud_composer
*/
class ProjectModel;
class CloudBrowser : public QTreeView {
Q_OBJECT
public:
CloudBrowser(QWidget* parent = nullptr);

void
setModel(QAbstractItemModel* new_model) override;

private:
ProjectModel* current_project_model_;
};

class BackgroundDelegate : public QStyledItemDelegate {
public:
explicit BackgroundDelegate(QObject* parent = nullptr) : QStyledItemDelegate(parent)
{}

void
paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index) const override;
};

} // namespace cloud_composer
} // namespace pcl
243 changes: 120 additions & 123 deletions apps/cloud_composer/include/pcl/apps/cloud_composer/cloud_composer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,133 +37,130 @@

#pragma once

//PCL
// PCL
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>

#include <ui_cloud_composer_main_window.h>

class QTreeView;

namespace pcl
{
namespace cloud_composer
{
class ProjectModel;
class CloudViewer;
class CloudCommand;
class ToolFactory;
class ToolBoxModel;
class SignalMultiplexer;

/** \brief MainWindow of cloud_composer application
* \author Jeremie Papon
* \ingroup cloud_composer
* The following member objects are defined in the ui file and can be manipulated:
* * cloud_viewer_ is the view which contains the PCLVisualizer & QVTKWidget
* * cloud_browser_ is the tree view in the left dock
* * item_inspector_ is the details view in the left dock
* * tool_box_view_ is the tool box in right dock
* * tool_parameter_view_ shows adjustable parameters for currently selected tool
* * undo_view_ is the undo stack view in the right dock
*/
class ComposerMainWindow : public QMainWindow, private Ui::ComposerMainWindow
{
Q_OBJECT
public:
explicit ComposerMainWindow (QWidget *parent = nullptr);
~ComposerMainWindow ();

Q_SIGNALS:
/** \brief Signal emitted when the active project is switched - ie a different project tab is selected */
void
activeProjectChanged (ProjectModel* new_model, ProjectModel* previous_model);

/** \brief This signal tells the current project to insert a cloud using a file dialog box */
void
insertNewCloudFromFile ();

/** \brief This signal tells the current project to insert a cloud from and RGB and Depth image using a file dialog box */
void
insertNewCloudFromRGBandDepth ();

/** \brief This signal tells the current project to save currently selected cloud to file */
void
saveSelectedCloudToFile ();

public Q_SLOTS:
//Slots for File Menu Actions
void
on_action_new_project__triggered (/*QString name = "unsaved project"*/);
void
on_action_open_cloud_as_new_project__triggered ();
void
on_action_open_project__triggered ();
void
on_action_save_project__triggered ();
void
on_action_save_project_as__triggered ();
void
on_action_save_selected_cloud__triggered ();
void
on_action_exit__triggered ();

//Slots for Edit Menu Actions
void
on_action_insert_from_file__triggered ();
void
on_action_insert_from_openNi_source__triggered ();
void
on_action_insert_from_rgb_depth__triggered ();



void
setCurrentModel (ProjectModel* model);

void
setMouseStyleAction (interactor_styles::INTERACTOR_STYLES selected_style);

void
enqueueToolAction (AbstractTool* tool);

private:
void
connectFileActions ();
void
connectEditActions ();

void
connectViewActions ();

void
initializeCloudBrowser ();
void
initializeCloudViewer ();
void
initializeItemInspector ();

void
initializeToolBox ();
void
initializePlugins ();


/** \brief Pointer to the model which is currently being viewed */
ProjectModel* current_model_;
QItemSelectionModel* current_selection_model_;

QMap <QString, ProjectModel*> name_model_map_;

QUndoGroup *undo_group_;

QItemSelectionModel* tool_selection_model_;
ToolBoxModel* tool_box_model_;

SignalMultiplexer* multiplexer_;

QActionGroup* mouse_style_group_;
};

}
}
namespace pcl {
namespace cloud_composer {
class ProjectModel;
class CloudViewer;
class CloudCommand;
class ToolFactory;
class ToolBoxModel;
class SignalMultiplexer;

/** \brief MainWindow of cloud_composer application
* \author Jeremie Papon
* \ingroup cloud_composer
* The following member objects are defined in the ui file and can be manipulated:
* * cloud_viewer_ is the view which contains the PCLVisualizer & QVTKWidget
* * cloud_browser_ is the tree view in the left dock
* * item_inspector_ is the details view in the left dock
* * tool_box_view_ is the tool box in right dock
* * tool_parameter_view_ shows adjustable parameters for currently selected tool
* * undo_view_ is the undo stack view in the right dock
*/
class ComposerMainWindow : public QMainWindow, private Ui::ComposerMainWindow {
Q_OBJECT
public:
explicit ComposerMainWindow(QWidget* parent = nullptr);
~ComposerMainWindow();

Q_SIGNALS:
/** \brief Signal emitted when the active project is switched - ie a different project
* tab is selected */
void
activeProjectChanged(ProjectModel* new_model, ProjectModel* previous_model);

/** \brief This signal tells the current project to insert a cloud using a file dialog
* box */
void
insertNewCloudFromFile();

/** \brief This signal tells the current project to insert a cloud from and RGB and
* Depth image using a file dialog box */
void
insertNewCloudFromRGBandDepth();

/** \brief This signal tells the current project to save currently selected cloud to
* file */
void
saveSelectedCloudToFile();

public Q_SLOTS:
// Slots for File Menu Actions
void on_action_new_project__triggered(/*QString name = "unsaved project"*/);
void
on_action_open_cloud_as_new_project__triggered();
void
on_action_open_project__triggered();
void
on_action_save_project__triggered();
void
on_action_save_project_as__triggered();
void
on_action_save_selected_cloud__triggered();
void
on_action_exit__triggered();

// Slots for Edit Menu Actions
void
on_action_insert_from_file__triggered();
void
on_action_insert_from_openNi_source__triggered();
void
on_action_insert_from_rgb_depth__triggered();

void
setCurrentModel(ProjectModel* model);

void
setMouseStyleAction(interactor_styles::INTERACTOR_STYLES selected_style);

void
enqueueToolAction(AbstractTool* tool);

private:
void
connectFileActions();
void
connectEditActions();

void
connectViewActions();

void
initializeCloudBrowser();
void
initializeCloudViewer();
void
initializeItemInspector();

void
initializeToolBox();
void
initializePlugins();

/** \brief Pointer to the model which is currently being viewed */
ProjectModel* current_model_;
QItemSelectionModel* current_selection_model_;

QMap<QString, ProjectModel*> name_model_map_;

QUndoGroup* undo_group_;

QItemSelectionModel* tool_selection_model_;
ToolBoxModel* tool_box_model_;

SignalMultiplexer* multiplexer_;

QActionGroup* mouse_style_group_;
};

} // namespace cloud_composer
} // namespace pcl
Loading