add button to lock group edits
This commit is contained in:
parent
abc433bc78
commit
b620e3d816
6 changed files with 58 additions and 11 deletions
|
@ -89,8 +89,8 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources/images.qrc">
|
<iconset resource="../resources/images.qrc">
|
||||||
<normaloff>:/icons/folder_eye_closed.ico</normaloff>
|
<normaloff>:/icons/folder_eye_open.ico</normaloff>
|
||||||
<normalon>:/icons/folder_eye_open.ico</normalon>
|
<normalon>:/icons/folder_eye_closed.ico</normalon>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="popupMode">
|
<property name="popupMode">
|
||||||
|
@ -144,6 +144,31 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButton_EnableDisable_EditGroups">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Toggle editability of group folders</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../resources/images.qrc">
|
||||||
|
<normaloff>:/icons/lock_edit.ico</normaloff>
|
||||||
|
<normalon>:/icons/unlock_edit.ico</normalon>
|
||||||
|
</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="popupMode">
|
||||||
|
<enum>QToolButton::InstantPopup</enum>
|
||||||
|
</property>
|
||||||
|
<property name="autoRaise">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_8">
|
<spacer name="horizontalSpacer_8">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -249,8 +274,8 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources/images.qrc">
|
<iconset resource="../resources/images.qrc">
|
||||||
<normaloff>:/icons/folder_eye_closed.ico</normaloff>
|
<normaloff>:/icons/folder_eye_open.ico</normaloff>
|
||||||
<normalon>:/icons/folder_eye_open.ico</normalon>
|
<normalon>:/icons/folder_eye_closed.ico</normalon>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="popupMode">
|
<property name="popupMode">
|
||||||
|
@ -409,8 +434,8 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../resources/images.qrc">
|
<iconset resource="../resources/images.qrc">
|
||||||
<normaloff>:/icons/folder_eye_closed.ico</normaloff>
|
<normaloff>:/icons/folder_eye_open.ico</normaloff>
|
||||||
<normalon>:/icons/folder_eye_open.ico</normalon>
|
<normalon>:/icons/folder_eye_closed.ico</normalon>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="popupMode">
|
<property name="popupMode">
|
||||||
|
|
|
@ -282,6 +282,7 @@ private slots:
|
||||||
void on_toolButton_HideShow_Groups_clicked();
|
void on_toolButton_HideShow_Groups_clicked();
|
||||||
void on_toolButton_ExpandAll_Groups_clicked();
|
void on_toolButton_ExpandAll_Groups_clicked();
|
||||||
void on_toolButton_CollapseAll_Groups_clicked();
|
void on_toolButton_CollapseAll_Groups_clicked();
|
||||||
|
void on_toolButton_EnableDisable_EditGroups_clicked();
|
||||||
void on_toolButton_HideShow_Areas_clicked();
|
void on_toolButton_HideShow_Areas_clicked();
|
||||||
void on_toolButton_ExpandAll_Areas_clicked();
|
void on_toolButton_ExpandAll_Areas_clicked();
|
||||||
void on_toolButton_CollapseAll_Areas_clicked();
|
void on_toolButton_CollapseAll_Areas_clicked();
|
||||||
|
|
BIN
resources/icons/lock_edit.ico
Normal file
BIN
resources/icons/lock_edit.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
BIN
resources/icons/unlock_edit.ico
Normal file
BIN
resources/icons/unlock_edit.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -18,6 +18,8 @@
|
||||||
<file>icons/folder_map_opened.ico</file>
|
<file>icons/folder_map_opened.ico</file>
|
||||||
<file>icons/folder_map.ico</file>
|
<file>icons/folder_map.ico</file>
|
||||||
<file>icons/folder.ico</file>
|
<file>icons/folder.ico</file>
|
||||||
|
<file>icons/lock_edit.ico</file>
|
||||||
|
<file>icons/unlock_edit.ico</file>
|
||||||
<file>icons/map_edited.ico</file>
|
<file>icons/map_edited.ico</file>
|
||||||
<file>icons/map_opened.ico</file>
|
<file>icons/map_opened.ico</file>
|
||||||
<file>icons/map.ico</file>
|
<file>icons/map.ico</file>
|
||||||
|
|
|
@ -1179,11 +1179,12 @@ bool MainWindow::populateMapList() {
|
||||||
ui->layoutList->setModel(layoutListProxyModel);
|
ui->layoutList->setModel(layoutListProxyModel);
|
||||||
|
|
||||||
/// !TODO
|
/// !TODO
|
||||||
ui->mapList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
// ui->mapList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
ui->mapList->setDragEnabled(true);
|
// ui->mapList->setDragEnabled(true);
|
||||||
ui->mapList->setAcceptDrops(true);
|
// ui->mapList->setAcceptDrops(true);
|
||||||
ui->mapList->setDropIndicatorShown(true);
|
// ui->mapList->setDropIndicatorShown(true);
|
||||||
ui->mapList->setDragDropMode(QAbstractItemView::InternalMove);
|
// ui->mapList->setDragDropMode(QAbstractItemView::InternalMove);
|
||||||
|
on_toolButton_EnableDisable_EditGroups_clicked();
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -2852,6 +2853,24 @@ void MainWindow::on_toolButton_CollapseAll_Groups_clicked() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_toolButton_EnableDisable_EditGroups_clicked() {
|
||||||
|
if (this->ui->toolButton_EnableDisable_EditGroups->isChecked()) {
|
||||||
|
ui->mapList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||||
|
ui->mapList->setDragEnabled(true);
|
||||||
|
ui->mapList->setAcceptDrops(true);
|
||||||
|
ui->mapList->setDropIndicatorShown(true);
|
||||||
|
ui->mapList->setDragDropMode(QAbstractItemView::InternalMove);
|
||||||
|
ui->mapList->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed);
|
||||||
|
} else {
|
||||||
|
ui->mapList->setSelectionMode(QAbstractItemView::NoSelection);
|
||||||
|
ui->mapList->setDragEnabled(false);
|
||||||
|
ui->mapList->setAcceptDrops(false);
|
||||||
|
ui->mapList->setDropIndicatorShown(false);
|
||||||
|
ui->mapList->setDragDropMode(QAbstractItemView::NoDragDrop);
|
||||||
|
ui->mapList->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_toolButton_HideShow_Areas_clicked() {
|
void MainWindow::on_toolButton_HideShow_Areas_clicked() {
|
||||||
if (ui->areaList) {
|
if (ui->areaList) {
|
||||||
this->areaListProxyModel->toggleHideEmpty();
|
this->areaListProxyModel->toggleHideEmpty();
|
||||||
|
|
Loading…
Reference in a new issue