2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiFontExample.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUIFONTEXAMPLE_H
|
|
|
|
#define GUIFONTEXAMPLE_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class QPaintEvent;
|
|
|
|
|
|
|
|
//namespace lyx {
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
class GuiFontExample : public QWidget
|
|
|
|
{
|
2006-03-05 17:24:44 +00:00
|
|
|
public:
|
2007-09-05 20:33:29 +00:00
|
|
|
GuiFontExample(QWidget * parent) : QWidget(parent) {}
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
void set(QFont const & font, QString const & text);
|
|
|
|
|
|
|
|
virtual QSize sizeHint() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void paintEvent(QPaintEvent * p);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QFont font_;
|
|
|
|
QString text_;
|
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
//} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUIFONTEXAMPLE_H
|