Optika GUI Toolik  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros | Functions
GUI_UnitTests.cpp File Reference
#include <QtGui>
#include <QtTest/QtTest>
#include "Teuchos_UnitTestHarness.hpp"
#include "Optika_treemodel.hpp"
#include "Optika_delegate.hpp"
#include "Optika_treeview.hpp"
#include <QApplication>
#include <QSpinBox>
#include "Optika_metawindow.hpp"
#include "GUI_UnitTests.moc"
Include dependency graph for GUI_UnitTests.cpp:

Go to the source code of this file.

Classes

class  Optika::ModalClicker
 
class  Optika::OptikaGUITests
 

Namespaces

 Optika
 

Macros

#define GET_ENTRY_INDEX(PL, NAME, MODEL)
 
#define VERIFY_PARAMETER_TYPE(PL, NAME, TYPE, MODEL)
 
#define VERIFY_HIDDEN_ROW(INDEX)   QVERIFY(treeView->isRowHidden( INDEX.row(), INDEX.parent()));
 
#define VERIFY_SHOWN_ROW(INDEX)   QVERIFY(!treeView->isRowHidden( INDEX.row(), INDEX.parent()));
 

Functions

template<class T >
void Optika::testingSpinBoxApply (const RCP< EnhancedNumberValidator< T > > validator, QAbstractSpinBox *spinner)
 
template<>
void Optika::testingSpinBoxApply (const RCP< EnhancedNumberValidator< double > > validator, QAbstractSpinBox *spinner)
 
template<>
void Optika::testingSpinBoxApply (const RCP< EnhancedNumberValidator< float > > validator, QAbstractSpinBox *spinner)
 
template<class T >
QAbstractSpinBox * Optika::createDefaultSpinner ()
 
template<>
QAbstractSpinBox * Optika::createDefaultSpinner< float > ()
 
template<>
QAbstractSpinBox * Optika::createDefaultSpinner< double > ()
 
template<class T >
void Optika::assertSpinnerDefaults (QAbstractSpinBox *spinBox)
 
template<>
void Optika::assertSpinnerDefaults< float > (QAbstractSpinBox *spinBox)
 
template<>
void Optika::assertSpinnerDefaults< double > (QAbstractSpinBox *spinBox)
 
template<class T >
void Optika::assertLineEditDetails (const QValidator *validator, QString &val20, QString &valneg1, int &pos)
 
template<>
void Optika::assertLineEditDetails< float > (const QValidator *validator, QString &val20, QString &valneg1, int &pos)
 
template<>
void Optika::assertLineEditDetails< double > (const QValidator *validator, QString &val20, QString &valneg1, int &pos)
 
template<class T >
void Optika::valApplyTestTemplate ()
 

Macro Definition Documentation

#define GET_ENTRY_INDEX (   PL,
  NAME,
  MODEL 
)
Value:
RCP<ParameterEntry> NAME##Entry = PL->getEntryRCP( #NAME ); \
QVERIFY(nonnull( NAME##Entry )); \
QModelIndex NAME##Index = MODEL->findParameterEntryIndex( NAME##Entry ); \
QVERIFY( NAME##Index.isValid());
bool nonnull(const boost::shared_ptr< T > &p)

Definition at line 100 of file GUI_UnitTests.cpp.

#define VERIFY_PARAMETER_TYPE (   PL,
  NAME,
  TYPE,
  MODEL 
)
Value:
GET_ENTRY_INDEX( PL , NAME , MODEL ) \
QCOMPARE( MODEL->data( NAME##Index, Qt::DisplayRole).toString(), \
QString::fromStdString( #NAME) ); \
QModelIndex NAME##TypeIndex = NAME##Index.sibling(NAME##Index.row(),2); \
QVERIFY( NAME##TypeIndex.isValid()); \
QCOMPARE( MODEL->data( NAME##TypeIndex, Qt::DisplayRole).toString(), TYPE );
#define GET_ENTRY_INDEX(PL, NAME, MODEL)

Definition at line 109 of file GUI_UnitTests.cpp.

#define VERIFY_HIDDEN_ROW (   INDEX)    QVERIFY(treeView->isRowHidden( INDEX.row(), INDEX.parent()));

Definition at line 203 of file GUI_UnitTests.cpp.

#define VERIFY_SHOWN_ROW (   INDEX)    QVERIFY(!treeView->isRowHidden( INDEX.row(), INDEX.parent()));

Definition at line 206 of file GUI_UnitTests.cpp.