Commit 9085719b authored by Jan Möbius's avatar Jan Möbius

Skeleton for image replacement/loading

Skeleton for multiTexturing in plugin

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5710 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0341530d
......@@ -113,8 +113,10 @@ void TextureControlPlugin::slotTextureAdded( QString _textureName , QString _fil
new_texture->setChecked(true);
textureActions_.push_back(new_texture);
}
void TextureControlPlugin::slotMultiTextureAdded( QString _textureGroup , QString _name , QString _filename , int _id , int& _textureId ) {
std::cerr << "slotMultiTextureAdded" << std::endl;
}
void TextureControlPlugin::fileOpened( int _id ) {
......
......@@ -107,6 +107,7 @@ class TextureControlPlugin : public QObject, BaseInterface, TextureInterface, Me
// ContextMenuInterface
void addContextMenuItem(QAction* _action ,DataType _objectType , ContextMenuType _type );
private slots:
// BaseInterface
......@@ -117,12 +118,15 @@ class TextureControlPlugin : public QObject, BaseInterface, TextureInterface, Me
void slotUpdateAllTextures( );
void slotTextureAdded( QString _textureName , QString _filename , uint _dimension , int _id );
void slotTextureAdded( QString _textureName , QString _filename , uint _dimension );
void slotMultiTextureAdded( QString _textureGroup , QString _name , QString _filename , int _id , int& _textureId );
void slotTextureUpdated( QString _textureName , int _identifier );
void slotSetTextureMode(QString _textureName ,QString _mode, int _id);
void slotSetTextureMode(QString _textureName ,QString _mode);
void slotSwitchTexture( QString _textureName, int _id );
void slotSwitchTexture( QString _textureName );
// LoadSaveInterface
void fileOpened( int _id );
......
......@@ -65,6 +65,8 @@ texturePropertiesWidget::texturePropertiesWidget(QWidget *parent)
connect(clamp_min, SIGNAL( valueChanged(double) ), this , SLOT ( slotPropertiesChanged(double) ) );
connect(clamp_max, SIGNAL( valueChanged(double) ), this , SLOT ( slotPropertiesChanged(double) ) );
connect(changeImageButton, SIGNAL( clicked() ), this, SLOT( slotChangeImage() ) );
texData_ = 0;
......@@ -233,6 +235,21 @@ void texturePropertiesWidget::setOriginalData(std::vector< double > _x, std::vec
#endif
}
void texturePropertiesWidget::slotChangeImage() {
QString fileName = QFileDialog::getOpenFileName(0, tr("Open Image"),
OpenFlipper::Options::currentDirStr(),
tr("Images (*.png *.xpm *.jpg)"));
imageLabel->setText("File: " + fileName );
// TODO : Set and bind the new image
std::cerr << "filename was : " << fileName.toStdString() << std::endl;
}
void texturePropertiesWidget::slotButtonBoxClicked(QAbstractButton* _button){
QDialogButtonBox::StandardButton btn = buttonBox->standardButton(_button);
......
......@@ -64,6 +64,8 @@ class texturePropertiesWidget : public QDialog, public Ui::Dialog
void slotPropertiesChanged(double _value = 0.0);
void slotChangeImage();
private:
bool propChanged_;
......
......@@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1186</width>
<width>978</width>
<height>633</height>
</rect>
</property>
......@@ -164,7 +164,7 @@
<property name="sizeHint" stdset="0" >
<size>
<width>277</width>
<height>250</height>
<height>212</height>
</size>
</property>
</spacer>
......@@ -214,6 +214,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="changeImageButton" >
<property name="text" >
<string>Change Image</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment