Commit 7cb4ddad authored by Dirk Wilden's avatar Dirk Wilden

add collapsing to toolboxes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10539 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4b94489f
......@@ -179,10 +179,21 @@ void DataControlPlugin::initializePlugin()
connect( viewHeader_, SIGNAL(customContextMenuRequested ( const QPoint & ) ),
this, SLOT(slotHeaderCustomContextMenuRequested ( const QPoint & ) ));
emit addToolbox("Data Control", tool_);
toolIcon_ = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-toolbox.png");
emit addToolbox("Data Control", tool_, toolIcon_);
onlyDown_ = 0;
onlyUp_ = 0;
QIcon icon = QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-boundingBox.png");
tool_->boundingBoxBtn->setIcon( icon );
icon = QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-hide-object.png");
tool_->visibleDataBtn->setIcon( icon );
//hide additional boxes
tool_->visibleDataBtn->setChecked(false);
tool_->boundingBoxBtn->setChecked(false);
}
......@@ -321,6 +332,7 @@ void DataControlPlugin::fileOpened(int _id){
model_->objectAdded(obj);
slotShowLightSources(tool_->lightSources->checkState());
view_->resizeColumnToContents(0);
}
......
......@@ -99,7 +99,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
void copyObject( int _oldId, int& _newId);
// ToolboxInterface
void addToolbox( QString _name , QWidget* _widget );
void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
private slots :
// BaseInterface
......@@ -136,6 +136,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
private :
/// Widget for Toolbox
DatacontrolToolboxWidget* tool_;
QIcon* toolIcon_;
/// Layout for Toolbox
QGridLayout* MeshDialogLayout_;
......
......@@ -483,6 +483,7 @@ void DataControlPlugin::slotRename(){
item->name(), &ok);
if (ok && !newName.isEmpty()){
item->setName(newName);
view_->resizeColumnToContents(0);
}
}
}
......
......@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>333</width>
<height>560</height>
<width>268</width>
<height>456</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="DataControlTreeView" name="treeView">
<property name="minimumSize">
......@@ -37,11 +40,24 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Visible Data</string>
<widget class="QPushButton" name="visibleDataBtn">
<property name="text">
<string>Object Visibility</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="visibleDataWidget" native="true">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="lightSources">
<property name="text">
......@@ -53,35 +69,51 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="boundingBoxBtn">
<property name="text">
<string>Object Bounding Box</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="boundingBoxWidget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="notSelected">
<property name="text">
<string>Not selected</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="sourceSelected">
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="targetSelected">
<property name="text">
<string>Target</string>
</property>
</widget>
</item>
</layout>
<widget class="QCheckBox" name="notSelected">
<property name="text">
<string>Show always</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="sourceSelected">
<property name="text">
<string>Show on source objects</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="targetSelected">
<property name="text">
<string>Show on target objects</string>
</property>
</widget>
</item>
</layout>
</widget>
......@@ -96,5 +128,38 @@
</customwidget>
</customwidgets>
<resources/>
<connections/>
<connections>
<connection>
<sender>visibleDataBtn</sender>
<signal>toggled(bool)</signal>
<receiver>visibleDataWidget</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>161</x>
<y>276</y>
</hint>
<hint type="destinationlabel">
<x>160</x>
<y>302</y>
</hint>
</hints>
</connection>
<connection>
<sender>boundingBoxBtn</sender>
<signal>toggled(bool)</signal>
<receiver>boundingBoxWidget</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>138</x>
<y>345</y>
</hint>
<hint type="destinationlabel">
<x>133</x>
<y>373</y>
</hint>
</hints>
</connection>
</connections>
</ui>
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