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 : HelpWindow.cxx
25 // Author : Pascale NOYRET, EDF
30 # include "HelpWindow.hxx"
31 # include "utilities.h"
33 # include <qtextview.h>
34 # include <qpushbutton.h>
35 # include <qtextstream.h>
38 HelpWindow::HelpWindow(QWidget* parent, const char* name )
39 : QMainWindow( parent, name, WType_TopLevel | WDestructiveClose )
41 BEGIN_OF("Constructeur HelpWindow");
43 setCaption( tr( "Help" ) );
45 myTextView = new QTextView( this, "myTextView" );
46 QPalette pal = myTextView->palette();
47 QColorGroup cg = pal.active();
48 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
49 cg.setColor( QColorGroup::HighlightedText, Qt::white );
50 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
51 cg.setColor( QColorGroup::Text, Qt::black );
54 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
55 cg.setColor( QColorGroup::HighlightedText, Qt::white );
56 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
57 cg.setColor( QColorGroup::Text, Qt::black );
58 pal.setInactive( cg );
60 cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) );
61 cg.setColor( QColorGroup::HighlightedText, Qt::white );
62 cg.setColor( QColorGroup::Base, QColor( 255,255,220 ) );
63 cg.setColor( QColorGroup::Text, Qt::black );
64 pal.setDisabled( cg );
65 myTextView->setPalette( pal );
67 setCentralWidget( myTextView );
68 setMinimumSize( 450, 250 );
70 QFile f ( "tmp.txt" );
71 if ( f.open( IO_ReadOnly ) )
76 myTextView->append(t.readLine());
81 END_OF("Constructeur HelpWindow");
87 HelpWindow::~HelpWindow()
89 BEGIN_OF("Destructeur HelpWindow");
90 END_OF("Destructeur HelpWindow");
96 void HelpWindow::setText( const QString& text )
98 myTextView->setText( text );