Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SolutionListView Class Reference

Display the solutions of a map. More...

#include <solution_list_view.h>

Inheritance diagram for SolutionListView::

List of all members.

Signals

void clickedSolution (int index)

Public Methods

 SolutionListView (CompressedMap const &map, QWidget *parent=0, const char *name=0)
 SolutionListView (int index, QWidget *parent=0, const char *name=0)
int numberOfSolutions () const
bool isHidden (int index) const
void setHidden (int index, bool hide)
int pushes (int index) const
void setPushes (int index, int pushes)
int linearPushes (int index) const
void setLinearPushes (int index, int pushes)
int gemChanges (int index) const
void setGemChanges (int index, int gem_changes)
int moves (int index) const
void setMoves (int index, int moves)
QString annotation (int index) const
void setAnnotation (int index, QString const &annotation)
std::vector< int > selectedSolutions () const

Private Slots

void solutionSelected (QListViewItem *item)

Private Methods

void setup (int index)

Private Attributes

std::vector< QListViewItem *> m_items
std::vector< int > m_hidden

Detailed Description

Display the solutions of a map.

Author:
Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
Version:
0.1


Constructor & Destructor Documentation

SolutionListView::SolutionListView CompressedMap const & map,
QWidget * parent = 0,
const char * name = 0
 

Creates the list view.

Parameters:
compressed_map   The compressed map of the level.
parent   The parent widget.
name   The internal name.

SolutionListView::SolutionListView int index,
QWidget * parent = 0,
const char * name = 0
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


Member Function Documentation

QString SolutionListView::annotation int index const
 

Returns the annotation of a solution.

@index The index of the solution.

void SolutionListView::clickedSolution int index [signal]
 

Emitted, when the user clicks a solution.

Parameters:
index   The index of the solution.

int SolutionListView::gemChanges int index const
 

Returns the number of gem changes in the solution.

Parameters:
index   The index of the solution.

bool SolutionListView::isHidden int index const
 

Returns true, if the solution is hidden.

Parameters:
index   The index of the solution.

int SolutionListView::linearPushes int index const
 

Returns the number of linear pushes in the solution.

Parameters:
index   The index of the solution.

int SolutionListView::moves int index const
 

Returns the number of moves in the solution.

Parameters:
index   The index of the solution.

int SolutionListView::numberOfSolutions const
 

Returns the number of solutions.

int SolutionListView::pushes int index const
 

Returns the number of pushes in the solution.

Parameters:
index   The index of the solution.

std::vector<int> SolutionListView::selectedSolutions const
 

Returns a vector holding the indices of all selected solutions.

void SolutionListView::setAnnotation int index,
QString const & annotation
 

Sets a new annotation of a solution.

Parameters:
index   The index of the solution.
annotation   The new annotation.

void SolutionListView::setGemChanges int index,
int gem_changes
 

Sets the number of gem changes in the solution.

Parameters:
index   The index of the solution.
pushes   The new number of gem changes in the solutions.

void SolutionListView::setHidden int index,
bool hide
 

Hides the solution with the given index.

Parameters:
index   The index of the solution to hide.
hide   If true, the solution is hidden and unhidden otherwise.

void SolutionListView::setLinearPushes int index,
int pushes
 

Sets the number of linear pushes in the solution.

Parameters:
index   The index of the solution.
pushes   The new number of linear pushes in the solutions.

void SolutionListView::setMoves int index,
int moves
 

Sets the number of moves in the solution.

Parameters:
index   The index of the solution.
moves   The new number of moves in the solutions.

void SolutionListView::setPushes int index,
int pushes
 

Sets the number of pushes in the solution.

Parameters:
index   The index of the solution.
pushes   The new number of pushes in the solutions.

void SolutionListView::setup int index [private]
 

Sets up the widget.

Parameters:
index   The index of the compressed map in the SolutionHolder.

void SolutionListView::solutionSelected QListViewItem * item [private, slot]
 

Called, when the user selects a solution.


Member Data Documentation

std::vector<int> SolutionListView::m_hidden [private]
 

Here we store 1 for every hidden item.

std::vector<QListViewItem *> SolutionListView::m_items [private]
 

The list view items.


The documentation for this class was generated from the following file:
Generated at Sun Jan 6 18:49:12 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001