Formatting
This commit is contained in:
@@ -171,4 +171,3 @@ void BoomAnalyzer::analyze(QPainter& p, const Scope& scope, bool new_frame) {
|
|||||||
p.drawPixmap(0, 0, canvas_);
|
p.drawPixmap(0, 0, canvas_);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1458,4 +1458,3 @@ void CollectionBackend::UpdateSongRatingAsync(const int id, const float rating)
|
|||||||
void CollectionBackend::UpdateSongsRatingAsync(const QList<int>& ids, const float rating) {
|
void CollectionBackend::UpdateSongsRatingAsync(const QList<int>& ids, const float rating) {
|
||||||
metaObject()->invokeMethod(this, "UpdateSongsRating", Qt::QueuedConnection, Q_ARG(QList<int>, ids), Q_ARG(float, rating));
|
metaObject()->invokeMethod(this, "UpdateSongsRating", Qt::QueuedConnection, Q_ARG(QList<int>, ids), Q_ARG(float, rating));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,4 +164,3 @@ bool CollectionItemDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *vie
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,4 +130,3 @@ void GroupByDialog::CollectionGroupingChanged(const CollectionModel::Grouping &g
|
|||||||
ui_->combobox_second->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[1])->combo_box_index);
|
ui_->combobox_second->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[1])->combo_box_index);
|
||||||
ui_->combobox_third->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[2])->combo_box_index);
|
ui_->combobox_third->setCurrentIndex(p_->mapping_.get<tag_group_by>().find(g[2])->combo_box_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,4 +209,3 @@ void SavedGroupingManager::UpdateButtonState() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,5 +49,4 @@ class SqlRow {
|
|||||||
|
|
||||||
typedef QList<SqlRow> SqlRowList;
|
typedef QList<SqlRow> SqlRowList;
|
||||||
|
|
||||||
#endif
|
#endif // SQLROW_H
|
||||||
|
|
||||||
|
|||||||
@@ -135,4 +135,3 @@ class ContextAlbumsView : public AutoExpandingTreeView {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // CONTEXTALBUMSVIEW_H
|
#endif // CONTEXTALBUMSVIEW_H
|
||||||
|
|
||||||
|
|||||||
@@ -91,4 +91,3 @@ void Appearance::ChangeBackgroundColor(const QColor &color) {
|
|||||||
background_color_ = color;
|
background_color_ = color;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,3 @@ class Appearance : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // APPEARANCE_H
|
#endif // APPEARANCE_H
|
||||||
|
|
||||||
|
|||||||
@@ -398,4 +398,3 @@ QDataStream& operator>>(QDataStream &s, CommandlineOptions &a) {
|
|||||||
return s;
|
return s;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,4 +123,3 @@ void DeleteFiles::ProcessSomeFiles() {
|
|||||||
QTimer::singleShot(0, this, &DeleteFiles::ProcessSomeFiles);
|
QTimer::singleShot(0, this, &DeleteFiles::ProcessSomeFiles);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,3 @@ class FileSystemWatcherInterface : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -61,5 +61,4 @@ class MacFSListener : public FileSystemWatcherInterface {
|
|||||||
QTimer *update_timer_;
|
QTimer *update_timer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // MACFSLISTENER_H
|
||||||
|
|
||||||
|
|||||||
@@ -393,4 +393,3 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|
||||||
|
|||||||
@@ -114,4 +114,3 @@ class MergedProxyModel : public QAbstractProxyModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // MERGEDPROXYMODEL_H
|
#endif // MERGEDPROXYMODEL_H
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
void RegisterMetaTypes();
|
void RegisterMetaTypes();
|
||||||
|
|
||||||
#endif
|
#endif // METATYPES_H
|
||||||
|
|||||||
@@ -75,4 +75,3 @@ class MimeData : public QMimeData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // MIMEDATA_H
|
#endif // MIMEDATA_H
|
||||||
|
|
||||||
|
|||||||
@@ -243,4 +243,4 @@ class Mpris2 : public QObject {
|
|||||||
} // namespace mpris
|
} // namespace mpris
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif // MPRIS2_H
|
||||||
|
|||||||
@@ -61,4 +61,4 @@ inline QString AsMPRISDateTimeType(const int time) {
|
|||||||
|
|
||||||
} // namespace mpris
|
} // namespace mpris
|
||||||
|
|
||||||
#endif // MPRIS_COMMON_H
|
#endif // MPRIS_COMMON_H
|
||||||
|
|||||||
@@ -106,4 +106,3 @@ int MultiSortFilterProxy::Compare(const QVariant &left, const QVariant &right) c
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,4 +142,3 @@ QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &q
|
|||||||
return QList<QNetworkProxy>() << ret;
|
return QList<QNetworkProxy>() << ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,4 +46,3 @@ void ScopedTransaction::Commit() {
|
|||||||
db_->commit();
|
db_->commit();
|
||||||
pending_ = false;
|
pending_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,4 +53,3 @@ void DefaultSettingsProvider::setArrayIndex(int i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DefaultSettingsProvider::endArray() { backend_.endArray(); }
|
void DefaultSettingsProvider::endArray() { backend_.endArray(); }
|
||||||
|
|
||||||
|
|||||||
@@ -50,4 +50,3 @@ gulong CheckedGConnect(gpointer source, const char *signal, GCallback callback,
|
|||||||
return g_signal_connect(source, signal, G_CALLBACK(callback), data);
|
return g_signal_connect(source, signal, G_CALLBACK(callback), data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,4 +176,3 @@ QImage TagReaderClient::LoadEmbeddedArtBlocking(const QString &filename) {
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,4 +140,3 @@ int TaskManager::GetTaskProgress(int id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class QObject;
|
|||||||
// Improve QThread by adding a SetIoPriority function
|
// Improve QThread by adding a SetIoPriority function
|
||||||
class Thread : public QThread {
|
class Thread : public QThread {
|
||||||
public:
|
public:
|
||||||
explicit Thread(QObject* parent = nullptr) : QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
explicit Thread(QObject *parent = nullptr) : QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
||||||
|
|
||||||
void SetIoPriority(Utilities::IoPriority priority) {
|
void SetIoPriority(Utilities::IoPriority priority) {
|
||||||
io_priority_ = priority;
|
io_priority_ = priority;
|
||||||
|
|||||||
@@ -100,4 +100,3 @@ void AlbumCoverExport::ForceSizeToggled(int state) {
|
|||||||
ui_->width->setEnabled(state == Qt::Checked);
|
ui_->width->setEnabled(state == Qt::Checked);
|
||||||
ui_->height->setEnabled(state == Qt::Checked);
|
ui_->height->setEnabled(state == Qt::Checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,4 +154,3 @@ void AlbumCoverFetcher::SingleCoverFetched(const quint64 request_id, const QUrl
|
|||||||
emit AlbumCoverFetched(request_id, cover_url, image, search->statistics());
|
emit AlbumCoverFetched(request_id, cover_url, image, search->statistics());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,4 +144,3 @@ class AlbumCoverLoader : public QObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERLOADER_H
|
#endif // ALBUMCOVERLOADER_H
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class AlbumCoverManagerList : public QListWidget {
|
|||||||
void dropEvent(QDropEvent *event) override;
|
void dropEvent(QDropEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AlbumCoverManager* manager_;
|
AlbumCoverManager *manager_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERMANAGERLIST_H
|
#endif // ALBUMCOVERMANAGERLIST_H
|
||||||
|
|||||||
@@ -285,4 +285,3 @@ void AlbumCoverSearcher::keyPressEvent(QKeyEvent *e) {
|
|||||||
void AlbumCoverSearcher::CoverDoubleClicked(const QModelIndex &idx) {
|
void AlbumCoverSearcher::CoverDoubleClicked(const QModelIndex &idx) {
|
||||||
if (idx.isValid()) accept();
|
if (idx.isValid()) accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,4 +199,3 @@ void CoverExportRunnable::ExportCover() {
|
|||||||
void CoverExportRunnable::EmitCoverExported() { emit CoverExported(); }
|
void CoverExportRunnable::EmitCoverExported() { emit CoverExported(); }
|
||||||
|
|
||||||
void CoverExportRunnable::EmitCoverSkipped() { emit CoverSkipped(); }
|
void CoverExportRunnable::EmitCoverSkipped() { emit CoverSkipped(); }
|
||||||
|
|
||||||
|
|||||||
@@ -101,4 +101,3 @@ void CoverFromURLDialog::LoadCoverFromURLFinished() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,4 +64,3 @@ QString CoverSearchStatistics::AverageDimensions() const {
|
|||||||
return QString::number(chosen_width_ / chosen_images_) + "x" + QString::number(chosen_height_ / chosen_images_);
|
return QString::number(chosen_width_ / chosen_images_) + "x" + QString::number(chosen_height_ / chosen_images_);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -447,11 +447,11 @@ SongList OrganizeDialog::LoadSongsBlocking(const QStringList &filenames) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OrganizeDialog::SetCopy(const bool copy) {
|
void OrganizeDialog::SetCopy(const bool copy) {
|
||||||
ui_->aftercopying->setCurrentIndex(copy ? 0 : 1);
|
ui_->aftercopying->setCurrentIndex(copy ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OrganizeDialog::SetPlaylist(const QString &playlist) {
|
void OrganizeDialog::SetPlaylist(const QString &playlist) {
|
||||||
playlist_ = playlist;
|
playlist_ = playlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OrganizeDialog::InsertTag(const QString &tag) {
|
void OrganizeDialog::InsertTag(const QString &tag) {
|
||||||
|
|||||||
@@ -477,4 +477,3 @@ void PlaylistBackend::SetPlaylistUiPath(int id, const QString &path) {
|
|||||||
transaction.Commit();
|
transaction.Commit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -177,4 +177,3 @@ void PlaylistHeader::ResetColumns() {
|
|||||||
void PlaylistHeader::ToggleRatingEditStatus() {
|
void PlaylistHeader::ToggleRatingEditStatus() {
|
||||||
emit SectionRatingLockStatusChanged(action_rating_lock_->isChecked());
|
emit SectionRatingLockStatusChanged(action_rating_lock_->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -154,4 +154,3 @@ bool PlaylistItem::HasCurrentForegroundColor() const {
|
|||||||
}
|
}
|
||||||
void PlaylistItem::SetShouldSkip(bool val) { should_skip_ = val; }
|
void PlaylistItem::SetShouldSkip(bool val) { should_skip_ = val; }
|
||||||
bool PlaylistItem::GetShouldSkip() const { return should_skip_; }
|
bool PlaylistItem::GetShouldSkip() const { return should_skip_; }
|
||||||
|
|
||||||
|
|||||||
@@ -641,4 +641,3 @@ void PlaylistManager::RateCurrentSong(const double rating) {
|
|||||||
void PlaylistManager::RateCurrentSong(const int rating) {
|
void PlaylistManager::RateCurrentSong(const int rating) {
|
||||||
RateCurrentSong(rating / 5.0);
|
RateCurrentSong(rating / 5.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,4 +59,3 @@ void PlaylistSaveOptionsDialog::accept() {
|
|||||||
Playlist::Path PlaylistSaveOptionsDialog::path_type() const {
|
Playlist::Path PlaylistSaveOptionsDialog::path_type() const {
|
||||||
return static_cast<Playlist::Path>(ui->filePaths->itemData(ui->filePaths->currentIndex()).toInt());
|
return static_cast<Playlist::Path>(ui->filePaths->itemData(ui->filePaths->currentIndex()).toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,7 @@ SongLoaderInserter::SongLoaderInserter(TaskManager *task_manager, CollectionBack
|
|||||||
enqueue_(false),
|
enqueue_(false),
|
||||||
enqueue_next_(false),
|
enqueue_next_(false),
|
||||||
collection_(collection),
|
collection_(collection),
|
||||||
player_(player) {
|
player_(player) {}
|
||||||
}
|
|
||||||
|
|
||||||
SongLoaderInserter::~SongLoaderInserter() { qDeleteAll(pending_); }
|
SongLoaderInserter::~SongLoaderInserter() { qDeleteAll(pending_); }
|
||||||
|
|
||||||
@@ -214,4 +213,3 @@ void SongLoaderInserter::AsyncLoad() {
|
|||||||
deleteLater();
|
deleteLater();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1343,4 +1343,3 @@ void QobuzRequest::Warn(const QString &error, const QVariant &debug) {
|
|||||||
if (debug.isValid()) qLog(Debug) << debug;
|
if (debug.isValid()) qLog(Debug) << debug;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -246,4 +246,3 @@ void QobuzStreamURLRequest::Error(const QString &error, const QVariant &debug) {
|
|||||||
if (debug.isValid()) qLog(Debug) << debug;
|
if (debug.isValid()) qLog(Debug) << debug;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -192,4 +192,3 @@ void QueueView::PlaylistDestroyed() {
|
|||||||
current_playlist_ = nullptr;
|
current_playlist_ = nullptr;
|
||||||
// We'll get another CurrentPlaylistChanged() soon
|
// We'll get another CurrentPlaylistChanged() soon
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ void MoodbarSettingsPage::InitMoodbarPreviews() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QByteArray file_data = file.readAll();
|
QByteArray file_data = file.readAll();
|
||||||
|
file.close();
|
||||||
|
|
||||||
// Render and set each preview
|
// Render and set each preview
|
||||||
for (int i = 0; i < MoodbarRenderer::StyleCount; ++i) {
|
for (int i = 0; i < MoodbarRenderer::StyleCount; ++i) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SettingsDialog;
|
|||||||
|
|
||||||
const char *PlaylistSettingsPage::kSettingsGroup = "Playlist";
|
const char *PlaylistSettingsPage::kSettingsGroup = "Playlist";
|
||||||
|
|
||||||
PlaylistSettingsPage::PlaylistSettingsPage(SettingsDialog* dialog) : SettingsPage(dialog), ui_(new Ui_PlaylistSettingsPage) {
|
PlaylistSettingsPage::PlaylistSettingsPage(SettingsDialog *dialog) : SettingsPage(dialog), ui_(new Ui_PlaylistSettingsPage) {
|
||||||
|
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
setWindowIcon(IconLoader::Load("document-new"));
|
setWindowIcon(IconLoader::Load("document-new"));
|
||||||
@@ -101,8 +101,6 @@ void PlaylistSettingsPage::Load() {
|
|||||||
|
|
||||||
void PlaylistSettingsPage::Save() {
|
void PlaylistSettingsPage::Save() {
|
||||||
|
|
||||||
QSettings s;
|
|
||||||
|
|
||||||
Playlist::Path path = Playlist::Path_Automatic;
|
Playlist::Path path = Playlist::Path_Automatic;
|
||||||
if (ui_->radiobutton_automaticpath->isChecked()) {
|
if (ui_->radiobutton_automaticpath->isChecked()) {
|
||||||
path = Playlist::Path_Automatic;
|
path = Playlist::Path_Automatic;
|
||||||
@@ -117,6 +115,7 @@ void PlaylistSettingsPage::Save() {
|
|||||||
path = Playlist::Path_Ask_User;
|
path = Playlist::Path_Ask_User;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSettings s;
|
||||||
s.beginGroup(kSettingsGroup);
|
s.beginGroup(kSettingsGroup);
|
||||||
s.setValue("glow_effect", ui_->checkbox_glowcurrenttrack->isChecked());
|
s.setValue("glow_effect", ui_->checkbox_glowcurrenttrack->isChecked());
|
||||||
s.setValue("warn_close_playlist", ui_->checkbox_warncloseplaylist->isChecked());
|
s.setValue("warn_close_playlist", ui_->checkbox_warncloseplaylist->isChecked());
|
||||||
|
|||||||
@@ -277,5 +277,3 @@ void ScrobblerSettingsPage::ListenBrainz_AuthenticationComplete(const bool succe
|
|||||||
void ScrobblerSettingsPage::ListenBrainz_RefreshControls(bool authenticated) {
|
void ScrobblerSettingsPage::ListenBrainz_RefreshControls(bool authenticated) {
|
||||||
ui_->widget_listenbrainz_login_state->SetLoggedIn(authenticated ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut);
|
ui_->widget_listenbrainz_login_state->SetLoggedIn(authenticated ? LoginStateWidget::LoggedIn : LoginStateWidget::LoggedOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -370,4 +370,3 @@ void SettingsDialog::CurrentItemChanged(QTreeWidgetItem *item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,4 +146,3 @@ void SettingsPage::ComboBoxLoadFromSettings(const QSettings &s, QComboBox *combo
|
|||||||
combobox->setCurrentIndex(i);
|
combobox->setCurrentIndex(i);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,4 +71,3 @@ UrlHandler::LoadResult SubsonicUrlHandler::StartLoading(const QUrl &url) {
|
|||||||
return LoadResult(url, LoadResult::TrackAvailable, stream_url);
|
return LoadResult(url, LoadResult::TrackAvailable, stream_url);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -458,4 +458,3 @@ QString TranscodeDialog::GetOutputFileName(const QString &input, const Transcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
// TODO: Add more options than only bitrate as soon as gst doesn't crash anymore while using the cbr parmameter (like cbr=false)
|
// TODO: Add more options than only bitrate as soon as gst doesn't crash anymore while using the cbr parmameter (like cbr=false)
|
||||||
|
|
||||||
const char* TranscoderOptionsOpus::kSettingsGroup = "Transcoder/opusenc";
|
const char *TranscoderOptionsOpus::kSettingsGroup = "Transcoder/opusenc";
|
||||||
|
|
||||||
TranscoderOptionsOpus::TranscoderOptionsOpus(QWidget *parent) : TranscoderOptionsInterface(parent), ui_(new Ui_TranscoderOptionsOpus) {
|
TranscoderOptionsOpus::TranscoderOptionsOpus(QWidget *parent) : TranscoderOptionsInterface(parent), ui_(new Ui_TranscoderOptionsOpus) {
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ class TranscoderOptionsOpus : public TranscoderOptionsInterface {
|
|||||||
void Save() override;
|
void Save() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const char* kSettingsGroup;
|
static const char *kSettingsGroup;
|
||||||
|
|
||||||
Ui_TranscoderOptionsOpus* ui_;
|
Ui_TranscoderOptionsOpus *ui_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TRANSCODEROPTIONSOPUS_H
|
#endif // TRANSCODEROPTIONSOPUS_H
|
||||||
|
|||||||
@@ -192,4 +192,3 @@ void AutoExpandingTreeView::DownAndFocus() {
|
|||||||
setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
|
setCurrentIndex(moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier));
|
||||||
setFocus();
|
setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,4 +84,3 @@ void BusyIndicator::set_text(const QString &text) {
|
|||||||
QString BusyIndicator::text() const {
|
QString BusyIndicator::text() const {
|
||||||
return label_->text();
|
return label_->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class MultiLoadingIndicator : public QWidget {
|
|||||||
static const int kHorizontalPadding;
|
static const int kHorizontalPadding;
|
||||||
static const int kSpacing;
|
static const int kSpacing;
|
||||||
|
|
||||||
void SetTaskManager(TaskManager* task_manager);
|
void SetTaskManager(TaskManager *task_manager);
|
||||||
|
|
||||||
QSize sizeHint() const override;
|
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()
|
//we don't call the default event since it will trigger editingFished()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class RenameTabLineEdit : public QLineEdit {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit RenameTabLineEdit(QWidget* parent = nullptr);
|
explicit RenameTabLineEdit(QWidget *parent = nullptr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void EditingCanceled();
|
void EditingCanceled();
|
||||||
@@ -43,8 +43,8 @@ class RenameTabLineEdit : public QLineEdit {
|
|||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void focusOutEvent(QFocusEvent* e) override;
|
void focusOutEvent(QFocusEvent *e) override;
|
||||||
void keyPressEvent(QKeyEvent* e) override;
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RENAMETABLINEEDIT_H
|
#endif // RENAMETABLINEEDIT_H
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class StickySlider : public QSlider {
|
|||||||
Q_PROPERTY(int sticky_threshold READ sticky_threshold WRITE set_sticky_threshold)
|
Q_PROPERTY(int sticky_threshold READ sticky_threshold WRITE set_sticky_threshold)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StickySlider(QWidget* parent = nullptr);
|
explicit StickySlider(QWidget *parent = nullptr);
|
||||||
|
|
||||||
int sticky_center() const { return sticky_center_; }
|
int sticky_center() const { return sticky_center_; }
|
||||||
int sticky_threshold() const { return sticky_threshold_; }
|
int sticky_threshold() const { return sticky_threshold_; }
|
||||||
@@ -44,7 +44,7 @@ class StickySlider : public QSlider {
|
|||||||
void set_sticky_threshold(int threshold) { sticky_threshold_ = threshold; }
|
void set_sticky_threshold(int threshold) { sticky_threshold_ = threshold; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseMoveEvent(QMouseEvent* e) override;
|
void mouseMoveEvent(QMouseEvent *e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int sticky_center_;
|
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;
|
if (!stretch_enabled_) return;
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class StretchHeaderView : public QHeaderView {
|
|||||||
protected:
|
protected:
|
||||||
// QWidget
|
// QWidget
|
||||||
void mouseMoveEvent(QMouseEvent *e) override;
|
void mouseMoveEvent(QMouseEvent *e) override;
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Scales column_widths_ values so the total is 1.0.
|
// Scales column_widths_ values so the total is 1.0.
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class TrackSlider : public QWidget {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TrackSlider(QWidget* parent = nullptr);
|
explicit TrackSlider(QWidget *parent = nullptr);
|
||||||
~TrackSlider() override;
|
~TrackSlider() override;
|
||||||
|
|
||||||
void SetApplication(Application* app);
|
void SetApplication(Application* app);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const int TrackSliderPopup::kPointWidth = 4;
|
|||||||
const int TrackSliderPopup::kBorderRadius = 4;
|
const int TrackSliderPopup::kBorderRadius = 4;
|
||||||
const qreal TrackSliderPopup::kBlurRadius = 20.0;
|
const qreal TrackSliderPopup::kBlurRadius = 20.0;
|
||||||
|
|
||||||
TrackSliderPopup::TrackSliderPopup(QWidget* parent)
|
TrackSliderPopup::TrackSliderPopup(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
font_metrics_(fontMetrics()),
|
font_metrics_(fontMetrics()),
|
||||||
small_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;
|
text_ = text;
|
||||||
UpdatePixmap();
|
UpdatePixmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackSliderPopup::SetSmallText(const QString& text) {
|
void TrackSliderPopup::SetSmallText(const QString &text) {
|
||||||
small_text_ = text;
|
small_text_ = text;
|
||||||
UpdatePixmap();
|
UpdatePixmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackSliderPopup::SetPopupPosition(const QPoint& pos) {
|
void TrackSliderPopup::SetPopupPosition(const QPoint &pos) {
|
||||||
pos_ = pos;
|
pos_ = pos;
|
||||||
UpdatePosition();
|
UpdatePosition();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ class QPaintEvent;
|
|||||||
class TrackSliderPopup : public QWidget {
|
class TrackSliderPopup : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TrackSliderPopup(QWidget *parent);
|
explicit TrackSliderPopup(QWidget *parent);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void SetText(const QString& text);
|
void SetText(const QString &text);
|
||||||
void SetSmallText(const QString& small_text);
|
void SetSmallText(const QString &small_text);
|
||||||
void SetPopupPosition(const QPoint& pos);
|
void SetPopupPosition(const QPoint &pos);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent*) override;
|
void paintEvent(QPaintEvent*) override;
|
||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
|
|
||||||
void UpdatePixmap();
|
void UpdatePixmap();
|
||||||
void UpdatePosition();
|
void UpdatePosition();
|
||||||
void SendMouseEventToParent(QMouseEvent* e);
|
void SendMouseEventToParent(QMouseEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString text_;
|
QString text_;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class TrackSliderSlider : public QSlider {
|
|||||||
void enterEvent(QEvent *e) override;
|
void enterEvent(QEvent *e) override;
|
||||||
#endif
|
#endif
|
||||||
void leaveEvent(QEvent *e) override;
|
void leaveEvent(QEvent *e) override;
|
||||||
void keyPressEvent(QKeyEvent* event) override;
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void UpdateDeltaTime();
|
void UpdateDeltaTime();
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ SliderSlider::SliderSlider(Qt::Orientation orientation, QWidget* parent, uint ma
|
|||||||
setRange(0, max);
|
setRange(0, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SliderSlider::wheelEvent(QWheelEvent* e) {
|
void SliderSlider::wheelEvent(QWheelEvent *e) {
|
||||||
|
|
||||||
if (orientation() == Qt::Vertical) {
|
if (orientation() == Qt::Vertical) {
|
||||||
// Will be handled by the parent widget
|
// 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;
|
QStyleOptionSlider option;
|
||||||
initStyleOption(&option);
|
initStyleOption(&option);
|
||||||
@@ -118,7 +118,7 @@ void SliderSlider::slideEvent(QMouseEvent* e) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SliderSlider::mousePressEvent(QMouseEvent* e) {
|
void SliderSlider::mousePressEvent(QMouseEvent *e) {
|
||||||
|
|
||||||
QStyleOptionSlider option;
|
QStyleOptionSlider option;
|
||||||
initStyleOption(&option);
|
initStyleOption(&option);
|
||||||
@@ -157,20 +157,20 @@ void SliderSlider::setValue(int newValue) {
|
|||||||
#define THICKNESS 7
|
#define THICKNESS 7
|
||||||
#define MARGIN 3
|
#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) {
|
: SliderSlider(orientation, parent, max), m_mode(mode) {
|
||||||
if (m_mode == Pretty) {
|
if (m_mode == Pretty) {
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrettySlider::mousePressEvent(QMouseEvent* e) {
|
void PrettySlider::mousePressEvent(QMouseEvent *e) {
|
||||||
SliderSlider::mousePressEvent(e);
|
SliderSlider::mousePressEvent(e);
|
||||||
|
|
||||||
slideEvent(e);
|
slideEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrettySlider::slideEvent(QMouseEvent* e) {
|
void PrettySlider::slideEvent(QMouseEvent *e) {
|
||||||
if (m_mode == Pretty)
|
if (m_mode == Pretty)
|
||||||
QSlider::setValue(
|
QSlider::setValue(
|
||||||
orientation() == Qt::Horizontal
|
orientation() == Qt::Horizontal
|
||||||
@@ -207,7 +207,7 @@ QSize PrettySlider::sizeHint() const {
|
|||||||
/// CLASS VolumeSlider
|
/// CLASS VolumeSlider
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
VolumeSlider::VolumeSlider(QWidget* parent, uint max)
|
VolumeSlider::VolumeSlider(QWidget *parent, uint max)
|
||||||
: SliderSlider(Qt::Horizontal, parent, max),
|
: SliderSlider(Qt::Horizontal, parent, max),
|
||||||
m_animCount(0),
|
m_animCount(0),
|
||||||
m_animTimer(new QTimer(this)),
|
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) {
|
if (e->button() != Qt::RightButton) {
|
||||||
SliderSlider::mousePressEvent(e);
|
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;
|
QMap<QAction*, int> values;
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
@@ -289,7 +289,7 @@ void VolumeSlider::contextMenuEvent(QContextMenuEvent* e) {
|
|||||||
values[menu.addAction("20%")] = 20;
|
values[menu.addAction("20%")] = 20;
|
||||||
values[menu.addAction("0%")] = 0;
|
values[menu.addAction("0%")] = 0;
|
||||||
|
|
||||||
QAction* ret = menu.exec(mapToGlobal(e->pos()));
|
QAction *ret = menu.exec(mapToGlobal(e->pos()));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
QSlider::setValue(values[ret]);
|
QSlider::setValue(values[ret]);
|
||||||
emit sliderReleased(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));
|
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);
|
const uint step = e->angleDelta().y() / (e->angleDelta().x() == 0 ? 30 : -30);
|
||||||
QSlider::setValue(QSlider::value() + step);
|
QSlider::setValue(QSlider::value() + step);
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class VolumeSlider : public SliderSlider {
|
|||||||
void drawVolumeSliderHandle();
|
void drawVolumeSliderHandle();
|
||||||
|
|
||||||
VolumeSlider(const VolumeSlider&); // undefined
|
VolumeSlider(const VolumeSlider&); // undefined
|
||||||
VolumeSlider& operator=(const VolumeSlider&); // undefined
|
VolumeSlider &operator=(const VolumeSlider&); // undefined
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
static const int ANIM_INTERVAL = 18;
|
static const int ANIM_INTERVAL = 18;
|
||||||
@@ -138,7 +138,7 @@ class VolumeSlider : public SliderSlider {
|
|||||||
|
|
||||||
bool m_animEnter;
|
bool m_animEnter;
|
||||||
int m_animCount;
|
int m_animCount;
|
||||||
QTimer* m_animTimer;
|
QTimer *m_animTimer;
|
||||||
|
|
||||||
QPixmap m_pixmapInset;
|
QPixmap m_pixmapInset;
|
||||||
QPixmap m_pixmapGradient;
|
QPixmap m_pixmapGradient;
|
||||||
|
|||||||
Reference in New Issue
Block a user