#ifndef TOOLBAR_H
#define TOOLBAR_H
#include "toolkit.h"
#include "../ui/toolbar.h"
#include <ucx/list.h>
#include <QToolBar>
class UiToolItemI {
public:
virtual
void addTo(UiObject *obj, QToolBar *toolbar) =
0;
};
class UiToolItem : public UiToolItemI {
public:
char *label;
char *image;
ui_callback callback;
void *userdata;
UcxList *groups;
bool isimportant;
UiToolItem(
char *label, ui_callback f,
void *userdata);
void addGroup(
int group);
virtual
void addTo(UiObject *obj, QToolBar *toolbar);
};
class UiStockToolItem : public UiToolItemI {
public:
char *stockid;
ui_callback callback;
void *userdata;
UcxList *groups;
bool isimportant;
UiStockToolItem(
char *stockid, ui_callback f,
void *userdata);
void addGroup(
int group);
virtual
void addTo(UiObject *obj, QToolBar *toolbar);
};
void ui_toolitem_vstgr(
char *name,
char *stockid,
int isimportant,
ui_callback f,
void *userdata,
va_list ap);
QToolBar* ui_create_toolbar(UiObject *obj);
#endif