1 // SALOME RegistryDisplay : GUI for Registry server implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : ToolsGUI_HelpWindow.cxx
25 // Author : Pascale NOYRET, EDF
29 # include "ToolsGUI_HelpWindow.h"
30 # include "utilities.h"
32 # include <qtextview.h>
33 # include <qpushbutton.h>
34 # include <qtextstream.h>
39 ToolsGUI_HelpWindow::ToolsGUI_HelpWindow(QWidget* parent, const char* name )
40 : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
42 BEGIN_OF("Constructeur ToolsGUI_HelpWindow");
44 setCaption( tr( "Help" ) );
46 myTextView = new QTextView( this, "myTextView" );
47 QPalette pal = myTextView->palette();
48 QColorGroup cg = pal.active();
49 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
50 cg.setColor( QColorGroup::HighlightedText, Qt::white );
51 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
52 cg.setColor( QColorGroup::Text, Qt::black );
55 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
56 cg.setColor( QColorGroup::HighlightedText, Qt::white );
57 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
58 cg.setColor( QColorGroup::Text, Qt::black );
59 pal.setInactive( cg );
61 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
62 cg.setColor( QColorGroup::HighlightedText, Qt::white );
63 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
64 cg.setColor( QColorGroup::Text, Qt::black );
65 pal.setDisabled( cg );
66 myTextView->setPalette( pal );
68 setCentralWidget( myTextView );
69 setMinimumSize( 450, 250 );
71 QFile f ( "tmp.txt" );
72 if ( f.open( IO_ReadOnly ) )
77 myTextView->append(t.readLine());
82 END_OF("Constructeur ToolsGUI_HelpWindow");
88 ToolsGUI_HelpWindow::~ToolsGUI_HelpWindow()
90 BEGIN_OF("Destructeur ToolsGUI_HelpWindow");
91 END_OF("Destructeur ToolsGUI_HelpWindow");
97 void ToolsGUI_HelpWindow::setText( const QString& text )
99 myTextView->setText( text );