summaryrefslogtreecommitdiffstats
path: root/kshowmail/showheaderdialog.cpp
blob: 829fa98476ca71626a843e2ee620b70d4ac35b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// C++ Implementation: showheaderdialog
//
// Description:
//
//
// Author: Ulrich Weigelt <ulrich.weigelt@gmx.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "showheaderdialog.h"

ShowHeaderDialog::ShowHeaderDialog( QWidget * parent, QString & caption, QString & subject, QString header ) :
    KDialogBase( parent, "showheaderdialog", true, caption, KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true )
{
  //create main widget
  QWidget* mainWidget = new QWidget( this );
  setMainWidget( mainWidget );

  //this layout seperates meta data area (subject) from the mail header area
  QVBoxLayout* layMain = new QVBoxLayout( mainWidget, 0, spacingHint() );

  //this layout arranges the labels and lines for the meta datas
  QHBoxLayout* layMetaDatas = new QHBoxLayout( layMain, spacingHint() );

  //create label for subject
  QLabel* lblSubject = new QLabel( i18n( "Subject:" ), mainWidget, "lblSubject" );
  layMetaDatas->addWidget( lblSubject );

  //create line edit for subject
  KLineEdit* liSubject = new KLineEdit( subject, mainWidget, "liSubject" );
  liSubject->setReadOnly( true );
  layMetaDatas->addWidget( liSubject );

  //create text edit for the header
  KTextEdit* txtHeader = new KTextEdit( mainWidget );

  txtHeader->setText( header );
  txtHeader->setMinimumSize( WIDTH_VIEW_MAILHEADER, HEIGHT_VIEW_MAILHEADER );

  layMain->addWidget( txtHeader );
}



ShowHeaderDialog::~ShowHeaderDialog()
{
}


#include "showheaderdialog.moc"