| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (c) 2013, Regents of the University of California |
| * BSD license, See the LICENSE file for more information |
| * Author: Yingdi Yu <yingdi@cs.ucla.edu> |
| #ifndef CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP |
| #define CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP |
| class EndorseComboBoxDelegate : public QItemDelegate |
| EndorseComboBoxDelegate(QObject* parent = 0); |
| // ~ComboBoxDelegate() {} |
| createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; |
| setEditorData(QWidget* editor, const QModelIndex& index) const; |
| setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; |
| updateEditorGeometry(QWidget* editor, |
| const QStyleOptionViewItem& option, |
| const QModelIndex& index) const; |
| paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; |
| std::vector<std::string> m_items; |
| } // namespace chronochat |
| #endif // CHRONOCHAT_ENDORSE_COMBOBOX_DELEGATE_HPP |