forked from mirror/openmw-tes3mp
101c147217
preference 1. Included updated status icons, added base.png 2. Added doxygen comments CSV / CSM Settings classes 3. Implemented Glorf's code for window size preference 4. Minor changes code that searches maps in CSV / CSM Settings classes 5. Removed CSVSettings::SamplePage class 6. Other minor code maintenance / improvements
53 lines
1.3 KiB
C++
53 lines
1.3 KiB
C++
#ifndef RECORDSTATUSDELEGATE_H
|
|
#define RECORDSTATUSDELEGATE_H
|
|
|
|
#include "util.hpp"
|
|
#include <QTextOption>
|
|
#include <QFont>
|
|
|
|
class QIcon;
|
|
class QFont;
|
|
class QFontMetrics;
|
|
|
|
namespace CSVWorld
|
|
{
|
|
class RecordStatusDelegate : public CommandDelegate
|
|
{
|
|
QFont mFont;
|
|
QFontMetrics *mFontMetrics;
|
|
|
|
QTextOption mTextAlignment;
|
|
|
|
QIcon *mModifiedIcon;
|
|
QIcon *mAddedIcon;
|
|
QIcon *mDeletedIcon;
|
|
QIcon *mBaseIcon;
|
|
|
|
int mStatusDisplay;
|
|
|
|
int mIconSize;
|
|
int mIconTopOffset;
|
|
int mTextLeftOffset;
|
|
|
|
public:
|
|
explicit RecordStatusDelegate(QUndoStack& undoStack, QObject *parent = 0);
|
|
|
|
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
|
|
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
|
|
void updateEditorSetting (const QString &settingName, const QString &settingValue);
|
|
|
|
};
|
|
|
|
class RecordStatusDelegateFactory : public CommandDelegateFactory
|
|
{
|
|
public:
|
|
|
|
virtual CommandDelegate *makeDelegate (QUndoStack& undoStack, QObject *parent) const;
|
|
///< The ownership of the returned CommandDelegate is transferred to the caller.
|
|
|
|
};
|
|
}
|
|
#endif // RECORDSTATUSDELEGATE_H
|
|
|