summaryrefslogtreecommitdiffstats
path: root/examples/sql/masterdetail/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sql/masterdetail/mainwindow.h')
-rw-r--r--examples/sql/masterdetail/mainwindow.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/examples/sql/masterdetail/mainwindow.h b/examples/sql/masterdetail/mainwindow.h
index a5f9e70648..cc2a5c9f59 100644
--- a/examples/sql/masterdetail/mainwindow.h
+++ b/examples/sql/masterdetail/mainwindow.h
@@ -8,15 +8,13 @@
#include <QMainWindow>
#include <QModelIndex>
-QT_BEGIN_NAMESPACE
-class QComboBox;
-class QFile;
-class QGroupBox;
-class QLabel;
-class QListWidget;
-class QSqlRelationalTableModel;
-class QTableView;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QComboBox)
+QT_FORWARD_DECLARE_CLASS(QFile)
+QT_FORWARD_DECLARE_CLASS(QGroupBox)
+QT_FORWARD_DECLARE_CLASS(QLabel)
+QT_FORWARD_DECLARE_CLASS(QListWidget)
+QT_FORWARD_DECLARE_CLASS(QSqlRelationalTableModel)
+QT_FORWARD_DECLARE_CLASS(QTableView)
class MainWindow : public QMainWindow
{
@@ -31,21 +29,20 @@ private slots:
void addAlbum();
void changeArtist(int row);
void deleteAlbum();
- void showAlbumDetails(QModelIndex index);
- void showArtistProfile(QModelIndex index);
- void updateHeader(QModelIndex, int, int);
+ void showAlbumDetails(const QModelIndex &index);
+ void showArtistProfile(const QModelIndex &index);
+ void adjustHeader();
private:
- void adjustHeader();
QGroupBox *createAlbumGroupBox();
QGroupBox *createArtistGroupBox();
QGroupBox *createDetailsGroupBox();
void createMenuBar();
- void decreaseAlbumCount(QModelIndex artistIndex);
+ void decreaseAlbumCount(const QModelIndex &artistIndex);
void getTrackList(QDomNode album);
- QModelIndex indexOfArtist(const QString &artist);
+ QModelIndex indexOfArtist(const QString &artist) const;
void readAlbumData();
- void removeAlbumFromDatabase(QModelIndex album);
+ void removeAlbumFromDatabase(const QModelIndex &album);
void removeAlbumFromFile(int id);
void showImageLabel();