Skip to content

Commit

Permalink
changed same small thing in OMShell and OMNotebook. Both applications…
Browse files Browse the repository at this point in the history
… are using Qt 4.1, Open Source license now.

// Anders Fernström

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2152 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x05andfe committed Feb 21, 2006
1 parent 313739d commit 8bb0610
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 31 deletions.
50 changes: 25 additions & 25 deletions OMS/QWinMosh.vcproj
Expand Up @@ -26,7 +26,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="qtmain.lib QtCore4.lib QtGui4.lib mico2311.lib"
OutputFile="$(OutDir)\OMS.exe"
OutputFile="$(OutDir)\OMShell.exe"
AdditionalLibraryDirectories="&quot;$(QTHOME)\lib&quot;;&quot;$(MICOHOME)\win32-bin\lib&quot;"
GenerateDebugInformation="FALSE"
SubSystem="2"/>
Expand Down Expand Up @@ -68,7 +68,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="qtmaind.lib QtCored4.lib QtGuid4.lib mico2311.lib"
OutputFile="$(OutDir)\OMS.exe"
OutputFile="$(OutDir)\OMShell.exe"
AdditionalLibraryDirectories="&quot;$(QTHOME)\lib&quot;;&quot;$(MICOHOME)\win32-bin\lib&quot;"
GenerateDebugInformation="TRUE"
SubSystem="2"/>
Expand Down Expand Up @@ -131,19 +131,19 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing omc_communicator.h..."
CommandLine="$(QTDIR)\bin\moc.exe -I -I$(QTDIR)\include -I.\GeneratedFiles\Release -I$(QTDIR)\include\QtCore -I$(QTDIR)\include\QtGui &quot;.\omc_communicator.h&quot; -o &quot;GeneratedFiles\Release\moc_omc_communicator.cpp&quot;
CommandLine="$(QTHOME)\bin\moc.exe -I -I$(QTDIR)\include -I.\GeneratedFiles\Release -I$(QTDIR)\include\QtCore -I$(QTDIR)\include\QtGui &quot;.\omc_communicator.h&quot; -o &quot;GeneratedFiles\Release\moc_omc_communicator.cpp&quot;
"
AdditionalDependencies="$(QTDIR)\bin\moc.exe;.\omc_communicator.h"
AdditionalDependencies="$(QTHOME)\bin\moc.exe;.\omc_communicator.h"
Outputs="&quot;GeneratedFiles\Release\moc_omc_communicator.cpp&quot;"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing omc_communicator.h..."
CommandLine="$(QTDIR)\bin\moc.exe -I.\GeneratedFiles\Debug;&quot;$(QTHOME)\include&quot; &quot;.\omc_communicator.h&quot; -o &quot;GeneratedFiles\Debug\moc_omc_communicator.cpp&quot;
CommandLine="$(QTHOME)\bin\moc.exe -I.\GeneratedFiles\Debug;&quot;$(QTHOME)\include&quot; &quot;.\omc_communicator.h&quot; -o &quot;GeneratedFiles\Debug\moc_omc_communicator.cpp&quot;
"
AdditionalDependencies="$(QTDIR)\bin\moc.exe;.\omc_communicator.h"
AdditionalDependencies="$(QTHOME)\bin\moc.exe;.\omc_communicator.h"
Outputs="&quot;GeneratedFiles\Debug\moc_omc_communicator.cpp&quot;"/>
</FileConfiguration>
</File>
Expand All @@ -157,19 +157,19 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing oms.h..."
CommandLine="$(QTDIR)\bin\moc.exe -DWIN32 -I.\GeneratedFiles\Release;.\GeneratedFiles;&quot;$(MODELICAHOME)&quot;;&quot;$(MICOHOME)\include&quot;;&quot;$(QTHOME)\include&quot; &quot;.\oms.h&quot; -o &quot;GeneratedFiles\Release\moc_oms.cpp&quot;
CommandLine="$(QTHOME)\bin\moc.exe -DWIN32 -I.\GeneratedFiles\Release;.\GeneratedFiles;&quot;$(MODELICAHOME)&quot;;&quot;$(MICOHOME)\include&quot;;&quot;$(QTHOME)\include&quot; &quot;.\oms.h&quot; -o &quot;GeneratedFiles\Release\moc_oms.cpp&quot;
"
AdditionalDependencies="$(QTDIR)\bin\moc.exe;.\oms.h"
AdditionalDependencies="$(QTHOME)\bin\moc.exe;.\oms.h"
Outputs="&quot;GeneratedFiles\Release\moc_oms.cpp&quot;"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing oms.h..."
CommandLine="$(QTDIR)\bin\moc.exe -DWIN32 -DQT_DEBUG -I.\GeneratedFiles\Debug;.\GeneratedFiles;&quot;$(MODELICAHOME)&quot;;&quot;$(MICOHOME)\include&quot;;&quot;$(QTHOME)\include&quot; &quot;.\oms.h&quot; -o &quot;GeneratedFiles\Debug\moc_oms.cpp&quot;
CommandLine="$(QTHOME)\bin\moc.exe -DWIN32 -DQT_DEBUG -I.\GeneratedFiles\Debug;.\GeneratedFiles;&quot;$(MODELICAHOME)&quot;;&quot;$(MICOHOME)\include&quot;;&quot;$(QTHOME)\include&quot; &quot;.\oms.h&quot; -o &quot;GeneratedFiles\Debug\moc_oms.cpp&quot;
"
AdditionalDependencies="$(QTDIR)\bin\moc.exe;.\oms.h"
AdditionalDependencies="$(QTHOME)\bin\moc.exe;.\oms.h"
Outputs="&quot;GeneratedFiles\Debug\moc_oms.cpp&quot;"/>
</FileConfiguration>
</File>
Expand Down Expand Up @@ -249,15 +249,6 @@
Name="Generated Files"
Filter="moc;h;cpp"
UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}">
<File
RelativePath=".\generatedfiles\release\moc_omc_communicator.cpp">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath=".\generatedfiles\debug\moc_omc_communicator.cpp">
<FileConfiguration
Expand All @@ -275,12 +266,7 @@
</FileConfiguration>
</File>
<File
RelativePath=".\GeneratedFiles\release\moc_oms.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
RelativePath=".\generatedfiles\release\moc_omc_communicator.cpp">
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
Expand All @@ -304,6 +290,20 @@
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath=".\GeneratedFiles\release\moc_oms.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="TRUE">
<Tool
Name="VCCLCompilerTool"/>
</FileConfiguration>
</File>
<File
RelativePath=".\GeneratedFiles\qrc_oms.cpp">
</File>
Expand Down
27 changes: 21 additions & 6 deletions OMS/oms.cpp
Expand Up @@ -256,9 +256,9 @@ OMS::OMS( QWidget* parent )
qApp, SLOT( quit() ));

// sett start message
cursor_.insertText( "OpenModelica 1.3.2\n" );
cursor_.insertText( "Copyright 2002-2006, PELAB, Linkoping University\n\n" );
cursor_.insertText( "To get help on using OMShell and OpenModelica, type \"help()\" and press enter.\n" );
cursor_.insertText( "OpenModelica 1.3.2\n", textFormat_ );
cursor_.insertText( "Copyright 2002-2006, PELAB, Linkoping University\n\n", textFormat_ );
cursor_.insertText( "To get help on using OMShell and OpenModelica, type \"help()\" and press enter.\n", textFormat_ );


// add function names for code completion
Expand Down Expand Up @@ -318,6 +318,7 @@ OMS::~OMS()
delete viewToolbar_;
delete viewStatusbar_;
delete aboutOMS_;
delete aboutQT_;
delete print_;
delete startServer_;
delete stopServer_;
Expand Down Expand Up @@ -348,6 +349,8 @@ void OMS::createMoshEdit()
moshEdit_->setFontWeight( QFont::Normal );
moshEdit_->setFontPointSize( fontSize_ );

textFormat_ = moshEdit_->currentCharFormat();

connect( moshEdit_, SIGNAL( returnPressed() ),
this, SLOT( returnPressed() ));
connect( moshEdit_, SIGNAL( insertNewline() ),
Expand Down Expand Up @@ -454,6 +457,12 @@ void OMS::createAction()
connect( aboutOMS_, SIGNAL( triggered() ),
this, SLOT( aboutOMS() ));

// Added 2006-02-21 AF
aboutQT_ = new QAction( tr("About &Qt"), this );
aboutQT_->setStatusTip( tr("Display information about Qt") );
connect( aboutQT_, SIGNAL( triggered() ),
this, SLOT( aboutQT() ));

print_ = new QAction( QIcon(":/Resources/print.bmp"), tr("&Print"), this );
print_->setShortcut( tr("Ctrl+P") );
print_->setStatusTip( tr("Print the contents in the input window") );
Expand Down Expand Up @@ -507,6 +516,7 @@ void OMS::createMenu()
viewMenu_->addAction( viewStatusbar_ );

helpMenu_->addAction( aboutOMS_ );
helpMenu_->addAction( aboutQT_ );
}

void OMS::createToolbar()
Expand Down Expand Up @@ -619,9 +629,9 @@ void OMS::returnPressed()
QString res = delegate_->getResult();

if( res.isEmpty() )
cursor_.insertText( "\n" );
cursor_.insertText( "\n", textFormat_ );
else
cursor_.insertText( "\n" + res + "\n" );
cursor_.insertText( "\n" + res + "\n", textFormat_ );

// get Error text
try
Expand All @@ -643,7 +653,7 @@ void OMS::returnPressed()
else
{
QTextCursor cursor = moshError_->textCursor();
cursor.insertText("[ERROR] No OMC serer started\n");
cursor.insertText("[ERROR] No OMC serer started\n" );
}

// add new command line
Expand Down Expand Up @@ -981,6 +991,11 @@ void OMS::aboutOMS()
QString("Copyright PELAB (c) 2006") );
}

void OMS::aboutQT()
{
QMessageBox::aboutQt( this );
}

void OMS::print()
{
// TODO: Implement print
Expand Down
2 changes: 2 additions & 0 deletions OMS/oms.h
Expand Up @@ -104,6 +104,7 @@ public slots:
void viewToolbar();
void viewStatusbar();
void aboutOMS();
void aboutQT(); // Added 2006-02-21 AF
void print();
bool startServer();
void stopServer();
Expand Down Expand Up @@ -156,6 +157,7 @@ private slots:
QAction* viewToolbar_;
QAction* viewStatusbar_;
QAction* aboutOMS_;
QAction* aboutQT_; // Added 2006-02-21 AF
QAction* print_;
QAction* startServer_;
QAction* stopServer_;
Expand Down

0 comments on commit 8bb0610

Please sign in to comment.