1 // Linguistica’s interface to Qt’s status and progress bars.
2 // Copyright © 2010 The University of Chicago
3 #ifndef LXA_GUI_STATUS_H
4 #define LXA_GUI_STATUS_H
6 namespace linguistica
{ namespace ui
{
7 struct status_user_agent
;
10 struct status_interface
;
14 #include "ui/Status.h"
18 class linguistica::ui::qt::status_interface
19 : public linguistica::ui::status_user_agent
{
20 struct label
: public status_user_agent::string_type
{
22 explicit label(QLabel
& bar
) : w(bar
) { }
24 // XXX. lxa processing blocks repaint events.
28 label
& operator=(const QString
& str
);
29 // caller is responsible for freeing the label.
32 struct progressbar
: public status_user_agent::progress_type
{
34 explicit progressbar(QProgressBar
& bar
) : w(bar
) { }
36 // XXX. lxa processing blocks repaint events.
38 progressbar
& assign(int n
);
41 void set_denominator(int denom
);
42 // caller is responsible for progress bar.
49 status_interface(QLabel
& left
, QLabel
& right
, QProgressBar
& middle
)
50 : status_user_agent(l
, r
, m
), l(left
), m(middle
), r(right
) { }
53 #endif // LXA_GUI_STATUS_H