qcross/qcross/cnewgamedialog.h

67 lines
2.6 KiB
C++

/***************************************************************************
* Copyright (C) 2008 by Oliver Groß *
* z.o.gross@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef QCROSS_CNEWGAMEDIALOG_H
#define QCROSS_CNEWGAMEDIALOG_H
#include <QDialog>
#include "ui_picselect.h"
namespace libqnono {
class CNonogram;
class CCrossPackage;
class NonogramProblem;
}
namespace qcross {
class CHighscore;
class CMaskedCrossPackageModel;
class CMaskedCrossPackageProxyModel;
/**
@author Oliver Groß <z.o.gross@gmx.de>
*/
class CNewGameDialog : public QDialog {
Q_OBJECT
public:
CNewGameDialog(QWidget * parent = 0, Qt::WindowFlags f = 0);
~CNewGameDialog();
int nonogramIndex() const;
libqnono::CCrossPackage * selectedPackage() const;
QString selectedPackageName() const;
libqnono::NonogramProblem getProblem();
protected slots:
void importPackage();
void openPictureFile();
private:
Ui::picselect ui;
CHighscore * m_Highscore;
libqnono::NonogramProblem * m_Problem; /* if != NULL package wasn't used */
CMaskedCrossPackageModel * m_PicModel;
CMaskedCrossPackageProxyModel * m_PicProxyModel;
private slots:
void handlePackageSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
void handlePictureSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
};
}
#endif