mainwindow.h Example File
widgets/icons/mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QIcon>
#include <QList>
#include <QMainWindow>
#include <QPixmap>
class QAction;
class QActionGroup;
class QLabel;
class QMenu;
class QRadioButton;
class QButtonGroup;
class QTableWidget;
class IconPreviewArea;
class IconSizeSpinBox;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
void loadImages(const QStringList &fileNames);
void show();
private slots:
void about();
void changeStyle(bool checked);
void changeSize(int, bool);
void triggerChangeSize();
void changeIcon();
void addSampleImages();
void addOtherImages();
void removeAllImages();
void useHighDpiPixmapsChanged(int checkState);
void screenChanged();
private:
QWidget *createImagesGroupBox();
QWidget *createIconSizeGroupBox();
QWidget *createHighDpiIconSizeGroupBox();
void createActions();
void createContextMenu();
void checkCurrentStyle();
void addImages(const QString &directory);
IconPreviewArea *previewArea;
QTableWidget *imagesTable;
QButtonGroup *sizeButtonGroup;
IconSizeSpinBox *otherSpinBox;
QLabel *devicePixelRatioLabel;
QLabel *screenNameLabel;
QAction *addOtherImagesAct;
QAction *addSampleImagesAct;
QAction *removeAllImagesAct;
QAction *guessModeStateAct;
QAction *nativeFileDialogAct;
QActionGroup *styleActionGroup;
};
#endif