<commit_before>#ifndef KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_
#define KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_

#include "utility/pimpl.h"
#include <QStackedWidget>
#include <QWidget>
#include <QEasingCurve>
#include <memory>

namespace Kryvo {

class SlidingStackedWidgetPrivate;

/*!
 * SlidingStackedWidget is a class that is derived from QStackedWidget
 * and allows smooth side shifting of widgets, in addition
 * to the original hard switching from one to another as offered by
 * QStackedWidget.
*/
class SlidingStackedWidget : public QStackedWidget {
  Q_OBJECT
  DECLARE_PRIVATE(SlidingStackedWidget)
  std::unique_ptr<SlidingStackedWidgetPrivate> const d_ptr;

 public:
  //! This enumeration is used to define the animation direction.
  enum Direction {
    LeftToRight,
    RightToLeft,
    TopToBottom,
    BottomToTop,
    Automatic
  };

  explicit SlidingStackedWidget(QWidget* parent = nullptr);

  ~SlidingStackedWidget() override;

 signals:
  void animationFinished();

 public slots:
  void setSpeed(const int speed);
  void setAnimation(const QEasingCurve::Type animationType);
  void setVerticalMode(const bool vertical);
  void setWrap(const bool wrap);

  void slideInNext();
  void slideInPrev();
  void slideInIndex(const int index, const Direction direction = Automatic);

 private slots:
  void animationDone();

 private:
  void slideInWidget(QWidget* widget, const Direction direction);
  void stopAnimation();
};

} // namespace Kryvo

#endif // KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_<commit_msg>Remove const in method definition for integral types<commit_after>#ifndef KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_
#define KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_

#include "utility/pimpl.h"
#include <QStackedWidget>
#include <QWidget>
#include <QEasingCurve>
#include <memory>

namespace Kryvo {

class SlidingStackedWidgetPrivate;

/*!
 * SlidingStackedWidget is a class that is derived from QStackedWidget
 * and allows smooth side shifting of widgets, in addition
 * to the original hard switching from one to another as offered by
 * QStackedWidget.
*/
class SlidingStackedWidget : public QStackedWidget {
  Q_OBJECT
  DECLARE_PRIVATE(SlidingStackedWidget)
  std::unique_ptr<SlidingStackedWidgetPrivate> const d_ptr;

 public:
  //! This enumeration is used to define the animation direction.
  enum Direction {
    LeftToRight,
    RightToLeft,
    TopToBottom,
    BottomToTop,
    Automatic
  };

  explicit SlidingStackedWidget(QWidget* parent = nullptr);

  ~SlidingStackedWidget() override;

 signals:
  void animationFinished();

 public slots:
  void setSpeed(int speed);
  void setAnimation(QEasingCurve::Type animationType);
  void setVerticalMode(bool vertical);
  void setWrap(bool wrap);

  void slideInNext();
  void slideInPrev();
  void slideInIndex(int index, Direction direction = Automatic);

 private slots:
  void animationDone();

 private:
  void slideInWidget(QWidget* widget, Direction direction);
  void stopAnimation();
};

} // namespace Kryvo

#endif // KRYVO_GUI_SLIDINGSTACKEDWIDGET_HPP_
{'fraction_non_alphanumeric': 0.0765423952490927, 'fraction_numerical': 0.0, 'mean_word_length': 5.277432712215321, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1064887', 'n_tokens_mistral': 955, 'n_tokens_neox': 928, 'n_words': 261}