2012-10-21 10:06:33 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <QPushButton>
|
2012-11-03 10:15:03 -04:00
|
|
|
#include <QFrame>
|
2012-11-02 09:52:29 -04:00
|
|
|
#include <retroshare/rsflags.h>
|
2012-10-21 10:06:33 -04:00
|
|
|
|
|
|
|
class GroupFlagsWidget: public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-11-02 13:26:20 -04:00
|
|
|
GroupFlagsWidget(QWidget *parent,FileStorageFlags flags = FileStorageFlags(0u)) ;
|
2012-10-21 10:06:33 -04:00
|
|
|
virtual ~GroupFlagsWidget() ;
|
|
|
|
|
2012-11-02 09:52:29 -04:00
|
|
|
FileStorageFlags flags() const ;
|
2012-11-02 13:26:20 -04:00
|
|
|
void setFlags(FileStorageFlags flags) ;
|
2012-10-21 10:06:33 -04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void updated() ;
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void update_GN_button(bool) ;
|
|
|
|
void update_GB_button(bool) ;
|
|
|
|
void update_ON_button(bool) ;
|
|
|
|
void update_OB_button(bool) ;
|
|
|
|
|
|
|
|
signals:
|
2012-11-02 09:52:29 -04:00
|
|
|
void flagsChanged(FileStorageFlags) const ;
|
2012-10-21 10:06:33 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
void update_button_state(bool b,int id) ;
|
|
|
|
|
|
|
|
QPushButton *_buttons[4] ;
|
|
|
|
|
|
|
|
QLayout *_layout ;
|
|
|
|
QIcon *_icons[6] ;
|
2012-11-02 09:52:29 -04:00
|
|
|
FileStorageFlags _flags[4] ;
|
2012-10-21 15:39:56 -04:00
|
|
|
|
|
|
|
static QString _tooltips_on[4] ;
|
|
|
|
static QString _tooltips_off[4] ;
|
2012-10-21 10:06:33 -04:00
|
|
|
};
|