Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mainwindow.h"
- #include "../models/configuration.h"
- using namespace NickvisionApplication::Views;
- using namespace NickvisionApplication::Models;
- MainWindow::MainWindow() : m_helpCheckForUpdates("Check for Updates"), m_helpGitHubRepo("GitHub Repo"), m_helpReportABug("Report a Bug"), m_helpBuyMeACoffee("Buy Me a Coffee"), m_helpChangelog("Changelog"), m_helpAbout("About")
- {
- //==Settings==//
- set_default_size(800, 600);
- maximize();
- //==HeaderBar==//
- m_headerBar.set_title("Nickvision Application");
- m_headerBar.set_subtitle("Subtitle here");
- m_headerBar.set_show_close_button(true);
- m_helpMenu.append(m_helpCheckForUpdates);
- m_helpMenu.append(m_helpSeparator1);
- m_helpMenu.append(m_helpGitHubRepo);
- m_helpMenu.append(m_helpReportABug);
- m_helpMenu.append(m_helpBuyMeACoffee);
- m_helpMenu.append(m_helpSeparator2);
- m_helpMenu.append(m_helpChangelog);
- m_helpMenu.append(m_helpAbout);
- m_btnHelpMenu.set_menu(m_helpMenu);
- m_btnHelpMenu.set_image_from_icon_name("open-menu");
- m_btnOpen.set_image_from_icon_name("document-new");
- m_headerBar.pack_start(m_btnOpen);
- m_headerBar.pack_end(m_btnHelpMenu);
- //==Layout==//
- set_titlebar(m_headerBar);
- realize_if_needed();
- //==Configuration==//
- Configuration config = Configuration::load();
- if(config.isFirstTimeOpen())
- {
- }
- }
- MainWindow::~MainWindow()
- {
- Configuration config = Configuration::load();
- config.save();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement