--- queensgui/src/queensmain.cpp 2007/07/19 23:36:33 3 +++ queensgui/src/queensmain.cpp 2007/07/19 23:44:01 4 @@ -32,10 +32,11 @@ #include "board.h" #include "queens.h" #include "solution.h" -#include "solutionvector.h" -#include "solutionlist.h" -#include "solutionhash.h" -#include "solutionmnvector.h" + +#include "containervector.h" +#include "containerlist.h" +#include "containerhash.h" +#include "containermnvector.h" #include "config.h" @@ -82,6 +83,7 @@ m_sortalgo = SortList; m_solutions = NULL; m_queens = NULL; + m_sol = NULL; connect(m_quit, SIGNAL( clicked() ), @@ -143,16 +145,16 @@ delete m_solutions; switch (m_sortalgo) { case SortList: - m_solutions = new SolutionList(this); + m_solutions = new ContainerList(this); break; case SortVector: - m_solutions = new SolutionVector(this); + m_solutions = new ContainerVector(this); break; case SortHash: - m_solutions = new SolutionHash(this); + m_solutions = new ContainerHash(this); break; case SortMNVector: - m_solutions = new SolutionMNVector(this); + m_solutions = new ContainerMNVector(this); break; } @@ -172,7 +174,7 @@ m_elapsed.start(); m_time.start(); - m_queens = new Queens(this, m_solutions, m_sizeSelector->value() ,false); + m_queens = new Queens(this, m_sol, m_solutions, m_sizeSelector->value() ,false); m_queens->start(); } @@ -220,7 +222,7 @@ { int index = m_list->currentItem(); Solution* sol = m_solutions->solution( index ); - m_board->setMatrix( *sol ); + m_board->setMatrix( sol ); } void QueensMain::resize(int size)