ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
ItemListView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2022 - 2023 Chris Rizzitello <sithlord48@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QTableView>
7 #include <ff7tkwidgets_export.h>
8 
9 class ItemPreview;
10 
11 class FF7TKWIDGETS_EXPORT ItemListView : public QTableView
12 {
13 public:
14  explicit ItemListView(QWidget *parent = nullptr);
15  void setMaximumItemQty(int itemQtyLimit);
16  int maximumItemQty() {return m_itemQtyLimit;}
17  void setEditableItemCombo(bool editable);
18  bool editableItemCombo() {return m_editableItemCombo;}
19  void setShowPlaceholderItems(bool showPlaceholderItems);
20  bool showPlaceholderItems() {return m_showPlaceholderItems;}
21  void setModel(QAbstractItemModel* model);
22  bool viewportEvent(QEvent *event);
23  void destroyTooltip();
24  int sizeHintForColumn(int column);
25 protected:
26  void changeEvent(QEvent *e);
27 private:
28  int m_itemQtyLimit = 127;
29  bool m_editableItemCombo = false;
30  bool m_createdTooltip = false;
31  bool m_showPlaceholderItems = false;
32  ItemPreview *itemPreview = nullptr;
33  int m_columnWidth[3];
34 };
ItemListView::showPlaceholderItems
bool showPlaceholderItems()
Definition: ItemListView.h:20
ItemListView
Definition: ItemListView.h:11
ItemListView::maximumItemQty
int maximumItemQty()
Definition: ItemListView.h:16
ItemPreview
Definition: ItemPreview.h:14
ItemListView::editableItemCombo
bool editableItemCombo()
Definition: ItemListView.h:18