Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9369 in orxonox.OLD


Ignore:
Timestamp:
Jul 20, 2006, 9:16:39 PM (18 years ago)
Author:
bensch
Message:

orxonox/proxy switched to sigslot library, and it seems to work, but i am not entirely sure…

Location:
branches/proxy/src
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/Makefile.am

    r8367 r9369  
    3131        collision_detection \
    3232        collision_reaction \
     33        gui \
    3334        network \
    3435        parser \
    3536        shell \
    36         script_engine \
    37         gui
     37        script_engine
  • branches/proxy/src/lib/gui/gl/glgui_button.cc

    r8769 r9369  
    7979  {
    8080    GLGuiWidget::clicking(pos);
    81     emit(clicked());
     81    clicked.emit();
    8282  }
    8383  void GLGuiButton::releasing(const Vector2D& pos, bool focused)
    8484  {
    8585    GLGuiWidget::releasing(pos, focused);
    86     emit(released());
     86    released.emit();
    8787  }
    8888
     
    103103    {
    104104      if (event.bPressed)
    105         emit(pushed());
     105        clicked.emit();
    106106      else
    107         emit(released());
     107        released.emit();
    108108      return true;
    109109    }
  • branches/proxy/src/lib/gui/gl/glgui_button.h

    r8717 r9369  
    4242      virtual bool processEvent(const Event& event);
    4343
    44       DeclareSignal0(clicked);
    45       DeclareSignal0(released);
     44      sigslot::signal0<> clicked;
     45      sigslot::signal0<> released;
    4646
    4747
  • branches/proxy/src/lib/gui/gl/glgui_checkbutton.cc

    r8717 r9369  
    5555  {
    5656    this->bActive = bActive;
    57     emit(this->toggled(this->bActive));
     57    this->toggled.emit(this->bActive);
    5858  }
    5959
  • branches/proxy/src/lib/gui/gl/glgui_checkbutton.h

    r8717 r9369  
    3434    virtual void update() {};
    3535
    36     DeclareSignal1(toggled, bool);
     36    sigslot::signal1<bool> toggled;
    3737
    3838  protected:
  • branches/proxy/src/lib/gui/gl/glgui_image.h

    r8448 r9369  
    3434    virtual void draw() const;
    3535
    36     DeclareSignal0(imageChanged);
     36    sigslot::signal0<> imageChanged;
    3737
    3838  protected:
  • branches/proxy/src/lib/gui/gl/glgui_inputline.cc

    r8717 r9369  
    124124    this->resize();
    125125    this->setFrontColor(Color(1,1,1,1), true);
    126     emit(this->textChanged(this->_text.text()));
     126    this->textChanged.emit(this->_text.text());
    127127  }
    128128
     
    146146  void GLGuiInputLine::pushEnter()
    147147  {
    148     emit(this->enterPushed(this->_text.text()));
     148    this->enterPushed.emit(this->_text.text());
    149149    if (this->_clearOnEnter)
    150150      this->clear();
  • branches/proxy/src/lib/gui/gl/glgui_inputline.h

    r8619 r9369  
    4949    virtual bool processEvent(const Event& event);
    5050
    51     DeclareSignal1(textChanged, const std::string&);
    52     DeclareSignal1(enterPushed, const std::string&);
     51    sigslot::signal1<const std::string&> textChanged;
     52    sigslot::signal1<const std::string&> enterPushed;
    5353
    5454  protected:
  • branches/proxy/src/lib/gui/gl/glgui_slider.cc

    r8717 r9369  
    7777    this->_handle.setCenter(this->sliderPosition(), borderTop() + (this->getSizeY2D() - borderTop() - borderBottom()) / 2.0);
    7878
    79     emit(valueChanged(this->_value));
     79    valueChanged.emit(this->_value);
    8080  }
    8181
     
    9090    {
    9191      this->_minValue = minimum;
    92       emit(rangeChanged(this->_minValue, this->_maxValue));
     92      rangeChanged.emit(this->_minValue, this->_maxValue);
    9393    }
    9494    if (this->value() < this->min())
     
    107107    {
    108108      this->_maxValue = maximum;
    109       emit(rangeChanged(this->_minValue, this->_maxValue));
     109      rangeChanged.emit(this->_minValue, this->_maxValue);
    110110    }
    111111    if (this->value() > this->max())
     
    126126      this->_minValue = minimum;
    127127      this->_maxValue = maximum;
    128       emit(rangeChanged(this->_minValue, this->_maxValue));
     128      rangeChanged.emit(this->_minValue, this->_maxValue);
    129129    }
    130130    if (this->value() < this->min())
  • branches/proxy/src/lib/gui/gl/glgui_slider.h

    r8717 r9369  
    5151    virtual void draw() const;
    5252
    53     DeclareSignal1(valueChanged, float);
    54     DeclareSignal2(rangeChanged, float, float);
     53    sigslot::signal1<float> valueChanged;
     54    sigslot::signal2<float, float> rangeChanged;
    5555
    5656  protected:
  • branches/proxy/src/lib/gui/gl/glgui_text.cc

    r8991 r9369  
    113113    this->resize();
    114114    this->setFrontColor(_changedTextColor, true);
    115     emit(this->textChanged(this->_text.text()));
     115    this->textChanged.emit(this->_text.text());
    116116  }
    117117
  • branches/proxy/src/lib/gui/gl/glgui_text.h

    r8991 r9369  
    4040    virtual void draw() const;
    4141
    42     DeclareSignal1(textChanged, const std::string&);
     42    sigslot::signal1<const std::string&> textChanged;
    4343
    4444  protected:
  • branches/proxy/src/lib/gui/gl/glgui_textfield.cc

    r9015 r9369  
    112112    this->resize();
    113113    this->setFrontColor(_changedTextColor, true);
    114     emit(this->textChanged(this->_text.text()));
     114    this->textChanged.emit(this->_text.text());
    115115  }
    116116
  • branches/proxy/src/lib/gui/gl/glgui_textfield.h

    r9015 r9369  
    3838    virtual void draw() const;
    3939
    40     DeclareSignal1(textChanged, const std::string&);
     40    sigslot::signal1<const std::string&> textChanged;
    4141
    4242  protected:
  • branches/proxy/src/lib/gui/gl/glgui_widget.cc

    r9019 r9369  
    288288    this->setWidgetSize(Vector2D(x, y));
    289289  }
    290 
    291 
    292 
    293   void GLGuiWidget::connect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver, Slot executor)
    294   {
    295     sender->connect(signal, receiver, executor);
    296   }
    297 
    298   void GLGuiWidget::connect(Signal& signal, BaseObject* receiver, Slot executor)
    299   {
    300     signal.push_back(SignalConnector(receiver, executor));
    301   }
    302 
    303290
    304291  void GLGuiWidget::show()
  • branches/proxy/src/lib/gui/gl/glgui_widget.h

    r8990 r9369  
    1717
    1818#include "event.h"
    19 #include "signal_connector.h"
     19#include "sigslot/signal.h"
    2020
    2121namespace OrxGui
     
    7070    void release(const Vector2D& pos);
    7171    bool clickable() const { return this->_clickable; };
    72 
    73     static void connect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver, Slot executor);
    74     void connect(Signal& signal, BaseObject* receiver, Slot executor);
    75 
    76     void disconnect(GLGuiWidget* sender, Signal& signal, BaseObject* receiver);
    7772
    7873    OrxGui::State state() const { return this->_state; };
  • branches/proxy/src/lib/gui/gl/signal_connector.h

    r8145 r9369  
    1212{
    1313
    14   //////////////// TO BE IGNORED BY YOU /////
     14//////////////// TO BE IGNORED BY YOU /////
    1515#define DeclareSignalBegin(SignalName) \
    1616  public: \
  • branches/proxy/src/lib/util/sigslot/signal.h

    r9368 r9369  
    12381238    virtual _connection_base0<mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
    12391239    {
    1240       return new _connection0<dest_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1240      return new _connection0<dest_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    12411241    }
    12421242
     
    12791279    virtual _connection_base1<arg1_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
    12801280    {
    1281       return new _connection1<dest_type, arg1_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1281      return new _connection1<dest_type, arg1_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    12821282    }
    12831283
     
    13211321    virtual _connection_base2<arg1_type, arg2_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
    13221322    {
    1323       return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1323      return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    13241324    }
    13251325
     
    13631363    virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
    13641364    {
    1365       return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1365      return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    13661366    }
    13671367
     
    14071407    virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* duplicate(has_slots<mt_policy>* pnewdest)
    14081408    {
    1409       return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1409      return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    14101410    }
    14111411
     
    14571457    {
    14581458      return new _connection5<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
    1459              arg5_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1459      arg5_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    14601460    }
    14611461
     
    15071507    {
    15081508      return new _connection6<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
    1509              arg5_type, arg6_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1509      arg5_type, arg6_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    15101510    }
    15111511
     
    15571557    {
    15581558      return new _connection7<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
    1559              arg5_type, arg6_type, arg7_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1559      arg5_type, arg6_type, arg7_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    15601560    }
    15611561
     
    16091609    {
    16101610      return new _connection8<dest_type, arg1_type, arg2_type, arg3_type, arg4_type,
    1611              arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
     1611      arg5_type, arg6_type, arg7_type, arg8_type, mt_policy>(dynamic_cast<dest_type*>(pnewdest), m_pmemfun);
    16121612    }
    16131613
  • branches/proxy/src/lib/util/sigslot/slot.h

    r9361 r9369  
    240240
    241241  template<class mt_policy = SIGSLOT_DEFAULT_MT_POLICY>
    242   class has_slots : public mt_policy
     242  class has_slots //: public mt_policy
    243243  {
    244244    private:
     
    253253
    254254      has_slots(const has_slots& hs)
    255           : mt_policy(hs)
    256       {
    257         lock_block<mt_policy> lock(this);
     255//          : mt_policy(hs)
     256      {
     257        //lock_block<mt_policy> lock(this);
    258258        const_iterator it = hs.m_senders.begin();
    259259        const_iterator itEnd = hs.m_senders.end();
     
    269269      void signal_connect(_signal_base<mt_policy>* sender)
    270270      {
    271         lock_block<mt_policy> lock(this);
     271        //lock_block<mt_policy> lock(this);
    272272        m_senders.insert(sender);
    273273      }
     
    275275      void signal_disconnect(_signal_base<mt_policy>* sender)
    276276      {
    277         lock_block<mt_policy> lock(this);
     277        //lock_block<mt_policy> lock(this);
    278278        m_senders.erase(sender);
    279279      }
     
    286286      void disconnect_all()
    287287      {
    288         lock_block<mt_policy> lock(this);
     288        //lock_block<mt_policy> lock(this);
    289289        const_iterator it = m_senders.begin();
    290290        const_iterator itEnd = m_senders.end();
  • branches/proxy/src/story_entities/menu/game_menu.cc

    r9235 r9369  
    152152    {
    153153      OrxGui::GLGuiButton* startButton = new OrxGui::GLGuiPushButton("Play");
    154       startButton->connect(SIGNAL(startButton, released), this, SLOT(GameMenu, showCampaigns));
     154      startButton->released.connect(this, &GameMenu::showCampaigns);
    155155      this->mainMenuBox->pack(startButton);
    156156      startButton->select();
    157157
    158158      OrxGui::GLGuiButton* networkButton = new OrxGui::GLGuiPushButton("MultiPlayer");
    159       networkButton->connect(SIGNAL(networkButton, released), this, SLOT(GameMenu, showMultiPlayer));
     159      networkButton->released.connect(this, &GameMenu::showMultiPlayer);
    160160      this->mainMenuBox->pack(networkButton);
    161161
    162162      OrxGui::GLGuiButton* optionsButton = new OrxGui::GLGuiPushButton("Options");
    163       optionsButton->connect(SIGNAL(optionsButton, released), this, SLOT(GameMenu, showOptionsMenu));
     163      optionsButton->released.connect(this, &GameMenu::showOptionsMenu);
    164164      this->mainMenuBox->pack(optionsButton);
    165165
     
    167167      OrxGui::GLGuiButton* quitButton = new OrxGui::GLGuiPushButton("Quit");
    168168      this->mainMenuBox->pack(quitButton);
    169       quitButton->connect(SIGNAL(quitButton, released), this, SLOT(GameMenu, quitMenu));
     169      quitButton->released.connect(this, &GameMenu::quitMenu);
    170170    }
    171171  }
     
    202202          printf("%s\n", se->getMenuScreenshoot().c_str());
    203203          OrxGui::GLGuiImageButton* button = new OrxGui::GLGuiImageButton(se->getName(), se->getStoryID(), se->getMenuScreenshoot(), image);
    204           button->connect(SIGNAL(button, startLevel), this, SLOT(GameMenu, startLevel));
     204          button->startLevel.connect(this, &GameMenu::startLevel);
    205205          labelBox->pack(button);
    206206
     
    244244      OrxGui::GLGuiButton* clientButton = new OrxGui::GLGuiPushButton("Client");
    245245      box->pack(clientButton);
    246       clientButton->connect(SIGNAL(clientButton, released), this, SLOT(GameMenu, showClientMenu));
     246      clientButton->released.connect(this, &GameMenu::showClientMenu);
    247247
    248248      OrxGui::GLGuiButton* serverButton = new OrxGui::GLGuiPushButton("Server");
    249249      box->pack(serverButton);
    250       serverButton->connect(SIGNAL(serverButton, released), this, SLOT(GameMenu, showServerMenu));
     250      serverButton->released.connect(this, &GameMenu::showServerMenu);
    251251
    252252      networkBox->pack( box );
     
    531531      this->ipInputLine->setText( Preferences::getInstance()->getString( "multiplayer", "lastVisitedServer", "localhost" ) );
    532532      this->clientNetworkBox->pack( this->ipInputLine );
    533       this->ipInputLine->connect(SIGNAL(ipInputLine, enterPushed), this, SLOT(GameMenu, connectToServer));
     533      //this->ipInputLine->enterPushed.connect(this, &GameMenu::connectToServer); /// redo this.
    534534      this->ipInputLine->select();
    535535
    536536      OrxGui::GLGuiButton* connectButton = new OrxGui::GLGuiPushButton("Connect");
    537537      clientNetworkBox->pack(connectButton);
    538       connectButton->connect(SIGNAL(connectButton, released), this, SLOT(GameMenu, connectToServer));
     538      connectButton->released.connect(this, &GameMenu::connectToServer);
    539539    }
    540540  }
     
    574574      OrxGui::GLGuiButton* createButton = new OrxGui::GLGuiPushButton("Create Server");
    575575      serverNetworkBox->pack(createButton);
    576       createButton->connect(SIGNAL(createButton, released), this, SLOT(GameMenu, createServer));
     576      createButton->released.connect(this, &GameMenu::createServer);
    577577    }
    578578  }
  • branches/proxy/src/story_entities/menu/glgui_imagebutton.cc

    r8740 r9369  
    4040    GLGuiPushButton::releasing(pos, focused);
    4141    if (focused)
    42       this->emit(startLevel(this->levelID));
     42      this->startLevel.emit(this->levelID);
    4343  }
    4444
     
    7777      {
    7878//        emit(released());
    79         emit(startLevel(this->levelID));
     79        startLevel.emit(this->levelID);
    8080      }
    8181      return true;
  • branches/proxy/src/story_entities/menu/glgui_imagebutton.h

    r8740 r9369  
    2525    void release();
    2626
    27     DeclareSignal1(startLevel, int);
     27    sigslot::signal1<int> startLevel;
    2828
    2929  protected:
  • branches/proxy/src/util/multiplayer_team_deathmatch.cc

    r9357 r9369  
    8787  this->input = new OrxGui::GLGuiInputLine();
    8888  this->input->setAbsCoor2D(180, 5);
    89   this->input->connect(SIGNAL(input, enterPushed), this, SLOT(MultiplayerTeamDeathmatch, onInputEnter));
     89  this->input->enterPushed.connect(this, &MultiplayerTeamDeathmatch::onInputEnter);
    9090}
    9191
     
    154154      OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
    155155      box->pack( buttonSpectator );
    156       buttonSpectator->connect(SIGNAL(buttonSpectator, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonSpectator));
     156      buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator);
    157157
    158158      OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random");
    159159      box->pack( buttonRandom );
    160       buttonRandom->connect(SIGNAL(buttonRandom, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonRandom));
     160      buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom);
    161161
    162162      OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team");
    163163      box->pack( buttonTeam0 );
    164       buttonTeam0->connect(SIGNAL(buttonTeam0, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonTeam0));
     164      buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0);
    165165
    166166      OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team");
    167167      box->pack( buttonTeam1 );
    168       buttonTeam1->connect(SIGNAL(buttonTeam1, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonTeam1));
     168      buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1);
    169169
    170170      if ( bShowTeamChange )
     
    172172        OrxGui::GLGuiPushButton * buttonCancel = new OrxGui::GLGuiPushButton("Cancel");
    173173        box->pack( buttonCancel );
    174         buttonCancel->connect(SIGNAL(buttonCancel, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonCancel));
     174        buttonCancel->released.connect(this, &MultiplayerTeamDeathmatch::onButtonCancel);
    175175      }
    176176
    177177      OrxGui::GLGuiPushButton * buttonExit = new OrxGui::GLGuiPushButton("Exit");
    178178      box->pack( buttonExit );
    179       buttonExit->connect(SIGNAL(buttonExit, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonExit));
     179      buttonExit->released.connect(this, &MultiplayerTeamDeathmatch::onButtonExit);
    180180
    181181      box->showAll();
  • branches/proxy/src/util/network_stats_widget.cc

    r9347 r9369  
    1717
    1818#include "network_stats_widget.h"
     19
     20#include "multi_type.h"
    1921
    2022namespace OrxGui
  • branches/proxy/src/world_entities/elements/glgui_energywidget.cc

    r9014 r9369  
    1717
    1818#include "glgui_energywidget.h"
     19
     20#include "multi_type.h"
    1921
    2022namespace OrxGui
  • branches/proxy/src/world_entities/environments/mapped_water.cc

    r9235 r9369  
    374374        waterColorR->setValue(this->waterColor.x);
    375375        waterColorR->setStep(0.1f);
    376         waterColorR->connect(SIGNAL(waterColorR, valueChanged), this, SLOT(MappedWater, resetWaterColorR));
     376        waterColorR->valueChanged.connect(this, &MappedWater::resetWaterColorR);
    377377        waterColorBox->pack(waterColorR);
    378378
     
    381381        waterColorG->setStep(0.1f);
    382382        waterColorG->setValue(this->waterColor.y);
    383         waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG));
     383        waterColorG->valueChanged.connect(this, &MappedWater::resetWaterColorG);
    384384        waterColorBox->pack(waterColorG);
    385385
     
    388388        waterColorB->setStep(0.1f);
    389389        waterColorB->setValue(this->waterColor.z);
    390         waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB));
     390        waterColorB->valueChanged.connect(this, &MappedWater::resetWaterColorB);
    391391        waterColorBox->pack(waterColorB);
    392392      }
     
    403403        waterUV->setValue(this->waterUV);
    404404        waterUV->setStep(1);
    405         waterUV->connect(SIGNAL(waterUV, valueChanged), this, SLOT(MappedWater, setWaterUV));
     405        waterUV->valueChanged.connect(this, &MappedWater::setWaterUV);
    406406        waterUVBox->pack(waterUV);
    407407      }
     
    418418        waterFlow->setValue(this->waterFlow);
    419419        waterFlow->setStep(0.02f);
    420         waterFlow->connect(SIGNAL(waterFlow, valueChanged), this, SLOT(MappedWater, setWaterFlow));
     420        waterFlow->valueChanged.connect(this, &MappedWater::setWaterFlow);
    421421        waterFlowBox->pack(waterFlow);
    422422      }
     
    433433        shineSize->setValue(this->shineSize);
    434434        shineSize->setStep(1);
    435         shineSize->connect(SIGNAL(shineSize, valueChanged), this, SLOT(MappedWater, resetShineSize));
     435        shineSize->valueChanged.connect(this, &MappedWater::resetShineSize);
    436436        shineSizeBox->pack(shineSize);
    437437      }
     
    448448        shineStrength->setValue(this->shineStrength);
    449449        shineStrength->setStep(0.1f);
    450         shineStrength->connect(SIGNAL(shineStrength, valueChanged), this, SLOT(MappedWater, resetShineStrength));
     450        shineStrength->valueChanged.connect(this, &MappedWater::resetShineStrength);
    451451        shineStrengthBox->pack(shineStrength);
    452452      }
     
    463463        reflStrength->setValue(this->reflStrength);
    464464        reflStrength->setStep(0.1f);
    465         reflStrength->connect(SIGNAL(reflStrength, valueChanged), this, SLOT(MappedWater, resetReflStrength));
     465        reflStrength->valueChanged.connect(this, &MappedWater::resetReflStrength);
    466466        reflStrengthBox->pack(reflStrength);
    467467      }
     
    478478        refraction->setValue(this->refraction);
    479479        refraction->setStep(0.004f);
    480         refraction->connect(SIGNAL(refraction, valueChanged), this, SLOT(MappedWater, resetRefraction));
     480        refraction->valueChanged.connect(this, &MappedWater::resetRefraction);
    481481        refractionBox->pack(refraction);
    482482      }
     
    493493        lightPosX->setValue(this->lightPos.x);
    494494        lightPosX->setStep(15);
    495         lightPosX->connect(SIGNAL(lightPosX, valueChanged), this, SLOT(MappedWater, resetLightPosX));
     495        lightPosX->valueChanged.connect(this, &MappedWater::resetLightPosX);
    496496        lightPosBox->pack(lightPosX);
    497497
     
    500500        lightPosY->setStep(15);
    501501        lightPosY->setValue(this->lightPos.y);
    502         lightPosY->connect(SIGNAL(lightPosY, valueChanged), this, SLOT(MappedWater, resetLightPosY));
     502        lightPosY->valueChanged.connect(this, &MappedWater::resetLightPosY);
    503503        lightPosBox->pack(lightPosY);
    504504
     
    507507        lightPosZ->setStep(15);
    508508        lightPosZ->setValue(this->lightPos.z);
    509         lightPosZ->connect(SIGNAL(lightPosZ, valueChanged), this, SLOT(MappedWater, resetLightPosZ));
     509        lightPosZ->valueChanged.connect(this, &MappedWater::resetLightPosZ);
    510510        lightPosBox->pack(lightPosZ);
    511511      }
     
    522522        waterHeight->setValue(this->waterHeight);
    523523        waterHeight->setStep(4);
    524         waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight));
     524        waterHeight->valueChanged.connect(this, &MappedWater::setWaterHeight);
    525525        waterHeightBox->pack(waterHeight);
    526526      }
Note: See TracChangeset for help on using the changeset viewer.