00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "certificateinfowidget.h"
00013
00014
#include <qvariant.h>
00015
#include <qpushbutton.h>
00016
#include <qframe.h>
00017
#include <qtabwidget.h>
00018
#include <qheader.h>
00019
#include <qlistview.h>
00020
#include <qtextedit.h>
00021
#include <qlabel.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030 CertificateInfoWidget::CertificateInfoWidget(
QWidget* parent,
const char* name, WFlags fl )
00031 :
QWidget( parent, name, fl )
00032 {
00033
if ( !name )
00034 setName(
"CertificateInfoWidget" );
00035 setMinimumSize(
QSize( 250, 0 ) );
00036 CertificateInfoWidgetLayout =
new QGridLayout(
this, 1, 1, 0, 6,
"CertificateInfoWidgetLayout");
00037
00038 Frame3 =
new QFrame(
this,
"Frame3" );
00039 Frame3->setFrameShape( QFrame::HLine );
00040 Frame3->setFrameShadow( QFrame::Sunken );
00041
00042 CertificateInfoWidgetLayout->addMultiCellWidget( Frame3, 1, 1, 0, 1 );
00043
00044 tabWidget =
new QTabWidget(
this,
"tabWidget" );
00045
00046 tab =
new QWidget( tabWidget,
"tab" );
00047 tabLayout =
new QGridLayout( tab, 1, 1, 6, 6,
"tabLayout");
00048
00049 listView =
new QListView( tab,
"listView" );
00050 listView->addColumn( tr2i18n(
"Description" ) );
00051 listView->addColumn( tr2i18n(
"Information" ) );
00052 listView->setAllColumnsShowFocus( TRUE );
00053 listView->setShowSortIndicator( FALSE );
00054
00055 tabLayout->addWidget( listView, 0, 0 );
00056
00057 textView =
new QTextEdit( tab,
"textView" );
00058 textView->setReadOnly( TRUE );
00059 textView->setUndoRedoEnabled( FALSE );
00060
00061 tabLayout->addWidget( textView, 1, 0 );
00062 tabWidget->insertTab( tab,
QString(
"") );
00063
00064 tab_2 =
new QWidget( tabWidget,
"tab_2" );
00065 tabLayout_2 =
new QGridLayout( tab_2, 1, 1, 6, 6,
"tabLayout_2");
00066
00067 pathView =
new QListView( tab_2,
"pathView" );
00068 pathView->addColumn( tr2i18n(
"Path" ) );
00069 pathView->setRootIsDecorated( TRUE );
00070
00071 tabLayout_2->addWidget( pathView, 0, 0 );
00072 tabWidget->insertTab( tab_2,
QString(
"") );
00073
00074 dump =
new QWidget( tabWidget,
"dump" );
00075 dumpLayout =
new QVBoxLayout( dump, 6, 6,
"dumpLayout");
00076
00077 dumpView =
new QTextEdit( dump,
"dumpView" );
00078 dumpView->setTextFormat( QTextEdit::LogText );
00079 dumpView->setReadOnly( TRUE );
00080 dumpView->setUndoRedoEnabled( FALSE );
00081 dumpLayout->addWidget( dumpView );
00082 tabWidget->insertTab( dump,
QString(
"") );
00083
00084 CertificateInfoWidgetLayout->addMultiCellWidget( tabWidget, 2, 2, 0, 1 );
00085
00086 importButton =
new QPushButton(
this,
"importButton" );
00087
00088 CertificateInfoWidgetLayout->addWidget( importButton, 3, 1 );
00089 Spacer2 =
new QSpacerItem( 291, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
00090 CertificateInfoWidgetLayout->addItem( Spacer2, 3, 0 );
00091
00092 TextLabel1 =
new QLabel(
this,
"TextLabel1" );
00093 TextLabel1->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
00094
QFont TextLabel1_font( TextLabel1->font() );
00095 TextLabel1_font.setBold( TRUE );
00096 TextLabel1->setFont( TextLabel1_font );
00097
00098 CertificateInfoWidgetLayout->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );
00099 languageChange();
00100 resize(
QSize(423, 403).expandedTo(minimumSizeHint()) );
00101 clearWState( WState_Polished );
00102 }
00103
00104
00105
00106
00107 CertificateInfoWidget::~CertificateInfoWidget()
00108 {
00109
00110 }
00111
00112
00113
00114
00115
00116
void CertificateInfoWidget::languageChange()
00117 {
00118 listView->header()->setLabel( 0, tr2i18n(
"Description" ) );
00119 listView->header()->setLabel( 1, tr2i18n(
"Information" ) );
00120 tabWidget->changeTab( tab, tr2i18n(
"&Details" ) );
00121 pathView->header()->setLabel( 0, tr2i18n(
"Path" ) );
00122 tabWidget->changeTab( tab_2, tr2i18n(
"&Chain" ) );
00123 tabWidget->changeTab( dump, tr2i18n(
"Du&mp" ) );
00124 importButton->setText( tr2i18n(
"&Import to Local" ) );
00125 TextLabel1->setText( tr2i18n(
"Certificate Information" ) );
00126 }
00127
00128
#include "certificateinfowidget.moc"