Commit 6c3611f2 authored by Jan Möbius's avatar Jan Möbius

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2946 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e49df74d
......@@ -12,12 +12,12 @@
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
//
// OpenFlipper is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenFlipper. If not, see <http://www.gnu.org/licenses/>.
//
......@@ -55,7 +55,7 @@
#include "TreeModel.hh"
/** Plugin for controlling the Object data structures (Show,hide Object, Target, Source selection
/** Plugin for controlling the Object data structures (Show,hide Object, Target, Source selection
*/
class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, GlobalAccessInterface, KeyInterface , LoggingInterface, INIInterface, ContextMenuInterface, ScriptInterface
{
......@@ -67,112 +67,112 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, Globa
Q_INTERFACES(LoggingInterface)
Q_INTERFACES(INIInterface)
Q_INTERFACES(ContextMenuInterface)
Q_INTERFACES(ScriptInterface)
Q_INTERFACES(ScriptInterface)
signals:
/// Force Examiner widget to update their views
void update_view();
/// Emit this Signal, if object list has changed (e.g. Source or Target changed)
void updated_objects(int);
void activeObjectChanged();
void log(Logtype _type, QString _message);
void log(QString _message);
void addContextMenu(QMenu* _menu );
void addContextMenu(QMenu* _menu ,DataType _objectType , ContextMenuType _type );
private slots :
/// Updates the table widget
void slotObjectUpdated( int _identifier );
void slotActiveObjectChanged();
void slotKeyEvent( QKeyEvent* _event );
void loadIniFileOptions( INIFile& _ini );
void saveIniFileOptions( INIFile& _ini );
void pluginsInitialized();
public :
~DataControlPlugin() {};
/** Initialize the toolbar (create a widget in the right side toolbox)\n
* Creates Table and buttons */
bool initializeToolbox(QWidget*& _widget);
/// Sets examiner Widget (dummy here, using update_view signal here)
void set_examiner(ACG::QtWidgets::QtExaminerViewer* /* _examiner_widget */ ) { };
/// Name of the Plugin
/// Name of the Plugin
QString name(){ return (QString("DataControl")); };
/// Description of the Plugin
QString description() { return (QString("Manages Data Objects")); };
/// User selected plugins Toolbox
void toolboxActivated( bool /* _activated */ ) { };
void toolboxActivated( bool /* _activated */ ) { };
/// Update the visualization of the active objects
void update_active( );
private :
/// Widget for Toolbox
QWidget* tool_;
/// Layout for Toolbox
QGridLayout* MeshDialogLayout_;
/// Table containing Mesh information and status
QTableWidget* objectList_;
/// Flag set to true if meshlist is updated, preventing signal for list udate to be called
bool locked;
/// The Treemodel organizing the data
TreeModel* model_;
TreeModel* model_;
///Tree view
QTreeView* view_;
/// Pointer to the header to the view widget
QHeaderView * viewHeader_;
/// Delegate for boolean values
//QCheckBoxDelegate* checkboxDelegate_;
ACG::QtWidgets::QtExaminerViewer* examiner_widget_;
private slots:
/// This slot is called when the mesh selection changed in the table
void slotCellClicked(int _row, int _col);
/// Vertical header of the list has been clicked
void verticalHeaderClicked( int _row );
void verticalCountClicked( int id , int old , int newc );
void verticalCountClicked( int id , int old , int newc );
//===========================================================================
/** @name Slots which are called if data changed
* @{ */
//===========================================================================
/// Gets called when the data in the table has changed
void slotDataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight );
/// called when an object is removed from the view
void slotRowsRemoved ( const QModelIndex & _parent, int _start, int _end );
/** @} */
/** @} */
//===========================================================================
/** @name Popup Menu related
* @{ */
......@@ -180,99 +180,102 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, Globa
private slots:
/// Display a custom context window for the TreeView
void slotCustomContextMenuRequested ( const QPoint & _pos );
/// Called by the popup menu to remove an object/group
void slotPopupRemove( );
/// Called by the popup menu to ungroup items
void slotUngroup ( );
/// Called by the popup menu to group items
void slotGroup ( );
///Called by the popup menu to rename items
void slotRename ( );
///Called by the popup menu to zoom to an object
void slotZoomTo();
private :
/// Index where a popup has been opened
QModelIndex popupIndex_;
private slots:
/// Display a custom context window for the TreeViews header
void slotHeaderCustomContextMenuRequested ( const QPoint & _pos );
private:
/// Defines the section of the Popup
int headerPopupType_;
/** @} */
/** @} */
//===========================================================================
/** @name GL Area Context Menu related slots
* @{ */
//===========================================================================
private slots:
/// Hide an object
void slotContextMenuHide( );
/// Target Selection
void slotContextMenuTarget( );
/// Source Selection
void slotContextMenuSource( );
/// Update the context Menus for the given id
void slotUpdateContextMenu( int _objectId);
private :
QAction* targetAction_;
QAction* sourceAction_;
/** @} */
/** @} */
//===========================================================================
/** @name Scripting functions
* @{ */
//===========================================================================
public slots:
/// Get the Objects name from the id
QString getObjectName( int objectId );
/// Get the id of an object by its name
int getObject( QString _name );
/// Hide the given Object
void hideObject( int objectId );
/// Show the given Object
void showObject( int objectId );
void showObject( int objectId );
/// Makes all available objects target
void setAllTarget();
/// Makes all available objects source
void setAllSource();
/// Unselect all objects
void clearAllTarget();
/// remove source selection from all objects
void clearAllSource();
/// Shows all objects
void showAll();
/// Hides all objects
void hideAll();
/** @} */
/** @} */
public slots:
QString version() { return QString("1.0"); };
};
#endif //COLORPLUGIN_HH
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment