ff7tk  0.02
Toolkit for making FF7 Tools
LocationViewer.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2013 - 2016 Chris Rizzitello <sithlord48@gmail.com> //
3 // //
4 // This file is part of FF7tk //
5 // //
6 // FF7tk is free software: you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation, either version 3 of the License, or //
9 // (at your option) any later version. //
10 // //
11 // FF7tk is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14 // GNU General Public License for more details. //
15 /****************************************************************************/
16 #ifndef LOCATIONVIEWER_H
17 #define LOCATIONVIEWER_H
18 
19 #include "qglobal.h"
20 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
21  #include <QtWidgets>
22 #else
23  #include <QtGui>
24 #endif
25 // Include FF7tk Items.
26 #include "../data/FF7Location.h"
27 #include "../data/FF7FieldItemList.h"
28 
33 class LocationViewer : public QWidget
34 {
35  Q_OBJECT
36 public:
38  explicit LocationViewer(qreal Scale=1,QWidget *parent=0);
40 signals:
41  void locationChanged(QString);
42  void xChanged(int x);
43  void yChanged(int y);
44  void tChanged(int t);
45  void dChanged(int d);
46  void mapIdChanged(int mapId);
47  void locIdChanged(int locId);
48  void locationStringChanged(QString);
49  void fieldItemConnectRequest(quint8 index,QList<quint16> offset,QList<quint8>bit);
50  void fieldItemCheck(int index);
51  void fieldItemChanged(int index,bool checked);
52 
53 public slots:
54  void setSelected(QString);
55  void setLocationChangesSaved(bool saveChanges);
56  bool locationChangesSaved(void);
57  void setRegion(QString region);
58  void setTranslationBaseFile(QString);
59  void setX(int x);
60  void setY(int y);
61  void setT(int t);
62  void setD(int d);
63  void setMapId(int mapId);
64  void setLocationId(int locId);
65  void setLocationString(QString);
66  void setHorizontalHeaderStyle(QString styleSheet);
67  void setFieldItemChecked(int row,bool checked);
68  void init_fieldItems(void);
69  void setAdvancedMode(bool advancedMode);
70  bool advancedMode(void);
71 
72 private slots:
73  void itemChanged(int currentRow,int currentColumn,int prevRow, int prevColumn);
74  void sbMapIdChanged(int mapId);
75  void sbLocIdChanged(int locId);
76  void sbXChanged(int x);
77  void sbYChanged(int y);
78  void sbTChanged(int t);
79  void sbDChanged(int d);
80  void lineLocationNameChanged(QString);
81  void setLocation(int mapId,int locId);
82  void filterLocations(QString filter);
83  void actionNameSearchToggled(bool checked);
84  void actionItemSearchToggled(bool checked);
85  void actionRegExpSearchToggled(bool checked);
86  void actionCaseSensitiveToggled(bool checked);
87  void btnSearchOptionsClicked(void);
88  void fieldItemListItemChanged(QModelIndex index);
89  void chkAutoUpdateChanged(bool checked);
90 protected:
91  void resizeEvent(QResizeEvent *ev);
92 private:
93  void init_display(void);
94  void init_connections(void);
95  void init_disconnect(void);
96  QString translate(QString text);
97  void searchItem(QRegExp exp);
98  void searchName(QRegExp exp);
99  QTableWidget *locationTable;
100  QLineEdit *lineTableFilter;
105  QToolButton *btnSearchOptions;
109  QWidget *CoordsWidget;
110  QLineEdit *lineLocationName;
111  QSpinBox *sbMapID;
112  QSpinBox *sbLocID;
113  QSpinBox *sbX;
114  QSpinBox *sbY;
115  QSpinBox *sbT;
116  QSpinBox *sbD;
117  QString region;
118  QString transBasePath;
119  QListWidget *fieldItemList;
120  QGroupBox *groupFieldItems;
121  QCheckBox *chkAutoUpdate;
122  quint8 searchMode;
127  qreal scale;
128 };
129 
130 #endif // LOCATIONVIEWER_H
Info about field locations.
Definition: FF7Location.h:36
void init_disconnect(void)
bool advancedMode(void)
void setFieldItemChecked(int row, bool checked)
void setRegion(QString region)
void searchItem(QRegExp exp)
QLineEdit * lineLocationName
QSpinBox * sbX
void sbXChanged(int x)
void resizeEvent(QResizeEvent *ev)
QSpinBox * sbMapID
void setY(int y)
QCheckBox * chkAutoUpdate
QAction * actionNameSearch
void setAdvancedMode(bool advancedMode)
QLabel * lblLocationPreview
void yChanged(int y)
void filterLocations(QString filter)
LocationViewer(qreal Scale=1, QWidget *parent=0)
QTableWidget * locationTable
void fieldItemConnectRequest(quint8 index, QList< quint16 > offset, QList< quint8 >bit)
Set Saves Location or View Field Locations and Toggle the items picked up from them.
void xChanged(int x)
void init_display(void)
void actionNameSearchToggled(bool checked)
void fieldItemChanged(int index, bool checked)
void fieldItemListItemChanged(QModelIndex index)
FF7Location * Locations
void init_fieldItems(void)
void chkAutoUpdateChanged(bool checked)
void searchName(QRegExp exp)
void setMapId(int mapId)
void init_connections(void)
Data Class to allow the tracking and changing of items being picked up on the field.
QSpinBox * sbLocID
void setFilterString(QString filter="", LocationViewer::filterMode mode=LocationViewer::NAME)
datatype for one item "kernel" style
Definition: FF7Item.h:25
QLineEdit * lineTableFilter
void btnSearchOptionsClicked(void)
void actionCaseSensitiveToggled(bool checked)
QAction * actionCaseSensitive
QSpinBox * sbY
FF7FieldItemList * fieldItems
void setHorizontalHeaderStyle(QString styleSheet)
QListWidget * fieldItemList
QString transBasePath
void setLocationId(int locId)
void itemChanged(int currentRow, int currentColumn, int prevRow, int prevColumn)
void setD(int d)
QSpinBox * sbD
void setLocation(int mapId, int locId)
void setX(int x)
void locationStringChanged(QString)
void setSelected(QString)
void setTranslationBaseFile(QString)
void tChanged(int t)
void sbTChanged(int t)
bool locationChangesSaved(void)
void fieldItemCheck(int index)
QAction * actionItemSearch
void dChanged(int d)
void locationChanged(QString)
void sbMapIdChanged(int mapId)
void sbDChanged(int d)
void mapIdChanged(int mapId)
void actionItemSearchToggled(bool checked)
QWidget * CoordsWidget
QGroupBox * groupFieldItems
QAction * actionRegExpSearch
QString translate(QString text)
void setT(int t)
void sbYChanged(int y)
QSpinBox * sbT
void locIdChanged(int locId)
void sbLocIdChanged(int locId)
void setLocationString(QString)
void lineLocationNameChanged(QString)
void setLocationChangesSaved(bool saveChanges)
void actionRegExpSearchToggled(bool checked)
QToolButton * btnSearchOptions