mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Double clicking on a title block template now opens a dedicated editor.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1414 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
5582ec974c
commit
7c50ff6c94
@ -842,6 +842,10 @@ void ElementsPanel::slot_doubleClick(QTreeWidgetItem *qtwi, int) {
|
||||
emit(requestForDiagram(diagram));
|
||||
} else if (ElementsCollectionItem *item = collectionItemForItem(qtwi)) {
|
||||
emit(requestForCollectionItem(item));
|
||||
} else if (itemIsATitleBlockTemplate(qtwi)) {
|
||||
if (QETProject *project = projectForTitleBlockTemplate(qtwi)) {
|
||||
emit(requestForTitleBlockTemplate(project, nameOfTitleBlockTemplate(qtwi)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,7 @@ class ElementsPanel : public QTreeWidget {
|
||||
void requestForDiagram(Diagram *);
|
||||
void requestForCollectionItem(ElementsCollectionItem *);
|
||||
void requestForMoveElements(ElementsCollectionItem *, ElementsCollectionItem *, QPoint);
|
||||
void requestForTitleBlockTemplate(QETProject *, const QString &);
|
||||
void readingAboutToBegin();
|
||||
void readingFinished();
|
||||
void loadingProgressed(int, int);
|
||||
|
@ -128,6 +128,12 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) {
|
||||
SLOT(handleMoveElementsRequest(ElementsCollectionItem *, ElementsCollectionItem *, const QPoint &)),
|
||||
Qt::QueuedConnection
|
||||
);
|
||||
connect(
|
||||
elements_panel,
|
||||
SIGNAL(requestForTitleBlockTemplate(QETProject *, const QString &)),
|
||||
QETApp::instance(),
|
||||
SLOT(openTitleBlockTemplate(QETProject *, const QString &))
|
||||
);
|
||||
connect(elements_panel, SIGNAL(loadingProgressed(int, int)), this, SLOT(updateProgressBar(int, int)));
|
||||
connect(elements_panel, SIGNAL(readingAboutToBegin()), this, SLOT(collectionsRead()));
|
||||
connect(elements_panel, SIGNAL(readingFinished()), this, SLOT(collectionsReadFinished()));
|
||||
@ -377,7 +383,6 @@ void ElementsPanelWidget::updateButtons() {
|
||||
setElementsActionEnabled(false);
|
||||
} else if (elements_panel -> selectedItemIsATitleBlockTemplate()) {
|
||||
bool is_writable = !(elements_panel -> projectForTitleBlockTemplate(elements_panel -> currentItem()) -> isReadOnly());
|
||||
tbt_add -> setEnabled(is_writable);
|
||||
tbt_edit -> setEnabled(is_writable);
|
||||
tbt_remove -> setEnabled(is_writable);
|
||||
setElementsActionEnabled(false);
|
||||
@ -469,7 +474,6 @@ void ElementsPanelWidget::handleContextMenu(const QPoint &pos) {
|
||||
} else if (elements_panel -> itemIsATitleBlockTemplatesDirectory(item)) {
|
||||
context_menu -> addAction(tbt_add);
|
||||
} else if (elements_panel -> itemIsATitleBlockTemplate(item)) {
|
||||
context_menu -> addAction(tbt_add);
|
||||
context_menu -> addAction(tbt_edit);
|
||||
context_menu -> addAction(tbt_remove);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user