#ifndef BOTTOMLISTDELEGATE_H
#define BOTTOMLISTDELEGATE_H

#include <QStyledItemDelegate>
#include <QModelIndex>
#include <QStandardItemModel>

#include <QMouseEvent>
#include "global/viewvar.h"
#include "global/corevar.h"

class BottomListDelegate : public QStyledItemDelegate
{
    Q_OBJECT
signals:

public:
    explicit BottomListDelegate(QObject *parent = 0);
    ~BottomListDelegate();

    // set the drop down list style of the searchview widget.
    void paint(QPainter * painter,const QStyleOptionViewItem & option,const QModelIndex & index) const;

    // set the size of drop down item of the searchview widget.
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
    //此事件可对在item上的操作做出反应
    // bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index);

signals:
    void changeCityFromSearch(QModelIndex m_index); //从搜索列表改变当前城市

};


#endif 