QTfrontend/ui/widget/keybinder.h
changeset 14899 4d5df8d35a95
parent 11046 47a8c19ecb60
child 14900 505c8d101be3
equal deleted inserted replaced
14898:4596357d002d 14899:4d5df8d35a95
    27 class QListWidget;
    27 class QListWidget;
    28 class QTableWidgetItem;
    28 class QTableWidgetItem;
    29 class QTableWidget;
    29 class QTableWidget;
    30 class QBoxLayout;
    30 class QBoxLayout;
    31 class QComboBox;
    31 class QComboBox;
       
    32 class QLabel;
    32 
    33 
    33 // USAGE NOTE: Every time the widget comes into view, you must call resetInterface()
    34 // USAGE NOTE: Every time the widget comes into view, you must call resetInterface()
    34 
    35 
    35 class KeyBinder : public QWidget
    36 class KeyBinder : public QWidget
    36 {
    37 {
    41         ~KeyBinder();
    42         ~KeyBinder();
    42 
    43 
    43         void setBindIndex(int keyIndex, int bindIndex);
    44         void setBindIndex(int keyIndex, int bindIndex);
    44         int bindIndex(int keyIndex);
    45         int bindIndex(int keyIndex);
    45         void resetInterface();
    46         void resetInterface();
       
    47         bool hasConflicts();
       
    48         bool checkConflicts();
       
    49         bool checkConflictsWith(int bind, bool updateState);
    46 
    50 
    47     private:
    51     private:
    48         QHash<QObject *, QTableWidgetItem *> * bindComboBoxCellMappings;
    52         QHash<QObject *, QTableWidgetItem *> * bindComboBoxCellMappings;
    49         QHash<QTableWidgetItem *, QComboBox *> * bindCellComboBoxMappings;
    53         QHash<QTableWidgetItem *, QComboBox *> * bindCellComboBoxMappings;
    50         QTableWidget * selectedBindTable;
    54         QTableWidget * selectedBindTable;
    51         QListWidget * catList;
    55         QListWidget * catList;
    52         QBoxLayout *bindingsPages;
    56         QBoxLayout *bindingsPages;
    53         QComboBox * CBBind[BINDS_NUMBER];
    57         QComboBox * CBBind[BINDS_NUMBER];
       
    58         QLabel * conflictLabel;
    54         QString defaultText;
    59         QString defaultText;
    55         bool enableSignal;
    60         bool enableSignal;
       
    61         bool p_hasConflicts;
    56 
    62 
    57     signals:
    63     signals:
    58         void bindUpdate(int bindID);
    64         void bindUpdate(int bindID);
    59         void resetAllBinds();
    65         void resetAllBinds();
    60 
    66