예제 #1
0
QtPreferencesDialog::QtPreferencesDialog(bool aCustomDirectoryActiveFlag,
		const QString& aCustomDirectoryName,
		bool anUseFShiftClickFlag,
		bool anAlwaysUseFShiftClickFlag,
		int anFShiftDelay,
		bool aShowToolTipFlag,
		bool anUseFontFlag,
		bool aShowCatalogMenusFlag,
		bool aCloseCatalogMenusFlag,
		bool aDisplayAsStackClickFlag,
		const QString& aSerialPortName,
		QWidget* aParent)
: QDialog(aParent)
{
	setWindowTitle(PREFERENCES_TITLE);
	buildComponents(aCustomDirectoryActiveFlag,
			aCustomDirectoryName,
			anUseFShiftClickFlag,
			anAlwaysUseFShiftClickFlag,
			aShowToolTipFlag,
			anUseFontFlag,
			aShowCatalogMenusFlag,
			aCloseCatalogMenusFlag,
			aDisplayAsStackClickFlag,
			anFShiftDelay,
			aSerialPortName);
}
예제 #2
0
StripToolVariable::StripToolVariable(StripToolVariableInfo *info, QObject *parent) :
    QObject(parent)
{
    info_ = 0;
    data_ = 0;
    series_ = 0;

    setInfo(info);

    buildComponents();
    makeConnections();
    defaultSettings();

    qDebug() << "StripToolVariable object created.";
}
예제 #3
0
void 
CEntityBuilder::BuildEntity( TiXmlElement *pParent, EntityManager &em, Resources *pResources){
  // Create entity (new id)
  Entity *ent = em.createEntity();
  if ( !ent){
    LOG2ERR<<"Could not create entity\n";
    throw "Could not create entity";
  }
  TiXmlElement* pChilds = pParent->FirstChildElement( "tags");
  if ( pChilds ){
    // Add tags
    for(pChilds=pChilds->FirstChildElement( "tag" ); pChilds; pChilds = pChilds->NextSiblingElement() ){
      std::string name;
      if ( TIXML_SUCCESS == pChilds->QueryValueAttribute( "name", &name))
      {
        std::string unique;
        bool        isUnique(false);
        if ( TIXML_SUCCESS == pChilds->QueryValueAttribute( "unique", &unique) ){
          isUnique = ( unique=="true");
        }
        em.tagEntity( ent, name, isUnique);
      }
    }
  }
  
  // Add components
  pChilds = pParent->FirstChildElement( "components");
  if ( pChilds ){
    for( pChilds=pChilds->FirstChildElement( "component" ); pChilds; pChilds = pChilds->NextSiblingElement() ){
      std::string type; 
      if ( TIXML_SUCCESS == pChilds->QueryValueAttribute( "type", &type)){
        //LOG2 <<name<<"\n";
        buildComponents(pChilds, type, ent, pResources);
      }
      else {
        LOG2ERR<<"Attribute [type] not found\n";
      }
    }
  }
}
예제 #4
0
StripTool::StripTool(QWidget *parent) : QWidget(parent)
{
	appDirectory_ = 0;

	model_ = 0;
	mainView_ = 0;
	importer_ = 0;
	exporter_ = 0;
	editor_ = 0;

	setAppDirectory(QDir(QDir::homePath()).filePath("StripTool"));

	buildComponents();
	makeConnections();
	defaultSettings();

	QVBoxLayout *windowLayout = new QVBoxLayout();
	windowLayout->addWidget(mainView_);

	setLayout(windowLayout);
	resize(800, 500);

	qDebug() << "StripTool object created.";
}