setItemDelegateForColumn(0, new XGUI_TreeViewItemDelegate(this));
- connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
SLOT(onDoubleClick(const QModelIndex&)));
}
aEntrance = 0;
}
-void XGUI_DataTree::clear()
+void XGUI_DataTree::clear()
{
dataModel()->clear();
reset();
ObjectPtr aObj = aModel->object(theIndex);
DocumentPtr aDoc = aMgr->activeDocument();
-
+
std::string aOpName = tr("History change").toStdString();
if (aObj.get()) {
if (aObj->document() != aDoc)
//********************************************************************
//********************************************************************
//********************************************************************
-void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement,
+void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement,
const QStyleOption* theOption,
QPainter* thePainter, const QWidget* theWidget) const
{
if ((theElement == QStyle::PE_PanelItemViewRow) || (theElement == QStyle::PE_PanelItemViewItem)) {
- const QStyleOptionViewItemV4* aOptions =
+ const QStyleOptionViewItemV4* aOptions =
qstyleoption_cast<const QStyleOptionViewItemV4 *>(theOption);
if (myIndex.isValid() && ((myIndex.flags() & Qt::ItemIsSelectable) == 0)) {
QStyle::State aState = aOptions->state;
//********************************************************************
//********************************************************************
XGUI_ActiveDocLbl::XGUI_ActiveDocLbl(const QString& theText, QWidget* theParent )
- : QLabel(theText, theParent),
- myPreSelectionStyle(""),
- myNeutralStyle(""),
+ : QLabel(theText, theParent),
+ myPreSelectionStyle(""),
+ myNeutralStyle(""),
mySelectionStyle(""),
myIsSelected(false)
{
QColor aHighlightText = aPalet.highlightedText().color();
myPreSelectionStyle = "QLabel {background-color: ";
- myPreSelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 white, stop:1 " +
+ myPreSelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 white, stop:1 " +
aHighlight.lighter(170).name() + ");";
myPreSelectionStyle += "border: 1px solid lightblue; border-radius: 2px }";
#if (!defined HAVE_SALOME) && (defined WIN32)
mySelectionStyle = "QLabel {background-color: ";
mySelectionStyle += "qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgb(236, 245, 255)";
- mySelectionStyle += ", stop:1 rgb(208, 229, 255));";
+ mySelectionStyle += ", stop:1 rgb(208, 229, 255));";
mySelectionStyle += "border: 1px solid rgb(132, 172, 221); border-radius: 2px }";
#else
mySelectionStyle = "QLabel {background-color: " + aHighlight.name();
MYClearing = true;
myIsSelected = true;
setStyleSheet(mySelectionStyle);
- // We can not block signals because on
+ // We can not block signals because on
// clear selection the View state will not be updated
myTreeView->clearSelection();
QLabel::mouseReleaseEvent(e);
aLbl->setPixmap(QPixmap(":pictures/assembly.png"));
aLbl->setMargin(2);
// Do not paint background of the label (in order to show icon)
- aLbl->setAutoFillBackground(false);
+ aLbl->setAutoFillBackground(false);
aLabelLay->addWidget(aLbl);
}
void XGUI_ObjectsBrowser::setXMLReader(Config_DataModelReader* theReader)
-{
- myDocModel->setXMLReader(theReader);
+{
+ myDocModel->setXMLReader(theReader);
myTreeView->setModel(myDocModel);
// It has to be done after setting of model
}
//***************************************************
-void XGUI_ObjectsBrowser::clearContent()
-{
- myTreeView->clear();
+void XGUI_ObjectsBrowser::clearContent()
+{
+ myTreeView->clear();
}
void XGUI_ObjectsBrowser::onSelectionChanged(const QItemSelection& theSelected,