Skip to content

Commit

Permalink
- Added the View Documentation button in the StatusBar of models.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7677 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Jan 11, 2011
1 parent d8122c1 commit 3be780f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Helper.cpp
Expand Up @@ -56,6 +56,7 @@ QString Helper::writeAble = QString("Writeable");
QString Helper::iconView = QString("Icon View");
QString Helper::diagramView = QString("Diagram View");
QString Helper::modelicaTextView = QString("Modelica Text View");
QString Helper::documentationView = QString("View Documentation");
int Helper::viewWidth = 2000;
int Helper::viewHeight = 2000;
qreal Helper::globalIconXScale = 0.15;
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Helper.h
Expand Up @@ -57,6 +57,7 @@ class Helper
static QString iconView;
static QString diagramView;
static QString modelicaTextView;
static QString documentationView;
static int viewWidth;
static int viewHeight;
static qreal globalIconXScale;
Expand Down
16 changes: 16 additions & 0 deletions OMEdit/OMEditGUI/ProjectTabWidget.cpp
Expand Up @@ -1024,6 +1024,16 @@ ProjectTab::ProjectTab(int modelicaType, int iconType, bool readOnly, bool isChi
connect(mpModelicaTextToolButton, SIGNAL(clicked(bool)), SLOT(showModelicaTextView(bool)));
viewsButtonsHorizontalLayout->addWidget(mpModelicaTextToolButton);

// documentation view tool button
mpDocumentationViewToolButton = new QToolButton;
mpDocumentationViewToolButton->setText(Helper::documentationView);
mpDocumentationViewToolButton->setIcon(QIcon(":/Resources/icons/info-icon.png"));
mpDocumentationViewToolButton->setIconSize(Helper::buttonIconSize);
mpDocumentationViewToolButton->setToolTip(Helper::documentationView);
mpDocumentationViewToolButton->setAutoRaise(true);
connect(mpDocumentationViewToolButton, SIGNAL(pressed()), SLOT(showDocumentationView()));
viewsButtonsHorizontalLayout->addWidget(mpDocumentationViewToolButton);

viewsButtonsFrame->setLayout(viewsButtonsHorizontalLayout);

// view buttons box
Expand Down Expand Up @@ -1179,6 +1189,12 @@ void ProjectTab::showModelicaTextView(bool checked)
mpModelicaEditorWidget->show();
}

void ProjectTab::showDocumentationView()
{
mpParentProjectTabWidget->mpParentMainWindow->documentationdock->show();
mpParentProjectTabWidget->mpParentMainWindow->mpDocumentationWidget->show(mModelNameStructure);
}

bool ProjectTab::loadModelFromText(QString modelName)
{
MainWindow *pMainWindow = mpParentProjectTabWidget->mpParentMainWindow;
Expand Down
2 changes: 2 additions & 0 deletions OMEdit/OMEditGUI/ProjectTabWidget.h
Expand Up @@ -160,6 +160,7 @@ class ProjectTab : public QWidget
QToolButton *mpIconToolButton;
QToolButton *mpDiagramToolButton;
QToolButton *mpModelicaTextToolButton;
QToolButton *mpDocumentationViewToolButton;
QLabel *mpReadOnlyLabel;
QLabel *mpModelicaTypeLabel;
QLabel *mpViewTypeLabel;
Expand Down Expand Up @@ -205,6 +206,7 @@ public slots:
void showDiagramView(bool checked);
void showIconView(bool checked);
void showModelicaTextView(bool checked);
void showDocumentationView();
bool ModelicaEditorTextChanged();
};

Expand Down

0 comments on commit 3be780f

Please sign in to comment.