mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
minor change
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4260 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -83,22 +83,15 @@ ElementsPanel::ElementsPanel(QWidget *parent) :
|
|||||||
qp.setColor(QPalette::HighlightedText, Qt::black);
|
qp.setColor(QPalette::HighlightedText, Qt::black);
|
||||||
setPalette(qp);
|
setPalette(qp);
|
||||||
|
|
||||||
// we handle double click on items ourselves
|
// we handle double click on items ourselves
|
||||||
connect(
|
connect(this, &ElementsPanel::itemDoubleClicked, this, &ElementsPanel::slot_doubleClick);
|
||||||
this,
|
connect(this, &GenericPanel::firstActivated, [this]() {QTimer::singleShot(250, this, SLOT(reload()));});
|
||||||
SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
|
connect(this, &ElementsPanel::panelContentChanged, this, &ElementsPanel::panelContentChange);
|
||||||
this,
|
|
||||||
SLOT(slot_doubleClick(QTreeWidgetItem *, int))
|
|
||||||
);
|
|
||||||
|
|
||||||
connect(this, SIGNAL(firstActivated()), this, SLOT(firstActivation()));
|
//Emit a signal instead au manage is own context menu
|
||||||
connect(this, SIGNAL(panelContentChanged()), this, SLOT(panelContentChange()));
|
|
||||||
|
|
||||||
// emet un signal au lieu de gerer son menu contextuel
|
|
||||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
setElementsCache(QETApp::collectionCache());
|
setElementsCache(QETApp::collectionCache());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,10 +336,6 @@ void ElementsPanel::startTitleBlockTemplateDrag(const TitleBlockTemplateLocation
|
|||||||
drag -> start(Qt::CopyAction);
|
drag -> start(Qt::CopyAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElementsPanel::firstActivation() {
|
|
||||||
QTimer::singleShot(250, this, SLOT(reload()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Ensure the filter is applied again after the panel content has changed.
|
Ensure the filter is applied again after the panel content has changed.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ class ElementsPanel : public GenericPanel {
|
|||||||
bool matchesFilter(const QTreeWidgetItem *, QString) const;
|
bool matchesFilter(const QTreeWidgetItem *, QString) const;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void firstActivation();
|
|
||||||
void panelContentChange();
|
void panelContentChange();
|
||||||
virtual QList<ElementsLocation> elementIntegrated(QETProject *, const ElementsLocation &);
|
virtual QList<ElementsLocation> elementIntegrated(QETProject *, const ElementsLocation &);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user