Ejemplo n.º 1
0
    bool updateProgressBar()
    {
        Gtk::ProgressBar *progressBar;
        builder->get_widget("progressBar", progressBar);
        if(runner.isRunning() && !runner.isInterrupted())
        {
            progressBar->set_fraction(runner.getProgress());
            return true;
        }
        else {
            progressBar->set_fraction(0.0);
            return false;
        }

    }
Ejemplo n.º 2
0
    Gtk::Widget *SmartChessWindow::createNotificationBar() {
        Gtk::Box* statusbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL));
        statusbox->set_vexpand(false);
        statusbox->set_hexpand();

        mStatusBar = Gtk::manage(new Gtk::Statusbar());
        mStatusBar->set_vexpand(false);
        mStatusBar->set_hexpand();
        statusbox->add(*mStatusBar);

        Gtk::ProgressBar* progressbar = Gtk::manage(new Gtk::ProgressBar());
        progressbar->set_hexpand(false);
        progressbar->set_vexpand(false);
        statusbox->add(*progressbar);

        return statusbox;
    }
Ejemplo n.º 3
0
void ScannerGUI::updateProgressMain(){
	Glib::Threads::Mutex::Lock lock (mainMutex); 
	m_progress.set_text(worker->progressMessage);
	m_progress.set_fraction(worker->progressFraction);
}