void RenderSettingsDialog::dataChanged() {
	QStringList statusMessages = validateConfiguration();
	if (statusMessages != m_statusMessages) {
		m_statusMessages = statusMessages;
		setDocumentation(m_currentDocumentation);
	}
}
Пример #2
0
/**
 * Reimplemented from UMLWidget::slotMenuSelection to handle
 * some menu actions.
 */
void NoteWidget::slotMenuSelection(QAction* action)
{
    ListPopupMenu *menu = ListPopupMenu::menuFromAction(action);
    if (!menu) {
        uError() << "Action's data field does not contain ListPopupMenu pointer";
        return;
    }
    ListPopupMenu::MenuType sel = menu->getMenuType(action);
    switch(sel) {
    case ListPopupMenu::mt_Rename:
        {
            umlScene()->updateDocumentation(false);
            NoteDialog * dlg = new NoteDialog(umlScene()->activeView(), this);
            if (dlg->exec()) {
                umlScene()->showDocumentation(this, true);
                umlDoc()->setModified(true);
                update();
            }
            delete dlg;
        }
        break;

    case ListPopupMenu::mt_Clear:
        umlScene()->updateDocumentation(true);
        setDocumentation(QString());
        umlScene()->showDocumentation(this, true);
        umlDoc()->setModified(true);
        update();
        break;

    default:
        UMLWidget::slotMenuSelection(action);
        break;
    }
}
Пример #3
0
PageDef::PageDef(const char *f,int l,const char *n,
                 const char *d,const char *t)
 : Definition(f,l,1,n), m_title(t)
{
  setDocumentation(d,f,l);
  m_subPageDict = new PageSDict(7);
  m_pageScope = 0;
  m_nestingLevel = 0;
  m_showToc = FALSE;
}
Пример #4
0
PageDef::PageDef(const char *f,int l,const char *n,
                 const char *d,const char *t)
 : Definition(f,l,1,n), m_title(t)
{
  setDocumentation(d,f,l);
  m_subPageDict = new PageSDict(7);
  m_pageScope = 0;
  m_nestingLevel = 0;
  static bool shortNames = Config_getBool(SHORT_NAMES);
  m_fileName = shortNames ? convertNameToFile(n) : QCString(n);
  m_showToc = FALSE;
}
Пример #5
0
/**
 * Reimplemented from UMLWidget::loadFromXMI to load note
 * widget info from XMI.
 */
bool NoteWidget::loadFromXMI(QDomElement& qElement)
{
    if ( !UMLWidget::loadFromXMI(qElement))
        return false;
    setDocumentation(qElement.attribute("text", ""));
    QString diagramlink = qElement.attribute("diagramlink", "");
    if (!diagramlink.isEmpty()) {
        m_diagramLink = STR2ID(diagramlink);
    }
    QString type = qElement.attribute("noteType", "");
    setNoteType( (NoteType)type.toInt() );
    return true;
}
Пример #6
0
/**
 * Loads a "notewidget" XMI element.
 */
bool NoteWidget::loadFromXMI(QDomElement & qElement)
{
    if (!UMLWidget::loadFromXMI(qElement))
        return false;
    setZValue(20); //make sure always on top.
    setDocumentation(qElement.attribute(QLatin1String("text")));
    QString diagramlink = qElement.attribute(QLatin1String("diagramlink"));
    if (!diagramlink.isEmpty())
        m_diagramLink = Uml::ID::fromString(diagramlink);
    QString type = qElement.attribute(QLatin1String("noteType"));
    setNoteType((NoteType)type.toInt());
    return true;
}
Пример #7
0
/**
 * Set the ID of the diagram hyperlinked to this note.
 * To switch off the hyperlink, set this to Uml::id_None.
 *
 * @param viewID    ID of an UMLScene.
 */
void NoteWidget::setDiagramLink(Uml::ID::Type viewID)
{
    UMLDoc *umldoc = UMLApp::app()->document();
    UMLView *view = umldoc->findView(viewID);
    if (view == NULL) {
        uError() << "no view found for viewID " << Uml::ID::toString(viewID);
        return;
    }
    QString linkText(QLatin1String("Diagram: ") + view->umlScene()->name());
    setDocumentation(linkText);
    m_diagramLink = viewID;
    update();
}
Пример #8
0
/**
 * Reimplemented from UMLWidget::loadFromXMI to load
 * SignalWidget from XMI.
 */
bool SignalWidget::loadFromXMI( QDomElement & qElement )
{
    if( !UMLWidget::loadFromXMI( qElement ) )
        return false;
    setName(qElement.attribute( "signalname", "" ));

    setDocumentation(qElement.attribute( "documentation", "" ));

    QString type = qElement.attribute( "signaltype", "" );
    setSignalType((SignalType)type.toInt());

   return true;
}
Пример #9
0
/**
 * Loads the widget from the "activitywidget" XMI element.
 */
bool ActivityWidget::loadFromXMI(QDomElement& qElement)
{
    if(!UMLWidget::loadFromXMI(qElement))
        return false;
    setName(qElement.attribute(QLatin1String("activityname")));
    setDocumentation(qElement.attribute(QLatin1String("documentation")));
    setPreconditionText(qElement.attribute(QLatin1String("precondition")));
    setPostconditionText(qElement.attribute(QLatin1String("postcondition")));

    QString type = qElement.attribute(QLatin1String("activitytype"), QLatin1String("1"));
    setActivityType((ActivityType)type.toInt());

    return true;
}
Пример #10
0
/**
 * Loads the widget from the "preconditionwidget" XMI element.
 */
bool PreconditionWidget::loadFromXMI(QDomElement& qElement)
{
    if(!UMLWidget::loadFromXMI(qElement))
        return false;
    QString widgetaid = qElement.attribute(QLatin1String("widgetaid"), QLatin1String("-1"));
    setName(qElement.attribute(QLatin1String("preconditionname")));
    setDocumentation(qElement.attribute(QLatin1String("documentation")));

    m_widgetAId = Uml::ID::fromString(widgetaid);

    // Lookup the ObjectWidget, if it can't be found, assume it will be
    // resolved later
    loadObjectWidget();

    return true;
}
void RenderSettingsDialog::onTreeSelectionChange(const QItemSelection &selected, const QItemSelection &deselected) {
	QModelIndexList indexList = selected.indexes();
	if (indexList.size() > 0)
		setDocumentation(m_model->data(indexList[0], Qt::ToolTipRole).toString());
}
void RenderSettingsDialog::chkBoxPressed() {
	QCheckBox *checkBox = static_cast<QCheckBox *>(sender());
	setDocumentation(checkBox->property("help").toString());
}
void RenderSettingsDialog::cbHighlighted(int index) {
	QComboBox *comboBox = static_cast<QComboBox *>(sender());
	setDocumentation(comboBox->itemData(index).toList().at(1).toString());
}