root/trunk/qt4-gui/src/dialogs/hintsdlg.cpp

Revision 5837, 1.7 kB (checked in by eugene, 12 months ago)

P.S. Happy recompiling ;-)

Line 
1// -*- c-basic-offset: 2 -*-
2/*
3 * This file is part of Licq, an instant messaging client for UNIX.
4 * Copyright (C) 1999-2006 Licq developers
5 *
6 * Licq is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * Licq is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Licq; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20
21#include "hintsdlg.h"
22
23#include <QVBoxLayout>
24#include <QTextEdit>
25#include <QDialogButtonBox>
26#include <QPushButton>
27
28#include "helpers/support.h"
29
30using namespace LicqQtGui;
31/* TRANSLATOR LicqQtGui::HintsDlg */
32
33HintsDlg::HintsDlg(QString& text, QWidget* parent)
34  : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
35{
36  Support::setWidgetProps(this, "HintsDlg");
37  setAttribute(Qt::WA_DeleteOnClose, true);
38
39  setWindowTitle(tr("Licq - Hints"));
40
41  QVBoxLayout* lay = new QVBoxLayout(this);
42
43  viewPane = new QTextEdit();
44  viewPane->setReadOnly(true);
45  viewPane->setMinimumSize(400, 450);
46  viewPane->setText(text);
47  lay->addWidget(viewPane);
48
49  buttons = new QDialogButtonBox();
50  closeButton = buttons->addButton(QDialogButtonBox::Close);
51  connect(closeButton, SIGNAL(clicked()), SLOT(close()));
52  lay->addWidget(buttons);
53
54  show();
55}
Note: See TracBrowser for help on using the browser.