editdialog.cpp

00001 /***************************************************************************
00002                           editdialog.cpp  -  description
00003                              -------------------
00004     begin                : Wed Oct 31 2001
00005     copyright            : (C) 2001 by Eggert Ehmke
00006     email                : eggert.ehmke@berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include <tqlayout.h>
00019 #include <tqmultilineedit.h>
00020 #include <tqlabel.h>
00021 #include <tqlineedit.h>
00022 #include <ktextbrowser.h>
00023 #include "editdialog.h"
00024 
00025 EditDialog::EditDialog(TQWidget *parent, const char *name, const char* content, bool html):
00026   EditDlg(parent,name,true), _row(0)
00027 {
00028   setCaption (name);
00029   if (!html)
00030     m_Edit->setTextFormat (TQt::PlainText);
00031   m_Edit->setText (content);
00032 }
00033 
00034 void EditDialog::addWidget (const TQString& lbl, const TQString& value)
00035 {
00036   TQLabel* label = new TQLabel (lbl, this);
00037   TQLineEdit* edit = new TQLineEdit (this);
00038   edit->setReadOnly (true);
00039   edit->setText (value);
00040   headerlayout->addMultiCellWidget (label, _row, _row, 0, 0);
00041   headerlayout->addMultiCellWidget (edit, _row++, _row, 1, 1);
00042 }
00043 
00044 EditDialog::~EditDialog()
00045 {}
00046 
00047 void EditDialog::slotReplyClicked ()
00048 {
00049   // the value 10 is returned from exec
00050   // works, but signal/slot would be nice
00051   done (10);
00052 }

Generated on Wed May 16 21:15:18 2007 for kshowmail by  doxygen 1.5.0