mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
gui/widget: add class CHourGlass
Provides an hourglass/snake-loader function to visualize running processes. A template xcf-file for Gimp 2.10 is appended. Feel free to edit.
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
#include "widget/msgbox.h"
|
||||
#include "widget/progresswindow.h"
|
||||
#include "widget/termwindow.h"
|
||||
#include "widget/hourglass.h"
|
||||
#include <driver/record.h>
|
||||
#include <zapit/femanager.h>
|
||||
#include <zapit/scan.h>
|
||||
@@ -1119,8 +1120,19 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
showRecords();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
else if (actionKey == "hourglass"){
|
||||
CHourGlass hg(20, 20);
|
||||
hg.paint();
|
||||
sleep(10);
|
||||
hg.hide();
|
||||
return res;
|
||||
}
|
||||
else if (actionKey == "hourglass_proc"){
|
||||
CHourGlassProc proc(20, 20, sigc::mem_fun(*this, &CTestMenu::showRecords));
|
||||
proc.exec();
|
||||
return res;
|
||||
}
|
||||
|
||||
return showTestMenu();
|
||||
}
|
||||
|
||||
@@ -1250,6 +1262,10 @@ int CTestMenu::showTestMenu()
|
||||
CKeyboardInput input("Text input", &input_txt, 30, NULL, NULL, "Test");
|
||||
w_test.addItem(new CMenuForwarder("Text input", true, NULL, &input));
|
||||
|
||||
//hourglass
|
||||
w_test.addItem(new CMenuForwarder("Hourglass", true, NULL, this, "hourglass"));
|
||||
w_test.addItem(new CMenuForwarder("Exec process with hourglass!", true, NULL, this, "hourglass_proc"));
|
||||
|
||||
//rate banner
|
||||
w_test.addItem(new CMenuForwarder("Rate banner", true, NULL, this, "rate_banner"));
|
||||
|
||||
|
Reference in New Issue
Block a user