QTfrontend/mapContainer.h
author displacer
Thu, 11 Jan 2007 22:04:08 +0000
changeset 317 e95340dbfc1d
parent 249 ff85fa029541
child 320 1ee7f087195a
permissions -rw-r--r--
start all clients
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
     1
/*
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
     2
 * Hedgewars, a worms-like game
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
     3
 * Copyright (c) 2006 Igor Ulyanov <iulyanov@gmail.com>
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
     4
 *
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
     8
 *
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    12
 * GNU General Public License for more details.
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    13
 *
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    14
 * You should have received a copy of the GNU General Public License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    15
 * along with this program; if not, write to the Free Software
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 169
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    17
 */
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    18
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    19
#ifndef _HWMAP_CONTAINER_INCLUDED
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    20
#define _HWMAP_CONTAINER_INCLUDED
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    21
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    22
#include "hwmap.h"
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    23
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    24
#include <QWidget>
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    25
#include <QVBoxLayout>
249
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    26
#include <QComboBox>
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    27
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    28
class QPushButton;
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    29
249
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    30
class MapFileErrorException
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    31
{
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    32
};
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    33
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    34
class HWMapContainer : public QWidget
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    35
{
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    36
  Q_OBJECT
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    37
    
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    38
 public:
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    39
  HWMapContainer(QWidget * parent=0);
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    40
  QString getCurrentSeed() const;
249
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    41
  QString getCurrentMap() const;
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    42
  QString getCurrentTheme() const;
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    43
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    44
 public slots:
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    45
  void changeImage();
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    46
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    47
 private slots:
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    48
  void setImage(const QImage newImage);
249
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    49
  void mapChanged(int index);
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    50
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    51
 protected:
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    52
  virtual void resizeEvent ( QResizeEvent * event );
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    53
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    54
 private:
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    55
  QVBoxLayout mainLayout;
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    56
  QPushButton* imageButt;
249
ff85fa029541 map choose from files added
displacer
parents: 184
diff changeset
    57
  QComboBox* chooseMap;
169
a78d4a552500 new more working, but still not completely working version :)
displacer
parents: 168
diff changeset
    58
  HWMap* pMap;
164
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    59
  QString m_seed;
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    60
};
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    61
92cff18a3ab6 first map preview added (still experimental)
displacer
parents:
diff changeset
    62
#endif // _HWMAP_CONTAINER_INCLUDED