00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "codeviewerdialogbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qcheckbox.h>
00017 #include <qlabel.h>
00018 #include <qtabwidget.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022
00023
00024
00025
00026
00027
00028
00029
00030 CodeViewerDialogBase::CodeViewerDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00031 : QDialog( parent, name, modal, fl )
00032 {
00033 if ( !name )
00034 setName( "CodeViewerDialogBase" );
00035 QFont f( font() );
00036 f.setFamily( "Courier" );
00037 setFont( f );
00038 setSizeGripEnabled( TRUE );
00039 CodeViewerDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "CodeViewerDialogBaseLayout");
00040
00041 layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2");
00042
00043 m_showHiddenCodeCB = new QCheckBox( this, "m_showHiddenCodeCB" );
00044
00045 layout2->addWidget( m_showHiddenCodeCB, 0, 1 );
00046
00047 componentLabel = new QLabel( this, "componentLabel" );
00048 componentLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, componentLabel->sizePolicy().hasHeightForWidth() ) );
00049 componentLabel->setScaledContents( TRUE );
00050
00051 layout2->addMultiCellWidget( componentLabel, 1, 1, 0, 2 );
00052
00053 m_exitButton = new QPushButton( this, "m_exitButton" );
00054 m_exitButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_exitButton->sizePolicy().hasHeightForWidth() ) );
00055
00056 layout2->addWidget( m_exitButton, 0, 2 );
00057
00058 m_highlightCheckBox = new QCheckBox( this, "m_highlightCheckBox" );
00059 m_highlightCheckBox->setChecked( FALSE );
00060
00061 layout2->addWidget( m_highlightCheckBox, 0, 0 );
00062
00063 CodeViewerDialogBaseLayout->addLayout( layout2, 0, 0 );
00064
00065 m_tabWidget = new QTabWidget( this, "m_tabWidget" );
00066
00067 CodeViewerDialogBaseLayout->addWidget( m_tabWidget, 1, 0 );
00068 languageChange();
00069 resize( QSize(615, 728).expandedTo(minimumSizeHint()) );
00070 clearWState( WState_Polished );
00071
00072
00073 connect( m_exitButton, SIGNAL( released() ), this, SLOT( close() ) );
00074 }
00075
00076
00077
00078
00079 CodeViewerDialogBase::~CodeViewerDialogBase()
00080 {
00081
00082 }
00083
00084
00085
00086
00087
00088 void CodeViewerDialogBase::languageChange()
00089 {
00090 setCaption( tr2i18n( "Code Viewer" ) );
00091 m_showHiddenCodeCB->setText( tr2i18n( "Show hidden blocks" ) );
00092 componentLabel->setText( tr2i18n( "<p align=\"center\">component name here</p>" ) );
00093 m_exitButton->setText( tr2i18n( "Close" ) );
00094 m_highlightCheckBox->setText( tr2i18n( "Show block type" ) );
00095 }
00096
00097 void CodeViewerDialogBase::changeHighlighting(int)
00098 {
00099 qWarning( "CodeViewerDialogBase::changeHighlighting(int): Not implemented yet" );
00100 }
00101
00102 #include "codeviewerdialogbase.moc"