-TModelingData TKShapeView
+TModelingData TKShapeView TKMessageModel TKMessageView
TVisualization TKView TKVInspector
TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
TTool TKTInspector TKToolsDraw TInspectorEXE
\ No newline at end of file
Message::DefaultMessenger()->ChangePrinters().Clear();
Message::DefaultMessenger()->AddPrinter (MyPrinterToReport);
- Message::DefaultMessenger()->SetTraceLevel (1);
+ //Message::DefaultMessenger()->SetTraceLevel (1);
Message::DefaultReport()->UpdateActiveInMessenger();
myTreeModel->UpdateTreeModel();
if (!anAttribute->IsMetricValid (aMetricType))
return QVariant ("in process");
- if (aMetricType == Message_MetricType_UserTimeCPU ||
- aMetricType == Message_MetricType_SystemTimeInfo ||
+ if (aMetricType == Message_MetricType_ProcessCPUUserTime ||
+ aMetricType == Message_MetricType_ProcessCPUSystemTime ||
aMetricType == Message_MetricType_WallClock)
{
Standard_Real aCumulativeMetric = anAttribute->StopValue (aMetricType) - anAttribute->StartValue (aMetricType);
Message_MetricType aMetricType;
int aPosition;
if (MessageModel_TreeModel::IsMetricColumn (Column(), aMetricType, aPosition) &&
- (aMetricType == Message_MetricType_UserTimeCPU || aMetricType == Message_MetricType_SystemTimeInfo ||
+ (aMetricType == Message_MetricType_ProcessCPUUserTime || aMetricType == Message_MetricType_ProcessCPUSystemTime ||
aMetricType == Message_MetricType_WallClock))
{
if (aPosition == 0) return CumulativeMetric (aReport, aMetricType);
// =======================================================================
void createShapeOnLevel()
{
+#ifdef DEBUG_ALERTS
OCCT_ADD_MESSAGE_LEVEL_SENTRY ("createShapeOnLevel")
Message_Messenger::StreamBuffer sout = Message::SendInfo();
MESSAGE_INFO_SHAPE (aShape, "Shape message edge ON LEVEL");
//sout << "Shape message edge" << aShape;
+#endif
}
// =======================================================================
// =======================================================================
void createShape()
{
+#ifdef DEBUG_ALERTS
Message_Messenger::StreamBuffer sout = Message::SendInfo();
BRepBuilderAPI_MakeEdge aBuilder (gp_Pnt (0., 0., 0.), gp_Pnt (20., 10., 20.));
//sout << "Shape message edge" << aShape;
createShapeOnLevel();
+#endif
}
// =======================================================================
// =======================================================================
void MessageView_ActionsTest::OnTestMessenger()
{
+#ifdef DEBUG_ALERTS
// string messages
Message_Messenger::StreamBuffer sout = Message::SendInfo();
Standard_Integer aTraceLevel_prev = Message::DefaultMessenger()->TraceLevel();
}
myTreeModel->UpdateTreeModel();
Message::DefaultMessenger()->SetTraceLevel (aTraceLevel_prev);
+#endif
}
// =======================================================================
// =======================================================================
void levelAlerts (const int theCurrentLevel, const int theTopLevel)
{
+#ifdef DEBUG_ALERTS
if (theTopLevel - theCurrentLevel <= 0)
return;
levelAlerts (theCurrentLevel + 1, theTopLevel);
sout << "Alert(" << theCurrentLevel << "): " << 4 << ", " << 5 << std::endl;
+#endif
}
// =======================================================================
// =======================================================================
void levelAlert (const int theCurrentLevel, const int theTopLevel)
{
+#ifdef DEBUG_ALERTS
if (theTopLevel - theCurrentLevel <= 0)
return;
//for (int i = 0; i < 2; i++)
levelAlerts (theCurrentLevel + 1, theTopLevel);
+#endif
}
// =======================================================================
// =======================================================================
void MessageView_ActionsTest::OnTestReportTree()
{
+#ifdef DEBUG_ALERTS
OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestReportTree()")
Message_Messenger::StreamBuffer sout = Message::SendInfo();
levelAlert (1, aTopLevel);
myTreeModel->UpdateTreeModel();
+#endif
}
// =======================================================================
// =======================================================================
void MessageView_ActionsTest::OnTestReportTree2()
{
+#ifdef DEBUG_ALERTS
OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestReportTree()")
Message_Messenger::StreamBuffer sout = Message::SendInfo();
//levelAlert (1, aTopLevel);
myTreeModel->UpdateTreeModel();
+#endif
}
#include <Message.hxx>
#include <TCollection_AsciiString.hxx>
-#define DEBUG_ALERTS
+//#define DEBUG_ALERTS
-#include <XmlDrivers_MessageReportStorage.hxx>
+//#include <XmlDrivers_MessageReportStorage.hxx>
#include <inspector/ViewControl_Tools.hxx>
#include <inspector/View_Displayer.hxx>
// =======================================================================
void MessageView_Window::openFile(const TCollection_AsciiString& theFileName)
{
+#ifdef DEBUG_ALERTS
if (theFileName.IsEmpty())
return;
aReport->MessageWriter()->ImportReport (aReport);
addReport (aReport, theFileName);
+#endif
}
// =======================================================================
aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Reload"), SLOT (onReloadReport()), myMainWindow, this));
}
Handle(Message_Report) aReport = aReportItem->GetReport();
- QAction* anAction = ViewControl_Tools::CreateAction (tr ("Export by alert"), SLOT (onAutoExportActivate()), myMainWindow, this);
+ /*QAction* anAction = ViewControl_Tools::CreateAction (tr ("Export by alert"), SLOT (onAutoExportActivate()), myMainWindow, this);
anAction->setCheckable (true);
anAction->setChecked (aReport->WriteFileOnEachAlert());
aMenu->addAction (anAction);
anAction->setCheckable (true);
bool isTraceOnly = aReport->MessageWriter().IsNull() ? false : aReport->MessageWriter()->Gravity() == Message_Trace;
anAction->setChecked (isTraceOnly);
- aMenu->addAction (anAction);
+ aMenu->addAction (anAction);*/
}
aMenu->addSeparator();
return;
Handle(Message_Report) aReport = aReportItem->GetReport();
- aReport->Clear();
+ /*aReport->Clear();
if (aReport->MessageWriter().IsNull())
aReport->SetMessageWriter (new XmlDrivers_MessageReportStorage());
aReport->MessageWriter()->SetFileName (TCollection_AsciiString (aDescription));
if (!aReport->MessageWriter()->ImportReport (aReport))
- return;
+ return;*/
MessageModel_TreeModel* aTreeModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
aModel->clearSelection();
// =======================================================================
void MessageView_Window::onAutoExportActivate()
{
- QItemSelectionModel* aModel = myTreeView->selectionModel();
+ /*QItemSelectionModel* aModel = myTreeView->selectionModel();
if (!aModel)
return;
QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
Handle(Message_Report) aReport = aReportItem->GetReport();
QAction* anAction = (QAction*)(sender());
- aReport->SetWriteFileOnEachAlert (anAction->isChecked());
+ aReport->SetWriteFileOnEachAlert (anAction->isChecked());*/
}
// =======================================================================
// =======================================================================
void MessageView_Window::onExportTraceOnly()
{
- QItemSelectionModel* aModel = myTreeView->selectionModel();
+ /*QItemSelectionModel* aModel = myTreeView->selectionModel();
if (!aModel)
return;
QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
return;
QAction* anAction = (QAction*)(sender());
- aReport->MessageWriter()->SetGravity (anAction->isChecked() ? Message_Trace : Message_Info);
+ aReport->MessageWriter()->SetGravity (anAction->isChecked() ? Message_Trace : Message_Info);*/
}
// =======================================================================
return;
Handle(Message_Report) aReport = Message::DefaultReport();
- const NCollection_Map<Message_MetricType>& anActiveMetrics = aReport->ActiveMetrics();
-
+ const NCollection_IndexedMap<Message_MetricType>& anActiveMetrics = aReport->ActiveMetrics();
aReport->SetActiveMetric (aMetricType, !anActiveMetrics.Contains (aMetricType));
updateVisibleColumns();
{
MessageModel_TreeModel* aViewModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
- NCollection_Map<Message_MetricType> anActiveMetrics;
+ NCollection_IndexedMap<Message_MetricType> anActiveMetrics;
for (NCollection_List<MessageModel_ReportInformation>::Iterator anIterator (aViewModel->Reports()); anIterator.More(); anIterator.Next())
{
Handle(Message_Report) aReport = anIterator.Value().myReport;
- for (NCollection_Map<Message_MetricType>::Iterator aMetricsIterator (aReport->ActiveMetrics()); aMetricsIterator.More(); aMetricsIterator.Next())
+ for (NCollection_IndexedMap<Message_MetricType>::Iterator aMetricsIterator (aReport->ActiveMetrics()); aMetricsIterator.More(); aMetricsIterator.Next())
{
if (anActiveMetrics.Contains (aMetricsIterator.Value()))
continue;