forked from mirror/openmw-tes3mp
c_str -> fromStdString, remove TextureBrushButton class
This commit is contained in:
parent
cf7a0f715e
commit
5f3c8b2b99
2 changed files with 8 additions and 22 deletions
|
@ -62,11 +62,6 @@ CSVRender::BrushSizeControls::BrushSizeControls(const QString &title, QWidget *p
|
||||||
setLayout(layoutSliderSize);
|
setLayout(layoutSliderSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSVRender::TextureBrushButton::TextureBrushButton (const QIcon & icon, const QString & text, QWidget * parent)
|
|
||||||
: QPushButton(icon, text, parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CSVRender::TextureBrushWindow::TextureBrushWindow(WorldspaceWidget *worldspaceWidget, QWidget *parent)
|
CSVRender::TextureBrushWindow::TextureBrushWindow(WorldspaceWidget *worldspaceWidget, QWidget *parent)
|
||||||
: QFrame(parent, Qt::Popup),
|
: QFrame(parent, Qt::Popup),
|
||||||
mWorldspaceWidget (worldspaceWidget),
|
mWorldspaceWidget (worldspaceWidget),
|
||||||
|
@ -74,7 +69,7 @@ CSVRender::TextureBrushWindow::TextureBrushWindow(WorldspaceWidget *worldspaceWi
|
||||||
mBrushShape(0)
|
mBrushShape(0)
|
||||||
{
|
{
|
||||||
mBrushTextureLabel = "Brush: " + mBrushTexture;
|
mBrushTextureLabel = "Brush: " + mBrushTexture;
|
||||||
selectedBrush = new QLabel(QString::fromUtf8(mBrushTextureLabel.c_str()), this);
|
selectedBrush = new QLabel(QString::fromStdString(mBrushTextureLabel), this);
|
||||||
|
|
||||||
QVBoxLayout *layoutMain = new QVBoxLayout;
|
QVBoxLayout *layoutMain = new QVBoxLayout;
|
||||||
layoutMain->setSpacing(0);
|
layoutMain->setSpacing(0);
|
||||||
|
@ -122,7 +117,7 @@ CSVRender::TextureBrushWindow::TextureBrushWindow(WorldspaceWidget *worldspaceWi
|
||||||
connect(parent, SIGNAL(passBrushTexture(std::string)), this, SLOT(setBrushTexture(std::string)));
|
connect(parent, SIGNAL(passBrushTexture(std::string)), this, SLOT(setBrushTexture(std::string)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::TextureBrushWindow::configureButtonInitialSettings(TextureBrushButton *button)
|
void CSVRender::TextureBrushWindow::configureButtonInitialSettings(QPushButton *button)
|
||||||
{
|
{
|
||||||
button->setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
|
button->setSizePolicy (QSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||||
button->setContentsMargins (QMargins (0, 0, 0, 0));
|
button->setContentsMargins (QMargins (0, 0, 0, 0));
|
||||||
|
@ -136,7 +131,7 @@ void CSVRender::TextureBrushWindow::setBrushTexture(std::string brushTexture)
|
||||||
{
|
{
|
||||||
mBrushTexture = brushTexture;
|
mBrushTexture = brushTexture;
|
||||||
mBrushTextureLabel = "Brush:" + mBrushTexture;
|
mBrushTextureLabel = "Brush:" + mBrushTexture;
|
||||||
selectedBrush->setText(QString::fromUtf8(mBrushTextureLabel.c_str()));
|
selectedBrush->setText(QString::fromStdString(mBrushTextureLabel));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::TextureBrushWindow::setBrushSize(int brushSize)
|
void CSVRender::TextureBrushWindow::setBrushSize(int brushSize)
|
||||||
|
|
|
@ -44,27 +44,18 @@ namespace CSVRender
|
||||||
QHBoxLayout *layoutSliderSize;
|
QHBoxLayout *layoutSliderSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TextureBrushButton : public QPushButton
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
TextureBrushButton (const QIcon& icon, const QString& tooltip = "",
|
|
||||||
QWidget *parent = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
class TextureBrushWindow : public QFrame
|
class TextureBrushWindow : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextureBrushWindow(WorldspaceWidget *worldspaceWidget, QWidget *parent = 0);
|
TextureBrushWindow(WorldspaceWidget *worldspaceWidget, QWidget *parent = 0);
|
||||||
void configureButtonInitialSettings(TextureBrushButton *button);
|
void configureButtonInitialSettings(QPushButton *button);
|
||||||
|
|
||||||
TextureBrushButton *buttonPoint = new TextureBrushButton(QIcon (QPixmap (":scenetoolbar/brush-point")), "", this);
|
QPushButton *buttonPoint = new QPushButton(QIcon (QPixmap (":scenetoolbar/brush-point")), "", this);
|
||||||
TextureBrushButton *buttonSquare = new TextureBrushButton(QIcon (QPixmap (":scenetoolbar/brush-square")), "", this);
|
QPushButton *buttonSquare = new QPushButton(QIcon (QPixmap (":scenetoolbar/brush-square")), "", this);
|
||||||
TextureBrushButton *buttonCircle = new TextureBrushButton(QIcon (QPixmap (":scenetoolbar/brush-circle")), "", this);
|
QPushButton *buttonCircle = new QPushButton(QIcon (QPixmap (":scenetoolbar/brush-circle")), "", this);
|
||||||
TextureBrushButton *buttonCustom = new TextureBrushButton(QIcon (QPixmap (":scenetoolbar/brush-custom")), "", this);
|
QPushButton *buttonCustom = new QPushButton(QIcon (QPixmap (":scenetoolbar/brush-custom")), "", this);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QLabel *selectedBrush;
|
QLabel *selectedBrush;
|
||||||
|
|
Loading…
Reference in a new issue