diff --git a/src/3rdParty/Pivy-0.5/CMakeLists.txt b/src/3rdParty/Pivy-0.5/CMakeLists.txt index 3b71e24a1..fc810fb79 100644 --- a/src/3rdParty/Pivy-0.5/CMakeLists.txt +++ b/src/3rdParty/Pivy-0.5/CMakeLists.txt @@ -88,7 +88,7 @@ if(MSVC) debug ${PYTHON_DEBUG_LIBRARY} optimized ${PYTHON_LIBRARY}) else(MSVC) - set(CoinPy_LIBS + set(SoQtPy_LIBS ${SOQT_LIBRARIES} ${COIN3D_LIBRARY} ${PYTHON_LIBRARY}) diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 1db07b7cd..714774d06 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include # include # include # include @@ -102,6 +102,85 @@ void CommandIconView::onSelectionChanged(QListWidgetItem * item, QListWidgetItem emitSelectionChanged(item->toolTip()); } +// ------------------------------------------------------------------------------ + +ActionSelector::ActionSelector(QWidget* parent) + : QWidget(parent) +{ + moveActionRightButton = new QPushButton(this); + moveActionRightButton->setMinimumSize(QSize(30, 30)); + QIcon icon; + icon.addFile(QString::fromUtf8(":/icons/button_right.xpm"), QSize(), QIcon::Normal, QIcon::Off); + moveActionRightButton->setIcon(icon); + gridLayout->addWidget(moveActionRightButton, 1, 1, 1, 1); + + spacerItem = new QSpacerItem(33, 57, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(spacerItem, 5, 1, 1, 1); + spacerItem1 = new QSpacerItem(33, 58, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout->addItem(spacerItem1, 0, 1, 1, 1); + + moveActionLeftButton = new QPushButton(this); + moveActionLeftButton->setMinimumSize(QSize(30, 30)); + QIcon icon1; + icon1.addFile(QString::fromUtf8(":/icons/button_left.xpm"), QSize(), QIcon::Normal, QIcon::Off); + moveActionLeftButton->setIcon(icon1); + moveActionLeftButton->setAutoDefault(true); + moveActionLeftButton->setDefault(false); + + gridLayout->addWidget(moveActionLeftButton, 2, 1, 1, 1); + + moveActionDownButton = new QPushButton(this); + moveActionDownButton->setMinimumSize(QSize(30, 30)); + QIcon icon2; + icon2.addFile(QString::fromUtf8(":/icons/button_down.xpm"), QSize(), QIcon::Normal, QIcon::Off); + moveActionDownButton->setIcon(icon2); + moveActionDownButton->setAutoDefault(true); + + gridLayout->addWidget(moveActionDownButton, 4, 1, 1, 1); + + moveActionUpButton = new QPushButton(this); + moveActionUpButton->setMinimumSize(QSize(30, 30)); + QIcon icon3; + icon3.addFile(QString::fromUtf8(":/icons/button_up.xpm"), QSize(), QIcon::Normal, QIcon::Off); + moveActionUpButton->setIcon(icon3); + + gridLayout->addWidget(moveActionUpButton, 3, 1, 1, 1); + + vboxLayout = new QVBoxLayout(); + vboxLayout->setContentsMargins(0, 0, 0, 0); + label_2 = new QLabel(this); + vboxLayout->addWidget(label_2); + + avalableTreeWidget = new QTreeWidget(this); + avalableTreeWidget->setRootIsDecorated(false); + avalableTreeWidget->setColumnCount(0); + vboxLayout->addWidget(avalableTreeWidget); + + gridLayout->addLayout(vboxLayout, 0, 0, 6, 1); + + vboxLayout1 = new QVBoxLayout(); + vboxLayout1->setContentsMargins(0, 0, 0, 0); + label = new QLabel(this); + vboxLayout1->addWidget(label); + + selectedTreeWidget = new QTreeWidget(this); + vboxLayout1->addWidget(selectedTreeWidget); + + gridLayout->addLayout(vboxLayout1, 0, 2, 6, 1); + + moveActionRightButton->setText(QString()); + moveActionLeftButton->setText(QString()); + moveActionDownButton->setText(QString()); + moveActionUpButton->setText(QString()); + label_2->setText(QApplication::translate("Gui::ActionSelector", "Available:", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("Gui::ActionSelector", "Selected:", 0, QApplication::UnicodeUTF8)); +} + +ActionSelector::~ActionSelector() +{ +} + + // ------------------------------------------------------------------------------ /* TRANSLATOR Gui::AccelLineEdit */ @@ -628,10 +707,10 @@ StatusWidget::StatusWidget(QWidget* parent) label = new QLabel(this); label->setAlignment(Qt::AlignCenter); - QGridLayout* gridLayout = new QGridLayout(this); - gridLayout->setSpacing(6); - gridLayout->setMargin(9); - gridLayout->addWidget(label, 0, 0, 1, 1); + QGridLayout* gridLayout = new QGridLayout(this); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->addWidget(label, 0, 0, 1, 1); } StatusWidget::~StatusWidget() @@ -775,20 +854,20 @@ void LabelEditor::setText(const QString& s) void LabelEditor::changeText() { QDialog dlg(this); - QVBoxLayout* hboxLayout = new QVBoxLayout(&dlg); - QDialogButtonBox* buttonBox = new QDialogButtonBox(&dlg); - buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Close); + QVBoxLayout* hboxLayout = new QVBoxLayout(&dlg); + QDialogButtonBox* buttonBox = new QDialogButtonBox(&dlg); + buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Close); QPlainTextEdit *edit = new QPlainTextEdit(&dlg); edit->setPlainText(this->lineEdit->text()); - - hboxLayout->addWidget(edit); - hboxLayout->addWidget(buttonBox); - connect(buttonBox, SIGNAL(accepted()), &dlg, SLOT(accept())); - connect(buttonBox, SIGNAL(rejected()), &dlg, SLOT(reject())); - if (dlg.exec() == QDialog::Accepted) { - this->lineEdit->setText(edit->toPlainText()); - } + + hboxLayout->addWidget(edit); + hboxLayout->addWidget(buttonBox); + connect(buttonBox, SIGNAL(accepted()), &dlg, SLOT(accept())); + connect(buttonBox, SIGNAL(rejected()), &dlg, SLOT(reject())); + if (dlg.exec() == QDialog::Accepted) { + this->lineEdit->setText(edit->toPlainText()); + } } /** diff --git a/src/Gui/Widgets.h b/src/Gui/Widgets.h index 16baf74b7..a13e407c6 100644 --- a/src/Gui/Widgets.h +++ b/src/Gui/Widgets.h @@ -63,6 +63,30 @@ Q_SIGNALS: // ------------------------------------------------------------------------------ +class ActionSelector : public QWidget +{ +public: + ActionSelector(QWidget* parent=0); + ~ActionSelector(); + +private: + QGridLayout *gridLayout; + QPushButton *moveActionRightButton; + QSpacerItem *spacerItem; + QSpacerItem *spacerItem1; + QPushButton *moveActionLeftButton; + QPushButton *moveActionDownButton; + QPushButton *moveActionUpButton; + QVBoxLayout *vboxLayout; + QLabel *label_2; + QTreeWidget *avalableTreeWidget; + QVBoxLayout *vboxLayout1; + QLabel *label; + QTreeWidget *selectedTreeWidget; +}; + +// ------------------------------------------------------------------------------ + /** * The AccelLineEdit class provides a lineedit to specfify shortcuts. * \author Werner Mayer