1 #include "HistoryContainer.h" 2 3 #include "Components/Session/Session.h" 4 5 #include "Gui/History/GUI_History.h" 6 #include "Gui/Utils/Icons.h" 7 8 #include <QIcon> 9 10 struct HistoryContainer::Private 11 { 12 GUI_History* widget = nullptr; 13 Session::Manager* sessionManager; 14 PrivateHistoryContainer::Private15 Private(Session::Manager* sessionManager) : 16 sessionManager(sessionManager) 17 {} 18 }; 19 HistoryContainer(Session::Manager * sessionManager,QObject * parent)20HistoryContainer::HistoryContainer(Session::Manager* sessionManager, QObject* parent) : 21 Library::Container(parent) 22 { 23 m = Pimpl::make<Private>(sessionManager); 24 } 25 26 HistoryContainer::~HistoryContainer() = default; 27 name() const28QString HistoryContainer::name() const 29 { 30 return "history"; 31 } 32 displayName() const33QString HistoryContainer::displayName() const 34 { 35 return tr("History"); 36 } 37 widget() const38QWidget* HistoryContainer::widget() const 39 { 40 return m->widget; 41 } 42 header() const43QFrame* HistoryContainer::header() const 44 { 45 return m->widget->header(); 46 } 47 icon() const48QIcon HistoryContainer::icon() const 49 { 50 return Gui::Icons::icon(Gui::Icons::Edit); 51 } 52 initUi()53void HistoryContainer::initUi() 54 { 55 m->widget = new GUI_History(m->sessionManager); 56 } 57