1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00
transmission/gtk/MainWindow.h
Mike Gelfand b64b696272
Fix/suppress clang-tidy issues in recently-added code (GTK client) (#4485)
* Fix `readability-convert-member-functions-to-static` clang-tidy issues

* Fix `modernize-use-nodiscard` clang-tidy issues

* Fix `cppcoreguidelines-owning-memory` clang-tidy issues

* Fix `performance-unnecessary-value-param` clang-tidy issues

* Fix `cppcoreguidelines-pro-type-reinterpret-cast` clang-tidy issues

* Fix `bugprone-easily-swappable-parameters` clang-tidy issues

* Fix `readability-named-parameter` clang-tidy issues

* Fix `readability-inconsistent-declaration-parameter-name` clang-tidy issue

* Fix `readability-else-after-return` clang-tidy issues

* Fix `cppcoreguidelines-special-member-functions` clang-tidy issues

* Fix `cppcoreguidelines-pro-type-vararg` clang-tidy issues

* Fix `cppcoreguidelines-pro-type-static-cast-downcast` clang-tidy issues

* Fix `cppcoreguidelines-pro-bounds-pointer-arithmetic` clang-tidy issues
2022-12-28 14:47:53 +00:00

52 lines
1.4 KiB
C++

// This file Copyright © 2005-2022 Transmission authors and contributors.
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.
#pragma once
#include <libtransmission/tr-macros.h>
#include <giomm/actiongroup.h>
#include <glibmm/refptr.h>
#include <gtkmm/application.h>
#include <gtkmm/applicationwindow.h>
#include <gtkmm/builder.h>
#include <memory>
class Session;
class Torrent;
class MainWindow : public Gtk::ApplicationWindow
{
public:
MainWindow(
BaseObjectType* cast_item,
Glib::RefPtr<Gtk::Builder> const& builder,
Gtk::Application& app,
Glib::RefPtr<Gio::ActionGroup> const& actions,
Glib::RefPtr<Session> const& core);
~MainWindow() override;
TR_DISABLE_COPY_MOVE(MainWindow)
static std::unique_ptr<MainWindow> create(
Gtk::Application& app,
Glib::RefPtr<Gio::ActionGroup> const& actions,
Glib::RefPtr<Session> const& core);
void for_each_selected_torrent(std::function<void(Glib::RefPtr<Torrent> const&)> const& callback) const;
bool for_each_selected_torrent_until(std::function<bool(Glib::RefPtr<Torrent> const&)> const& callback) const;
void select_all();
void unselect_all();
void set_busy(bool isBusy);
void refresh();
sigc::signal<void()>& signal_selection_changed();
private:
class Impl;
std::unique_ptr<Impl> const impl_;
};