Formatting
This commit is contained in:
parent
141957e4b5
commit
427b9c1ebc
|
@ -384,7 +384,7 @@ void FancyTabWidget::addSpacer() {
|
|||
|
||||
}
|
||||
|
||||
void FancyTabWidget::setBackgroundPixmap(const QPixmap& pixmap) {
|
||||
void FancyTabWidget::setBackgroundPixmap(const QPixmap &pixmap) {
|
||||
|
||||
background_pixmap_ = pixmap;
|
||||
update();
|
||||
|
@ -695,9 +695,9 @@ void FancyTabWidget::SetMode(FancyTabWidget::Mode mode) {
|
|||
|
||||
}
|
||||
|
||||
void FancyTabWidget::addMenuItem(QActionGroup* group, const QString& text, Mode mode) {
|
||||
void FancyTabWidget::addMenuItem(QActionGroup *group, const QString &text, Mode mode) {
|
||||
|
||||
QAction* action = group->addAction(text);
|
||||
QAction *action = group->addAction(text);
|
||||
action->setCheckable(true);
|
||||
QObject::connect(action, &QAction::triggered, [this, mode]() { SetMode(mode); } );
|
||||
|
||||
|
@ -705,11 +705,11 @@ void FancyTabWidget::addMenuItem(QActionGroup* group, const QString& text, Mode
|
|||
|
||||
}
|
||||
|
||||
void FancyTabWidget::contextMenuEvent(QContextMenuEvent* e) {
|
||||
void FancyTabWidget::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
if (!menu_) {
|
||||
menu_ = new QMenu(this);
|
||||
QActionGroup* group = new QActionGroup(this);
|
||||
QActionGroup *group = new QActionGroup(this);
|
||||
addMenuItem(group, tr("Large sidebar"), Mode_LargeSidebar);
|
||||
addMenuItem(group, tr("Small sidebar"), Mode_SmallSidebar);
|
||||
addMenuItem(group, tr("Plain sidebar"), Mode_PlainSidebar);
|
||||
|
|
|
@ -54,10 +54,10 @@ class FancyTabWidget : public QTabWidget {
|
|||
bool EnableTab(QWidget *widget_view);
|
||||
bool DisableTab(QWidget *widget_view);
|
||||
int insertTab(const int idx, QWidget *page, const QIcon &icon, const QString &label);
|
||||
void addBottomWidget(QWidget* widget_view);
|
||||
void addBottomWidget(QWidget *widget_view);
|
||||
int IndexOfTab(QWidget *widget);
|
||||
|
||||
void setBackgroundPixmap(const QPixmap& pixmap);
|
||||
void setBackgroundPixmap(const QPixmap &pixmap);
|
||||
void addSpacer();
|
||||
|
||||
void Load(const QString &kSettingsGroup);
|
||||
|
@ -98,10 +98,10 @@ class FancyTabWidget : public QTabWidget {
|
|||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent*) override;
|
||||
void contextMenuEvent(QContextMenuEvent* e) override;
|
||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||
|
||||
private:
|
||||
void addMenuItem(QActionGroup* group, const QString& text, Mode mode);
|
||||
void addMenuItem(QActionGroup *group, const QString &text, Mode mode);
|
||||
|
||||
QProxyStyle *style_;
|
||||
QPixmap background_pixmap_;
|
||||
|
|
Loading…
Reference in New Issue