Start implementing ActionSelector class
This commit is contained in:
parent
8d19906db4
commit
3858f8a268
2
src/3rdParty/Pivy-0.5/CMakeLists.txt
vendored
2
src/3rdParty/Pivy-0.5/CMakeLists.txt
vendored
|
@ -88,7 +88,7 @@ if(MSVC)
|
||||||
debug ${PYTHON_DEBUG_LIBRARY}
|
debug ${PYTHON_DEBUG_LIBRARY}
|
||||||
optimized ${PYTHON_LIBRARY})
|
optimized ${PYTHON_LIBRARY})
|
||||||
else(MSVC)
|
else(MSVC)
|
||||||
set(CoinPy_LIBS
|
set(SoQtPy_LIBS
|
||||||
${SOQT_LIBRARIES}
|
${SOQT_LIBRARIES}
|
||||||
${COIN3D_LIBRARY}
|
${COIN3D_LIBRARY}
|
||||||
${PYTHON_LIBRARY})
|
${PYTHON_LIBRARY})
|
||||||
|
|
|
@ -102,6 +102,85 @@ void CommandIconView::onSelectionChanged(QListWidgetItem * item, QListWidgetItem
|
||||||
emitSelectionChanged(item->toolTip());
|
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 */
|
/* TRANSLATOR Gui::AccelLineEdit */
|
||||||
|
|
|
@ -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.
|
* The AccelLineEdit class provides a lineedit to specfify shortcuts.
|
||||||
* \author Werner Mayer
|
* \author Werner Mayer
|
||||||
|
|
Loading…
Reference in New Issue
Block a user