auto_dirvers_fatie::auto_dirvers_fatie(QWidget *parent)
	: QMainWindow(parent),m_control_stop(false)
{
    //QString t = calKey("gycsjf123", "610520");
	ui.setupUi(this);
	initializeControls(); // 初始化控件
	initializeConncetions(); // 初始化信号槽
}
Beispiel #2
0
bool CC3Layer::init()
{
	m_shouldTrackViewSize = true;		// Could be overridden during init if contentSize set to something other than view size
	super::init();
	m_shouldAlwaysUpdateViewport = false;
	initializeControls();

	return true;
}
returnValue OptimizationAlgorithmBase::initializeControls( const char* fileName)
{
	VariablesGrid tmp = fopen( fileName,"r" );
	
	if ( tmp.isEmpty() == BT_TRUE )
		return RET_FILE_CAN_NOT_BE_OPENED;

    return initializeControls(tmp);
}
bool AppearanceOptions::initialize(void)
{
	if(m_bInitialized)
		shutdown();

	initializeControls();

	m_bInitialized = true;
	return m_bInitialized;
}
Beispiel #5
0
/**************************************************
* MAIN
**************************************************/
int main(void)
{
  WDTCTL = WDTPW + WDTHOLD;             // Stop watchdog timer
  P2SEL = 0x00;                         // Sets Port 2 for usage
  P1DIR = 0x00;
  P2DIR = 0x00;
  initializeControls();
  initializeDisplay();
  EEPromInit();
  mainMenu();


  return 0;
}
Beispiel #6
0
InputDialog::InputDialog(QWidget* parent) :
#ifdef AVOGADRO
   QDialog(parent),
#else
   QMainWindow(parent),
#endif
   m_molecule(0),
   m_fileIn(""),
   m_fileOut(""),
   m_db(OptionDatabase::instance()),
   m_reg(OptionRegister::instance()),
   m_taint(false),
   m_currentJob(0),
   m_currentProcess(0),
   m_avogadro(0),
   m_processMonitor(0),
   m_processQueue(0) {

   m_ui.setupUi(this);

#ifdef AVOGADRO
   const QIcon icon0 = QIcon(QString::fromUtf8(":/icons/edit_remove.png"));
   m_ui.deleteJobButton->setIcon(icon0);
   const QIcon icon1 = QIcon(QString::fromUtf8(":/icons/edit_add.png"));
   m_ui.addJobButton->setIcon(icon1);
#else
   m_ui.qui_coordinates->hide();
   m_ui.label_coordinates->hide();
   initializeMenus();
#endif

   InitializeQChemLogic();
   initializeQuiLogic();
   initializeControls();

   resize(Preferences::MainWindowSize());

   QFileInfo file(Preferences::LastFileAccessed());
   file.setFile(file.dir(),"untitled.inp");
   Preferences::LastFileAccessed(file.filePath());

   setWindowTitle("QChem Input File Editor - " + file.fileName());


   m_ui.previewText->setCurrentFont(Preferences::PreviewFont());

   on_addJobButton_clicked(true);
   m_processQueue = new Process::Queue(this, 1);
}
Beispiel #7
0
CTTToeView::CTTToeView()
{ 	
	aiThread = nullptr;
	handleInitialized = false;

	fieldStyles.push_back(FieldStyle(DSI_FIELD_BACKGROUND_SETS, DSI_FIELD_FRAME_SETS, DSI_CELL_USER_SETS, DSI_CELL_AI_SETS, DSI_CELL_EMPTY_SETS));
	fieldStyles.push_back(FieldStyle(DSI_FIELD_BACKGROUND_SETS_2, DSI_FIELD_FRAME_SETS_2, DSI_CELL_USER_SETS_2, DSI_CELL_AI_SETS_2, DSI_CELL_EMPTY_SETS_2));

	settings.emptyIndex = DSI_CELL_EMPTY_SETS;
	settings.xIndex = DSI_CELL_USER_SETS;
	settings.oIndex = DSI_CELL_AI_SETS;

	settings.showtrack = true;
	settings.convex = false;
	settings.distCellHalf = 1;
	settings.distSub = 0;
	settings.backgroundIndex = DSI_BACKGROUND_SETS;
	settings.fieldBackgroundIndex = DSI_FIELD_BACKGROUND_SETS;
	settings.fieldSize = 20;
	settings.fieldULX = 20;
	settings.fieldULY = 20;
	settings.frameExists = true;
	settings.frameColPos = DSI_FIELD_FRAME_SETS;
	settings.frameMargin = 2;
	settings.frameWidth = 1;
	settings.grow = false;
	settings.numOfSubCells = 1;
	settings.posnum = 12;
	settings.separatingLinesExist = true;
	settings.separatingLineWidth = 1;
	settings.separatingLineIndex = DSI_FIELD_FRAME_SETS; 
	int* sizes = new int[12];
	settings.subCellSizes = sizes;
	settings.setSizes(1, 16);
	settings.fieldStyleInd = 0;

	settings.cellMonochrome = false;

	settingsVector.push_back(settings);

	Settings settings2 = settings;
	settings2.fieldStyleInd = 1;

	settingsVector.push_back(settings2);

	Settings settings3 = settings;
	settings3.setSizes(1,5);
	settings3.numOfSubCells = 3;

	settingsVector.push_back(settings3);

	Settings settings4 = settings3;
	settings4.fieldStyleInd = 1;

	settingsVector.push_back(settings4);

	Settings settings5 = settings;
	settings5.grow = true;

	settingsVector.push_back(settings5);

	Settings settings6 = settings5;
	settings6.fieldStyleInd = 1;

	settingsVector.push_back(settings6);

	Settings settings7 = settings;
	settings7.numOfSubCells = 3;
	settings7.setSizes(1,5);
	settings7.grow = true;

	settingsVector.push_back(settings7);

    Settings settings8 = settings;
	settings8.fieldSize = 19;
	settings8.numOfSubCells = 16;
	settings8.setSizes(1,1);

	settingsVector.push_back(settings8);

    Settings settings9 = settings;

	settings9.fieldBackgroundIndex = DSI_BACKGROUND_SETS;
	settings9.frameExists = false;
	settings9.separatingLinesExist = false;
	settings9.fieldStyleInd = 1;

	settingsVector.push_back(settings9);

    Settings settings10 = settings9;
	
	settings10.distCellHalf = 0;

	settingsVector.push_back(settings10);

	Settings settings11 = settings10;
	
	settings11.grow = true;

	settingsVector.push_back(settings11);

	GlobalSettings::settingsInd = 0;
	GlobalSettings::aiSettings.winCombLength = 5;
    GlobalSettings::aiSettings.randDif = 30.0;
	GlobalSettings::aiSettings.level.depth = 7;
	GlobalSettings::aiSettings.level.baseSelNum = 10;
	GlobalSettings::aiSettings.level.selNum = 5;

	GlobalSettings::aiSettings.coeficients.push_back(0.0);
	GlobalSettings::aiSettings.coeficients.push_back(10000000000.0);
	GlobalSettings::aiSettings.coeficients.push_back(100000000.0);
	GlobalSettings::aiSettings.coeficients.push_back(1000000.0);
	GlobalSettings::aiSettings.coeficients.push_back(10000.0);
	GlobalSettings::aiSettings.coeficients.push_back(10.0);

	field = new Field();
	field->initialize(&settings, Point(settings.fieldULX, settings.fieldULY, 0), &DS);
	field->rateField->fld = field;	
	objectsToDelete.push_back(field);
	//field->setMode(Field::MODE_MOVE);

	Graphics::drawSets = &DS;

	Clr backgroundClr(255,255,255);

	GlobalSettings::backgroundClr = backgroundClr;
	GlobalSettings::menuWidth = 200;

	initializeControls();
	initializeDrawSet();

	GlobalSettings::gameLevel = 4;

	gameLevels.push_back(GameLevel(1,1,1));
	gameLevels.push_back(GameLevel(3,15,9));	
	gameLevels.push_back(GameLevel(5,10,5));
	gameLevels.push_back(GameLevel(5,15,9));
	gameLevels.push_back(GameLevel(7,10,5));
	gameLevels.push_back(GameLevel(7,15,9));
	gameLevels.push_back(GameLevel(9,10,5));

	srand((unsigned int)time(0));
}