2015-07-26 21:39:49 +00:00
|
|
|
#include "IPreviewPanel.h"
|
|
|
|
#include "WScanPreviewPanel.h"
|
|
|
|
#include "WStringPreviewPanel.h"
|
|
|
|
#include "WTexturePreviewPanel.h"
|
|
|
|
|
|
|
|
IPreviewPanel::IPreviewPanel(QWidget *parent) : QFrame(parent)
|
|
|
|
{
|
|
|
|
setFrameShape(QFrame::StyledPanel);
|
|
|
|
setFrameShadow(QFrame::Plain);
|
|
|
|
setLineWidth(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Can add more if more preview types are implemented
|
|
|
|
// Not every resource type is really suitable for this though unfortunately
|
|
|
|
IPreviewPanel* IPreviewPanel::CreatePanel(EResType Type, QWidget *pParent)
|
|
|
|
{
|
|
|
|
switch (Type)
|
|
|
|
{
|
2015-07-28 05:47:48 +00:00
|
|
|
case eTexture: return new WTexturePreviewPanel(pParent);
|
2015-07-26 21:39:49 +00:00
|
|
|
case eStringTable: return new WStringPreviewPanel(pParent);
|
2015-07-28 05:47:48 +00:00
|
|
|
case eScan: return new WScanPreviewPanel(pParent);
|
2015-07-26 21:39:49 +00:00
|
|
|
default: return nullptr;
|
|
|
|
}
|
|
|
|
}
|