Public Member Functions | Private Slots | Private Attributes | List of all members
Step2 Class Reference

#include <wizard.h>

Inheritance diagram for Step2:

Public Member Functions

 Step2 (Wizard *parent, const QHash< QString, Input * > &modelData)
 
void init ()
 

Private Slots

void optimizeFor (int choice)
 
void extractMode (int choice)
 
void changeCrossRefState (int choice)
 

Private Attributes

QGroupBox * m_extractMode
 
QGroupBox * m_optimizeLang
 
QButtonGroup * m_extractModeGroup
 
QButtonGroup * m_optimizeLangGroup
 
QCheckBox * m_crossRef
 
Wizardm_wizard
 
const QHash< QString, Input * > & m_modelData
 

Detailed Description

Definition at line 136 of file wizard.h.

Constructor & Destructor Documentation

Step2::Step2 ( Wizard parent,
const QHash< QString, Input * > &  modelData 
)

Definition at line 736 of file wizard.cpp.

737  : m_wizard(wizard), m_modelData(modelData)
738 {
739  QRadioButton *r;
740  QVBoxLayout *layout = new QVBoxLayout(this);
741 
742  //---------------------------------------------------
743  m_extractModeGroup = new QButtonGroup(this);
744  m_extractMode = new QGroupBox(this);
745  m_extractMode->setTitle(tr("Select the desired extraction mode:"));
746  QGridLayout *gbox = new QGridLayout( m_extractMode );
747  r = new QRadioButton(tr("Documented entities only"));
748  r->setChecked(true);
749  m_extractModeGroup->addButton(r, 0);
750  gbox->addWidget(r,1,0);
751  // 1 -> EXTRACT_ALL = NO
752  r = new QRadioButton(tr("All Entities"));
753  m_extractModeGroup->addButton(r, 1);
754  gbox->addWidget(r,2,0);
755  // 2 -> EXTRACT_ALL = YES
756  m_crossRef = new QCheckBox(m_extractMode);
757  m_crossRef->setText(tr("Include cross-referenced source code in the output"));
758  // m_crossRef -> SOURCE_BROWSER = YES/NO
759  gbox->addWidget(m_crossRef,3,0);
760  layout->addWidget(m_extractMode);
761 
762  //---------------------------------------------------
763  QFrame *f = new QFrame( this );
764  f->setFrameStyle( QFrame::HLine | QFrame::Sunken );
765  layout->addWidget(f);
766 
767  m_optimizeLangGroup = new QButtonGroup(this);
768  m_optimizeLang = new QGroupBox(this);
769  m_optimizeLang->setTitle(tr("Select programming language to optimize the results for"));
770  gbox = new QGridLayout( m_optimizeLang );
771 
772  r = new QRadioButton(m_optimizeLang);
773  r->setText(tr("Optimize for C++ output"));
774  r->setChecked(true);
775  m_optimizeLangGroup->addButton(r, 0);
776  // 0 -> OPTIMIZE_OUTPUT_FOR_C = NO
777  // OPTIMIZE_OUTPUT_JAVA = NO
778  // OPTIMIZE_FOR_FORTRAN = NO
779  // OPTIMIZE_OUTPUT_VHDL = NO
780  // CPP_CLI_SUPPORT = NO
781  // HIDE_SCOPE_NAMES = NO
782  gbox->addWidget(r,0,0);
783  r = new QRadioButton(tr("Optimize for C++/CLI output"));
784  gbox->addWidget(r,1,0);
785  m_optimizeLangGroup->addButton(r, 1);
786  // 1 -> OPTIMIZE_OUTPUT_FOR_C = NO
787  // OPTIMIZE_OUTPUT_JAVA = NO
788  // OPTIMIZE_FOR_FORTRAN = NO
789  // OPTIMIZE_OUTPUT_VHDL = NO
790  // CPP_CLI_SUPPORT = YES
791  // HIDE_SCOPE_NAMES = NO
792  r = new QRadioButton(tr("Optimize for Java or C# output"));
793  m_optimizeLangGroup->addButton(r, 2);
794  // 2 -> OPTIMIZE_OUTPUT_FOR_C = NO
795  // OPTIMIZE_OUTPUT_JAVA = YES
796  // OPTIMIZE_FOR_FORTRAN = NO
797  // OPTIMIZE_OUTPUT_VHDL = NO
798  // CPP_CLI_SUPPORT = NO
799  // HIDE_SCOPE_NAMES = NO
800  gbox->addWidget(r,2,0);
801  r = new QRadioButton(tr("Optimize for C or PHP output"));
802  m_optimizeLangGroup->addButton(r, 3);
803  // 3 -> OPTIMIZE_OUTPUT_FOR_C = YES
804  // OPTIMIZE_OUTPUT_JAVA = NO
805  // OPTIMIZE_FOR_FORTRAN = NO
806  // OPTIMIZE_OUTPUT_VHDL = NO
807  // CPP_CLI_SUPPORT = NO
808  // HIDE_SCOPE_NAMES = YES
809  gbox->addWidget(r,3,0);
810  r = new QRadioButton(tr("Optimize for Fortran output"));
811  m_optimizeLangGroup->addButton(r, 4);
812  // 4 -> OPTIMIZE_OUTPUT_FOR_C = NO
813  // OPTIMIZE_OUTPUT_JAVA = NO
814  // OPTIMIZE_FOR_FORTRAN = YES
815  // OPTIMIZE_OUTPUT_VHDL = NO
816  // CPP_CLI_SUPPORT = NO
817  // HIDE_SCOPE_NAMES = NO
818  gbox->addWidget(r,4,0);
819  r = new QRadioButton(tr("Optimize for VHDL output"));
820  m_optimizeLangGroup->addButton(r, 5);
821  // 5 -> OPTIMIZE_OUTPUT_FOR_C = NO
822  // OPTIMIZE_OUTPUT_JAVA = NO
823  // OPTIMIZE_FOR_FORTRAN = NO
824  // OPTIMIZE_OUTPUT_VHDL = YES
825  // CPP_CLI_SUPPORT = NO
826  // HIDE_SCOPE_NAMES = NO
827  gbox->addWidget(r,5,0);
828 
829  layout->addWidget(m_optimizeLang);
830  layout->addStretch(1);
831 
832  connect(m_crossRef,SIGNAL(stateChanged(int)),
833  SLOT(changeCrossRefState(int)));
834  connect(m_optimizeLangGroup,SIGNAL(buttonClicked(int)),
835  SLOT(optimizeFor(int)));
836  connect(m_extractModeGroup,SIGNAL(buttonClicked(int)),
837  SLOT(extractMode(int)));
838 }
QGroupBox * m_optimizeLang
Definition: wizard.h:150
void changeCrossRefState(int choice)
Definition: wizard.cpp:856
QGroupBox * m_extractMode
Definition: wizard.h:149
const QHash< QString, Input * > & m_modelData
Definition: wizard.h:155
def connect(nxgraph, k1, k2, p1=0, p2=0, kwds)
Definition: graph.py:30
QButtonGroup * m_extractModeGroup
Definition: wizard.h:151
void optimizeFor(int choice)
Definition: wizard.cpp:841
Wizard * m_wizard
Definition: wizard.h:154
QCheckBox * m_crossRef
Definition: wizard.h:153
void extractMode(int choice)
Definition: wizard.cpp:851
QButtonGroup * m_optimizeLangGroup
Definition: wizard.h:152

Member Function Documentation

void Step2::changeCrossRefState ( int  choice)
privateslot

Definition at line 856 of file wizard.cpp.

857 {
858  updateBoolOption(m_modelData,STR_SOURCE_BROWSER,choice==Qt::Checked);
859 }
static void updateBoolOption(const QHash< QString, Input * > &model, const QString &name, bool bNew)
Definition: wizard.cpp:124
const QHash< QString, Input * > & m_modelData
Definition: wizard.h:155
#define STR_SOURCE_BROWSER
Definition: wizard.cpp:41
void Step2::extractMode ( int  choice)
privateslot

Definition at line 851 of file wizard.cpp.

852 {
854 }
static void updateBoolOption(const QHash< QString, Input * > &model, const QString &name, bool bNew)
Definition: wizard.cpp:124
const QHash< QString, Input * > & m_modelData
Definition: wizard.h:155
#define STR_EXTRACT_ALL
Definition: wizard.cpp:40
void Step2::init ( )

Definition at line 861 of file wizard.cpp.

862 {
863  m_extractModeGroup->button(
864  getBoolOption(m_modelData,STR_EXTRACT_ALL) ? 1 : 0)->setChecked(true);
866 
867  int x=0;
873  m_optimizeLangGroup->button(x)->setChecked(true);
874 }
#define STR_OPTIMIZE_OUTPUT_JAVA
Definition: wizard.cpp:35
#define STR_OPTIMIZE_FOR_FORTRAN
Definition: wizard.cpp:36
const QHash< QString, Input * > & m_modelData
Definition: wizard.h:155
#define STR_CPP_CLI_SUPPORT
Definition: wizard.cpp:38
QButtonGroup * m_extractModeGroup
Definition: wizard.h:151
#define STR_EXTRACT_ALL
Definition: wizard.cpp:40
QCheckBox * m_crossRef
Definition: wizard.h:153
#define STR_OPTIMIZE_OUTPUT_FOR_C
Definition: wizard.cpp:34
#define STR_OPTIMIZE_OUTPUT_VHDL
Definition: wizard.cpp:37
list x
Definition: train.py:276
#define STR_SOURCE_BROWSER
Definition: wizard.cpp:41
static bool getBoolOption(const QHash< QString, Input * > &model, const QString &name)
Definition: wizard.cpp:100
QButtonGroup * m_optimizeLangGroup
Definition: wizard.h:152
void Step2::optimizeFor ( int  choice)
privateslot

Definition at line 841 of file wizard.cpp.

842 {
843  for (int i=0;i<6;i++)
844  {
847  g_optimizeMapping[choice][i]);
848  }
849 }
static void updateBoolOption(const QHash< QString, Input * > &model, const QString &name, bool bNew)
Definition: wizard.cpp:124
const QHash< QString, Input * > & m_modelData
Definition: wizard.h:155
static bool g_optimizeMapping[6][6]
Definition: wizard.cpp:65
static QString g_optimizeOptionNames[6]
Definition: wizard.cpp:82

Member Data Documentation

QCheckBox* Step2::m_crossRef
private

Definition at line 153 of file wizard.h.

QGroupBox* Step2::m_extractMode
private

Definition at line 149 of file wizard.h.

QButtonGroup* Step2::m_extractModeGroup
private

Definition at line 151 of file wizard.h.

const QHash<QString,Input *>& Step2::m_modelData
private

Definition at line 155 of file wizard.h.

QGroupBox* Step2::m_optimizeLang
private

Definition at line 150 of file wizard.h.

QButtonGroup* Step2::m_optimizeLangGroup
private

Definition at line 152 of file wizard.h.

Wizard* Step2::m_wizard
private

Definition at line 154 of file wizard.h.


The documentation for this class was generated from the following files: