Horizon
digikey_auth_window.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "util/status_dispatcher.hpp"
4 
5 namespace horizon {
6 class DigiKeyAuthWindow : public Gtk::Window {
7 public:
8  static DigiKeyAuthWindow *create();
9  DigiKeyAuthWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x);
10 
11 private:
12  const class DigiKeyApiPreferences &preferences;
13  Gtk::Entry *code_entry = nullptr;
14  Gtk::Button *login_button = nullptr;
15  Gtk::Button *cancel_button = nullptr;
16 
17  std::string client_id;
18  std::string client_secret;
19  std::string code;
20  void worker();
21  void handle_login();
22  bool is_busy = false;
23  void update_buttons();
24 
25  StatusDispatcher status_dispatcher;
26 };
27 } // namespace horizon
Definition: preferences.hpp:95
Definition: digikey_auth_window.hpp:6
Definition: status_dispatcher.hpp:8