//----------------------------------------------------------------------------- // $Id: Q3GUI/DiagOutputWidget.cpp 2014/05/25 15:59:21 philw $ //----------------------------------------------------------------------------- ///////////////////////////////////////////////////////////////// // // METHOD: // void DiagOutputWidget::appendMsg (cwDiagData* diagData) // // PURPOSE: // Adds a single diagnostic message and its context to the dialog. // // PARAMETERS: // diagData The diagnostic data (message) provided from // the diagnostic system. // // NOTE: The givenData value now belongs to the GUI; // this dialog must deallocate it when finished using it. // // RETURN VALUES: // None. //- void DiagOutputWidget::appendMsg (cwDiagData* diagData) { const int num (++_messageCount); num; // (avoid compilation warning) const cwDiagLevel level = diagData->getLevel(); //------------------------------------------------- // NOTE: This call DELETES the cwDiagData Instance. //------------------------------------------------- // const bool shown = _diagMsgDataModel->appendItem (diagData, this); if (shown) { const bool autoScroll = _autoScrollCheckBox->isChecked(); _contextListView->processItemAppended (level, autoScroll); _messageListView->processItemAppended (level, autoScroll); } else { const int row = (_messageCount-1); static const QModelIndex NullMinx; _contextListView->setRowHidden (row, NullMinx, true); _messageListView->setRowHidden (row, NullMinx, true); } assessAutoShowCondition (level); schedAdjustWidths(); // applies only if auto-width adjustment is enabled. }