Formatting
This commit is contained in:
@@ -192,4 +192,3 @@ void AutoExpandingTreeView::DownAndFocus() {
|
||||
setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
|
||||
setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,4 +84,3 @@ void BusyIndicator::set_text(const QString &text) {
|
||||
QString BusyIndicator::text() const {
|
||||
return label_->text();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class MultiLoadingIndicator : public QWidget {
|
||||
static const int kHorizontalPadding;
|
||||
static const int kSpacing;
|
||||
|
||||
void SetTaskManager(TaskManager* task_manager);
|
||||
void SetTaskManager(TaskManager *task_manager);
|
||||
|
||||
QSize sizeHint() const override;
|
||||
|
||||
|
||||
@@ -52,4 +52,3 @@ void RenameTabLineEdit::focusOutEvent(QFocusEvent *e) {
|
||||
//we don't call the default event since it will trigger editingFished()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class RenameTabLineEdit : public QLineEdit {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RenameTabLineEdit(QWidget* parent = nullptr);
|
||||
explicit RenameTabLineEdit(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void EditingCanceled();
|
||||
@@ -43,8 +43,8 @@ class RenameTabLineEdit : public QLineEdit {
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
void focusOutEvent(QFocusEvent* e) override;
|
||||
void keyPressEvent(QKeyEvent* e) override;
|
||||
void focusOutEvent(QFocusEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent *e) override;
|
||||
};
|
||||
|
||||
#endif // RENAMETABLINEEDIT_H
|
||||
|
||||
@@ -36,7 +36,7 @@ class StickySlider : public QSlider {
|
||||
Q_PROPERTY(int sticky_threshold READ sticky_threshold WRITE set_sticky_threshold)
|
||||
|
||||
public:
|
||||
explicit StickySlider(QWidget* parent = nullptr);
|
||||
explicit StickySlider(QWidget *parent = nullptr);
|
||||
|
||||
int sticky_center() const { return sticky_center_; }
|
||||
int sticky_threshold() const { return sticky_threshold_; }
|
||||
@@ -44,7 +44,7 @@ class StickySlider : public QSlider {
|
||||
void set_sticky_threshold(int threshold) { sticky_threshold_ = threshold; }
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QMouseEvent* e) override;
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
|
||||
private:
|
||||
int sticky_center_;
|
||||
|
||||
@@ -168,9 +168,9 @@ void StretchHeaderView::SetSectionHidden(const int logical, const bool hidden) {
|
||||
|
||||
}
|
||||
|
||||
void StretchHeaderView::resizeEvent(QResizeEvent *event) {
|
||||
void StretchHeaderView::resizeEvent(QResizeEvent *e) {
|
||||
|
||||
QHeaderView::resizeEvent(event);
|
||||
QHeaderView::resizeEvent(e);
|
||||
|
||||
if (!stretch_enabled_) return;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class StretchHeaderView : public QHeaderView {
|
||||
protected:
|
||||
// QWidget
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
private:
|
||||
// Scales column_widths_ values so the total is 1.0.
|
||||
|
||||
@@ -41,7 +41,7 @@ class TrackSlider : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TrackSlider(QWidget* parent = nullptr);
|
||||
explicit TrackSlider(QWidget *parent = nullptr);
|
||||
~TrackSlider() override;
|
||||
|
||||
void SetApplication(Application* app);
|
||||
|
||||
@@ -45,7 +45,7 @@ const int TrackSliderPopup::kPointWidth = 4;
|
||||
const int TrackSliderPopup::kBorderRadius = 4;
|
||||
const qreal TrackSliderPopup::kBlurRadius = 20.0;
|
||||
|
||||
TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
||||
TrackSliderPopup::TrackSliderPopup(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
font_metrics_(fontMetrics()),
|
||||
small_font_metrics_(fontMetrics()) {
|
||||
@@ -61,17 +61,17 @@ TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
||||
|
||||
}
|
||||
|
||||
void TrackSliderPopup::SetText(const QString& text) {
|
||||
void TrackSliderPopup::SetText(const QString &text) {
|
||||
text_ = text;
|
||||
UpdatePixmap();
|
||||
}
|
||||
|
||||
void TrackSliderPopup::SetSmallText(const QString& text) {
|
||||
void TrackSliderPopup::SetSmallText(const QString &text) {
|
||||
small_text_ = text;
|
||||
UpdatePixmap();
|
||||
}
|
||||
|
||||
void TrackSliderPopup::SetPopupPosition(const QPoint& pos) {
|
||||
void TrackSliderPopup::SetPopupPosition(const QPoint &pos) {
|
||||
pos_ = pos;
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
@@ -38,13 +38,13 @@ class QPaintEvent;
|
||||
class TrackSliderPopup : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
public:
|
||||
explicit TrackSliderPopup(QWidget *parent);
|
||||
|
||||
public slots:
|
||||
void SetText(const QString& text);
|
||||
void SetSmallText(const QString& small_text);
|
||||
void SetPopupPosition(const QPoint& pos);
|
||||
void SetText(const QString &text);
|
||||
void SetSmallText(const QString &small_text);
|
||||
void SetPopupPosition(const QPoint &pos);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
void UpdatePixmap();
|
||||
void UpdatePosition();
|
||||
void SendMouseEventToParent(QMouseEvent* e);
|
||||
void SendMouseEventToParent(QMouseEvent *e);
|
||||
|
||||
private:
|
||||
QString text_;
|
||||
|
||||
@@ -62,7 +62,7 @@ class TrackSliderSlider : public QSlider {
|
||||
void enterEvent(QEvent *e) override;
|
||||
#endif
|
||||
void leaveEvent(QEvent *e) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void UpdateDeltaTime();
|
||||
|
||||
@@ -56,7 +56,7 @@ SliderSlider::SliderSlider(Qt::Orientation orientation, QWidget* parent, uint ma
|
||||
setRange(0, max);
|
||||
}
|
||||
|
||||
void SliderSlider::wheelEvent(QWheelEvent* e) {
|
||||
void SliderSlider::wheelEvent(QWheelEvent *e) {
|
||||
|
||||
if (orientation() == Qt::Vertical) {
|
||||
// Will be handled by the parent widget
|
||||
@@ -95,7 +95,7 @@ void SliderSlider::mouseMoveEvent(QMouseEvent *e) {
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::slideEvent(QMouseEvent* e) {
|
||||
void SliderSlider::slideEvent(QMouseEvent *e) {
|
||||
|
||||
QStyleOptionSlider option;
|
||||
initStyleOption(&option);
|
||||
@@ -118,7 +118,7 @@ void SliderSlider::slideEvent(QMouseEvent* e) {
|
||||
|
||||
}
|
||||
|
||||
void SliderSlider::mousePressEvent(QMouseEvent* e) {
|
||||
void SliderSlider::mousePressEvent(QMouseEvent *e) {
|
||||
|
||||
QStyleOptionSlider option;
|
||||
initStyleOption(&option);
|
||||
@@ -157,20 +157,20 @@ void SliderSlider::setValue(int newValue) {
|
||||
#define THICKNESS 7
|
||||
#define MARGIN 3
|
||||
|
||||
PrettySlider::PrettySlider(Qt::Orientation orientation, SliderMode mode, QWidget* parent, uint max)
|
||||
PrettySlider::PrettySlider(Qt::Orientation orientation, SliderMode mode, QWidget *parent, uint max)
|
||||
: SliderSlider(orientation, parent, max), m_mode(mode) {
|
||||
if (m_mode == Pretty) {
|
||||
setFocusPolicy(Qt::NoFocus);
|
||||
}
|
||||
}
|
||||
|
||||
void PrettySlider::mousePressEvent(QMouseEvent* e) {
|
||||
void PrettySlider::mousePressEvent(QMouseEvent *e) {
|
||||
SliderSlider::mousePressEvent(e);
|
||||
|
||||
slideEvent(e);
|
||||
}
|
||||
|
||||
void PrettySlider::slideEvent(QMouseEvent* e) {
|
||||
void PrettySlider::slideEvent(QMouseEvent *e) {
|
||||
if (m_mode == Pretty)
|
||||
QSlider::setValue(
|
||||
orientation() == Qt::Horizontal
|
||||
@@ -207,7 +207,7 @@ QSize PrettySlider::sizeHint() const {
|
||||
/// CLASS VolumeSlider
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
VolumeSlider::VolumeSlider(QWidget* parent, uint max)
|
||||
VolumeSlider::VolumeSlider(QWidget *parent, uint max)
|
||||
: SliderSlider(Qt::Horizontal, parent, max),
|
||||
m_animCount(0),
|
||||
m_animTimer(new QTimer(this)),
|
||||
@@ -268,7 +268,7 @@ void VolumeSlider::slotAnimTimer() {
|
||||
|
||||
}
|
||||
|
||||
void VolumeSlider::mousePressEvent(QMouseEvent* e) {
|
||||
void VolumeSlider::mousePressEvent(QMouseEvent *e) {
|
||||
|
||||
if (e->button() != Qt::RightButton) {
|
||||
SliderSlider::mousePressEvent(e);
|
||||
@@ -277,7 +277,7 @@ void VolumeSlider::mousePressEvent(QMouseEvent* e) {
|
||||
|
||||
}
|
||||
|
||||
void VolumeSlider::contextMenuEvent(QContextMenuEvent* e) {
|
||||
void VolumeSlider::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
QMap<QAction*, int> values;
|
||||
QMenu menu;
|
||||
@@ -289,7 +289,7 @@ void VolumeSlider::contextMenuEvent(QContextMenuEvent* e) {
|
||||
values[menu.addAction("20%")] = 20;
|
||||
values[menu.addAction("0%")] = 0;
|
||||
|
||||
QAction* ret = menu.exec(mapToGlobal(e->pos()));
|
||||
QAction *ret = menu.exec(mapToGlobal(e->pos()));
|
||||
if (ret) {
|
||||
QSlider::setValue(values[ret]);
|
||||
emit sliderReleased(values[ret]);
|
||||
@@ -297,11 +297,11 @@ void VolumeSlider::contextMenuEvent(QContextMenuEvent* e) {
|
||||
|
||||
}
|
||||
|
||||
void VolumeSlider::slideEvent(QMouseEvent* e) {
|
||||
void VolumeSlider::slideEvent(QMouseEvent *e) {
|
||||
QSlider::setValue(QStyle::sliderValueFromPosition(minimum(), maximum(), e->pos().x(), width() - 2));
|
||||
}
|
||||
|
||||
void VolumeSlider::wheelEvent(QWheelEvent* e) {
|
||||
void VolumeSlider::wheelEvent(QWheelEvent *e) {
|
||||
|
||||
const uint step = e->angleDelta().y() / (e->angleDelta().x() == 0 ? 30 : -30);
|
||||
QSlider::setValue(QSlider::value() + step);
|
||||
|
||||
@@ -130,7 +130,7 @@ class VolumeSlider : public SliderSlider {
|
||||
void drawVolumeSliderHandle();
|
||||
|
||||
VolumeSlider(const VolumeSlider&); // undefined
|
||||
VolumeSlider& operator=(const VolumeSlider&); // undefined
|
||||
VolumeSlider &operator=(const VolumeSlider&); // undefined
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
static const int ANIM_INTERVAL = 18;
|
||||
@@ -138,7 +138,7 @@ class VolumeSlider : public SliderSlider {
|
||||
|
||||
bool m_animEnter;
|
||||
int m_animCount;
|
||||
QTimer* m_animTimer;
|
||||
QTimer *m_animTimer;
|
||||
|
||||
QPixmap m_pixmapInset;
|
||||
QPixmap m_pixmapGradient;
|
||||
|
||||
Reference in New Issue
Block a user