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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
/****************************************************************************
**
** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
**
** This file is part of the Edyuk project <http://edyuk.org>
**
** This file may be used under the terms of the GNU General Public License
** version 3 as published by the Free Software Foundation and appearing in the
** file GPL.txt included in the packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/
#ifndef _QFORMAT_CONFIG_H_
#define _QFORMAT_CONFIG_H_
#include "mostQtHeaders.h"
#include "qce-config.h"
/*!
\file qformatconfig.h
\brief Definition of the QFormatConfig widget
\see QFormatConfig
*/
#include "ui_formatconfig.h"
class QFormatScheme;
class QCE_EXPORT QFormatConfig : public QWidget, private Ui::FormatConfig
{
Q_OBJECT
public:
QFormatConfig(QWidget *w = 0);
bool isAutonomous() const;
bool hasUnsavedChanges() const;
QList<QFormatScheme*> schemes() const;
QList<QString>& addCategory(const QString& name);
public slots:
void retranslate();
void apply();
void cancel();
void restore();
void setAutonomous(bool y);
void addScheme(const QString& name, QFormatScheme *scheme);
void removeScheme(QFormatScheme *scheme);
void setCurrentScheme(QFormatScheme *scheme);
void setBasePointSize(int basePointSize);
protected:
virtual void hideEvent(QHideEvent *e);
virtual void showEvent(QShowEvent *e);
private slots:
void on_m_selector_currentIndexChanged(int idx);
private:
QList<int> modifiedFormats() const;
QList<QList<QString> > m_categories;
bool m_autonomous;
QFormatScheme *m_currentScheme;
QList<QFormatScheme*> m_schemes;
int basePointSize;
};
#endif // _QFORMAT_CONFIG_H_
|