Commit 03af443f authored by John Firebaugh's avatar John Firebaugh
Browse files

QMultiLineLabel -> QTextEdit

svn path=/trunk/kdesdk/cervisia/; revision=126364
parent 853e75d9
/*
/*
* Copyright (C) 1999-2001 Bernd Gehrmann
* bernd@physik.hu-berlin.de
*
......@@ -27,7 +27,6 @@
#include <diffdlg.h>
#include <annotatedlg.h>
#include "cvsprogressdlg.h"
#include "multilinelabel.h"
#include "misc.h"
#include "logdlg.h"
......@@ -133,10 +132,14 @@ LogDialog::LogDialog(QWidget *parent, const char *name)
QLabel *commentlabel = new QLabel(i18n("Comment/Tags:"), this);
grid->addWidget(commentlabel, 2, 0);
commentbox[i] = new MultiLineLabel(this);
commentbox[i] = new QTextEdit(this);
commentbox[i]->setReadOnly(true);
commentbox[i]->setMinimumSize(10,10);
grid->addMultiCellWidget(commentbox[i], 2, 2, 1, 3);
tagsbox[i] = new MultiLineLabel(this);
tagsbox[i] = new QTextEdit(this);
tagsbox[i]->setReadOnly(true);
tagsbox[i]->setMinimumSize(10,10);
grid->addWidget(tagsbox[i], 2, 4);
}
......
/*
/*
* Copyright (C) 1999-2001 Bernd Gehrmann
* bernd@physik.hu-berlin.de
*
......@@ -17,7 +17,7 @@
#include <qdialog.h>
#include <qlabel.h>
#include <qmultilinedit.h>
#include <qtextedit.h>
#include <qlistview.h>
#include <qcombobox.h>
#include <qtabbar.h>
......@@ -88,8 +88,8 @@ private:
QLabel *revbox[2];
QLabel *authorbox[2];
QLabel *datebox[2];
QMultiLineEdit *commentbox[2];
QMultiLineEdit *tagsbox[2];
QTextEdit *commentbox[2];
QTextEdit *tagsbox[2];
QComboBox *tagcombo[2];
};
......
/*
* Copyright (C) 1999-2001 Bernd Gehrmann
* bernd@physik.hu-berlin.de
*
* This program may be distributed under the terms of the Q Public
* License as defined by Trolltech AS of Norway and appearing in the
* file LICENSE.QPL included in the packaging of this file.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#include "multilinelabel.h"
#include "multilinelabel.moc"
MultiLineLabel::MultiLineLabel(QWidget *parent, const char *name)
: QMultiLineEdit(parent, name)
{
setReadOnly(true);
setFrameStyle(QFrame::Panel | QFrame::Sunken);
setWordWrap(QMultiLineEdit::WidgetWidth);
// setAlignment(AlignTop);
}
MultiLineLabel::~MultiLineLabel()
{}
QSize MultiLineLabel::sizeHint() const
{
QFontMetrics fm(fontMetrics());
return QSize(fm.width('X') * 30,
fm.lineSpacing()+fm.height()+frameWidth()*2);
}
// Local Variables:
// c-basic-offset: 4
// End:
/*
* Copyright (C) 1999-2001 Bernd Gehrmann
* bernd@physik.hu-berlin.de
*
* This program may be distributed under the terms of the Q Public
* License as defined by Trolltech AS of Norway and appearing in the
* file LICENSE.QPL included in the packaging of this file.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef _MULTILINELABEL_H_
#define _MULTILINELABEL_H_
#include <qmultilineedit.h>
class MultiLineLabel : public QMultiLineEdit
{
Q_OBJECT
public:
MultiLineLabel( QWidget *parent, const char *name=0 );
~MultiLineLabel();
protected:
virtual QSize sizeHint() const;
};
#endif
// Local Variables:
// c-basic-offset: 4
// End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment