Coding conventions

Adjust the code style of the adjusted and created classes according to
the coding conventions.
This commit is contained in:
Michael Gregorius
2023-04-09 16:42:18 +02:00
parent 17295a4f86
commit b90156bedd
5 changed files with 53 additions and 54 deletions

View File

@@ -2,8 +2,8 @@
* TextFloat.h - class textFloat, a floating text-label
*
* Copyright (c) 2023 LMMS team
*
* This file is part of LMMS - https://lmms.io
*
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -20,7 +20,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
*/
#ifndef SIMPLE_TEXT_FLOAT_H
@@ -42,13 +42,13 @@ public:
SimpleTextFloat();
~SimpleTextFloat() override = default;
void setText( const QString & _text );
void setText(const QString & text);
void setVisibilityTimeOut( int _msecs );
void setVisibilityTimeOut(int msecs);
void moveGlobal( QWidget * _w, const QPoint & _offset )
void moveGlobal(QWidget * w, const QPoint & offset)
{
move( _w->mapToGlobal( QPoint( 0, 0 ) ) + _offset );
move(w->mapToGlobal(QPoint(0, 0)) + offset);
}
private:

View File

@@ -42,31 +42,30 @@ public:
TextFloat();
~TextFloat() override = default;
void setTitle( const QString & _title );
void setText( const QString & _text );
void setPixmap( const QPixmap & _pixmap );
void setTitle(const QString & title);
void setText(const QString & text);
void setPixmap(const QPixmap & pixmap);
void setVisibilityTimeOut( int _msecs );
void setVisibilityTimeOut(int msecs);
static TextFloat * displayMessage( const QString & _title,
const QString & _msg,
const QPixmap & _pixmap =
QPixmap(),
int _timeout = 2000,
QWidget * _parent = nullptr );
static TextFloat * displayMessage(const QString & title,
const QString & msg,
const QPixmap & pixmap = QPixmap(),
int timeout = 2000,
QWidget * parent = nullptr);
void moveGlobal( QWidget * _w, const QPoint & _offset )
void moveGlobal(QWidget * w, const QPoint & offset)
{
move( _w->mapToGlobal( QPoint( 0, 0 ) )+_offset );
move(w->mapToGlobal(QPoint(0, 0)) + offset);
}
protected:
void mousePressEvent( QMouseEvent * _me ) override;
void mousePressEvent(QMouseEvent * me) override;
private:
TextFloat(const QString & _title, const QString & _text, const QPixmap & _pixmap);
TextFloat(const QString & title, const QString & text, const QPixmap & pixmap);
QLabel * m_pixmapLabel;
QLabel * m_titleLabel;