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