Find the proper step when user clicks the Next button.

        :returns: The step to be switched to
        :rtype: WizardStep instance or None
964854
def get_next_step(self):
        
        if is_raster_layer(self.parent.layer):
            new_step = self.parent.step_kw_band_selector
        else:
            new_step = self.parent.step_kw_layermode
        return new_step
399224
function() {

        var events;
        var button;

        if (window.kelmu.data[id].settings.step && !stepButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.step);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            stepButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalStep = events.click[0].handler;
              events.click[0].handler = forwardAndSkip;
            } else {
              button.click(forwardAndSkip);
            }
          }
        }

        if (window.kelmu.data[id].settings.redo && !redoButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.redo);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            redoButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalRedo = events.click[0].handler;
              events.click[0].handler = redo;
            } else {
              button.click(redo);
            }
          }
        }

        if (window.kelmu.data[id].settings.undo && !undoButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.undo);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            undoButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalUndo = events.click[0].handler;
              events.click[0].handler = undo;
            } else {
              button.click(undo);
            }
          }
        }

        if (window.kelmu.data[id].settings.begin && !beginButtonInitialized) {
          button = element.find(window.kelmu.data[id].settings.begin);
          if (button.length > 0) {
            events = $._data(button[0], 'events');
            beginButtonInitialized = true;

            if (events && events.click && events.click.length > 0) {
              originalBegin = events.click[0].handler;
              events.click[0].handler = begin;
            } else {
              button.click(begin);
            }
          }
        }

      }
779389
function() {
            var prev = steps.indexOf( activeStep ) - 1;
            prev = prev >= 0 ? steps[ prev ] : steps[ steps.length - 1 ];

            return goto( prev );
        }
225731
private int getCurrentStep() {
        int step = -1;
        try {
            XPropertySet xDialogModelPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_xMSFDialogModel);
            step = ((Integer) xDialogModelPropertySet.getPropertyValue("Step")).intValue();
        } catch (com.sun.star.uno.Exception exception) {
            exception.printStackTrace(System.out);
        }
        return step;
    }
109957
def on_lstUnits_itemSelectionChanged(self):
        
        self.clear_further_steps()
        # Set widgets
        unit = self.selected_unit()
        # Exit if no selection
        if not unit:
            return
        self.lblDescribeUnit.setText(unit['description'])
        # Enable the next button
        self.parent.pbnNext.setEnabled(True)
311828
def move_to_step(self, step):
        
        if step not in self._scenario_steps.keys():
            raise UndefinedState("step {} not defined in scenario".format(step))
        try:
            session_id = session.sessionId
            self.session_machines.set_state(session_id, step)
        except UninitializedStateMachine as e:
            logger.error(e)
            return statement(INTERNAL_ERROR_MSG)
183423
def _get_input_steps(self):
        
        input_steps = []

        for step in self.steps_sorted:
            parent_steps = self._parent_steps(step)

            if len(parent_steps) == 0:
                input_steps.append(step)

        return input_steps
276533
def setup_step_into(self, frame, pure=False):
        
        self.frame_calling = frame
        if pure:
            self.frame_stop = None
        else:
            self.frame_stop = frame
        self.frame_return = None
        self.frame_suspend = False
        self.pending_stop = True 
        return
99456
def next(self):
        ""

        if not self._index_stack:
            return False

        index = self._index_stack[-1]

        if self._last_index != self._dic.ROOT:

            child_label = self._guide.child(index)  # UCharType

            if child_label:
                # Follows a transition to the first child.
                index = self._follow(child_label, index)
                if index is None:
                    return False
            else:
                while True:
                    sibling_label = self._guide.sibling(index)
                    # Moves to the previous node.
                    if len(self.key) > 0:
                        self.key.pop()
                        #self.key[-1] = 0

                    self._index_stack.pop()
                    if not self._index_stack:
                        return False

                    index = self._index_stack[-1]
                    if sibling_label:
                        # Follows a transition to the next sibling.
                        index = self._follow(sibling_label, index)
                        if index is None:
                            return False
                        break

        return self._find_terminal(index)
1147461
def step(self):
        
        assert len(self._agents_to_act) == 0
        self.next()
        while len(self._agents_to_act) > 0:
            self.next()
956594
def button_clicked(self, button):
        
        if button in (self.idx_ok, self.idx_apply):

            # loop over widgets, to see if they were modified
            for i_config in range(self.stacked.count()):
                one_config = self.stacked.widget(i_config)

                if one_config.modified:
                    lg.debug('Settings for ' + one_config.widget +
                             ' were modified')
                    one_config.get_values()

                    if self.parent.info.dataset is not None:
                        one_config.update_widget()
                    one_config.modified = False

            if button == self.idx_ok:
                self.accept()

        if button == self.idx_cancel:
            self.reject()
1322081
def get_next_step(self):
        
        layer_purpose = self.parent.step_kw_purpose.selected_purpose()
        if layer_purpose != layer_purpose_aggregation:
            subcategory = self.parent.step_kw_subcategory.\
                selected_subcategory()
        else:
            subcategory = {'key': None}

        # Has layer groups, go to field mapping
        field_groups = get_field_groups(
            layer_purpose['key'], subcategory['key'])
        compulsory_field = get_compulsory_fields(
            layer_purpose['key'], subcategory['key'])

        # It's aggregation and has field_groups.
        if field_groups and layer_purpose == layer_purpose_aggregation:
            return self.parent.step_kw_fields_mapping

        # It has field_groups and the compulsory field is population count.
        if field_groups and compulsory_field == population_count_field:
            return self.parent.step_kw_fields_mapping

        # Has classifications, go to multi classifications
        if subcategory.get('classifications'):
            if layer_purpose == layer_purpose_hazard:
                return self.parent.step_kw_multi_classifications
            elif layer_purpose == layer_purpose_exposure:
                return self.parent.step_kw_classification

        # Check if it can go to inasafe field step
        non_compulsory_fields = get_non_compulsory_fields(
            layer_purpose['key'], subcategory['key'])
        if not skip_inasafe_field(self.parent.layer, non_compulsory_fields):
            return self.parent.step_kw_inasafe_fields

        # Check if it can go to inasafe default field step
        default_inasafe_fields = get_fields(
            layer_purpose['key'],
            subcategory['key'],
            replace_null=True,
            in_group=False)
        if default_inasafe_fields:
            return self.parent.step_kw_default_inasafe_fields

        # Any other case
        return self.parent.step_kw_source
1229894
function() {
            var next = steps.indexOf( activeStep ) + 1;
            next = next < steps.length ? steps[ next ] : steps[ 0 ];

            return goto( next );
        }
1082126
function(step){
		this.cancelEvent = false;
		this.mousestart = (step===0);
		this.mousemove  = (step===1);
		this.mouseend   = (step===2);
		
		var puzzle = this.puzzle;
		puzzle.emit('mouse');
		if(!this.cancelEvent && (this.btn==='left' || this.btn==='right')){
			if(this.mousestart){
				puzzle.opemgr.newOperation();
				puzzle.errclear();
			}
			else{ puzzle.opemgr.newChain();}
			
			this.mouseinput();
		}
	}
1103864
def next(self):
        
        curr_page = self.currentPage()
        if not curr_page:
            return
        elif not curr_page.validatePage():
            return

        pageId = curr_page.nextId()
        try:
            next_page = self._pages[pageId]
        except KeyError:
            return

        self._currentId = pageId
        self._navigation.append(pageId)

        y = curr_page.y()
        next_page.move(self.width(), y)

        # animate the last page in
        anim_in = QtCore.QPropertyAnimation(self)
        anim_in.setTargetObject(curr_page)
        anim_in.setPropertyName('pos')
        anim_in.setStartValue(curr_page.pos())
        anim_in.setEndValue(QtCore.QPoint(-curr_page.width(), y))
        anim_in.setDuration(self.animationSpeed())
        anim_in.setEasingCurve(QtCore.QEasingCurve.Linear)

        # animate the current page out
        anim_out = QtCore.QPropertyAnimation(self)
        anim_out.setTargetObject(next_page)
        anim_out.setPropertyName('pos')
        anim_out.setStartValue(next_page.pos())
        anim_out.setEndValue(curr_page.pos())
        anim_out.setDuration(self.animationSpeed())
        anim_out.setEasingCurve(QtCore.QEasingCurve.Linear)

        # create the anim group
        anim_grp = QtCore.QParallelAnimationGroup(self)
        anim_grp.addAnimation(anim_in)
        anim_grp.addAnimation(anim_out)
        anim_grp.finished.connect(curr_page.hide)
        anim_grp.finished.connect(anim_grp.deleteLater)

        next_page.show()

        # update the button states
        self._buttons[self.WizardButton.BackButton].setVisible(True)
        self._buttons[self.WizardButton.NextButton].setVisible(self.canGoForward())
        self._buttons[self.WizardButton.RetryButton].setVisible(self.canRetry())
        self._buttons[self.WizardButton.CommitButton].setVisible(next_page.isCommitPage())
        self._buttons[self.WizardButton.FinishButton].setVisible(next_page.isFinalPage())
        self.adjustSize()

        # initialize the new page
        self.currentIdChanged.emit(pageId)
        next_page.initializePage()
        anim_grp.start()
159161
public void nextStep() {
        if (currentStepIndex >= getWidgetCount() - 1) {
            CompleteEvent.fire(MaterialStepper.this, currentStepIndex + 1);
        } else {
            Widget w = getWidget(currentStepIndex);
            if (w instanceof MaterialStep) {
                MaterialStep step = (MaterialStep) w;
                step.setActive(false);

                step.setSuccessText(step.getDescription());

                // next step
                int nextStepIndex = getWidgetIndex(step) + 1;
                if (nextStepIndex >= 0) {
                    for (int i = nextStepIndex; i < getWidgetCount(); i++) {
                        w = getWidget(i);
                        if (!(w instanceof MaterialStep)) {
                            continue;
                        }
                        MaterialStep nextStep = (MaterialStep) w;
                        if (nextStep.isEnabled() && nextStep.isVisible()) {
                            nextStep.setActive(true);
                            setCurrentStepIndex(i);
                            NextEvent.fire(MaterialStepper.this);
                            break;
                        }
                    }
                }
            }
        }
    }
6109
def step( self ):
        
        if ( self._step is not None ):
            return self._step
        
        elif ( self.rulerType() == XChartRuler.Type.Number ):
            self._step = int((self.maximum() - self.minimum()) / 10.0)
        
        elif ( self.rulerType() == XChartRuler.Type.Date ):
            
            self._step = int(self.minimum().daysTo(self.maximum()) / 10.0) - 1
        
        elif ( self.rulerType() & (XChartRuler.Type.Time | \
                                   XChartRuler.Type.Datetime) ):
            self._step = int(self.minimum().secsTo(self.maximum()) / 10.0) - 1
        
        return self._step