00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qtopia Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 #ifndef CANVAS_CARD_WINDOW_H 00021 #define CANVAS_CARD_WINDOW_H 00022 00023 00024 #include <qmainwindow.h> 00025 #include <qcanvas.h> 00026 00027 00028 class CanvasCardGame; 00029 class QPopupMenu; 00030 00031 00032 class CanvasCardWindow : public QMainWindow { 00033 Q_OBJECT 00034 00035 public: 00036 static QString appName() { return QString::fromLatin1("patience"); } 00037 CanvasCardWindow(QWidget* parent=0, const char* name=0, WFlags f=0); 00038 virtual ~CanvasCardWindow(); 00039 00040 public slots: 00041 void setCardBacks(); 00042 void changeCardBacks(); 00043 void snapToggle(); 00044 void drawnToggle(); 00045 00046 private slots: 00047 void initFreecell(); 00048 void initPatience(); 00049 void initChicane(); 00050 void initHarp(); 00051 void initTeeclub(); 00052 00053 protected: 00054 virtual void resizeEvent(QResizeEvent *e); 00055 00056 void updateDraw(); 00057 private: 00058 QCanvas canvas; 00059 bool snapOn; 00060 bool drawThree; 00061 int drawId; 00062 int cardBack; 00063 int gameType; 00064 CanvasCardGame *cardGame; 00065 00066 QPopupMenu* options; 00067 QPopupMenu* settings; 00068 int dbf_id; 00069 int snap_id; 00070 }; 00071 00072 00073 #endif 00074
1.4.2