Beispiel #1
0
bool UniPAX::PublicationXref::getAttribute(std::vector<std::pair<std::string,std::string> >& value, PersistenceManager& manager) {

	if (!UniPAX::Xref::getAttribute(value, manager))
		return false;

	std::string tmp = "";
	if (!PersistenceManager::convertAttribute(year, tmp))
	{
		return false;
	}
	if (year != 0)
		value.push_back(std::pair<std::string,std::string>("year", tmp));
	tmp.clear();
	{
		std::vector<std::string>::iterator it;
		for (it = url.begin(); it != url.end(); it++)
			value.push_back(std::pair<std::string,std::string>("url", *it));
	}
	if (!getTitle().empty())
		value.push_back(std::pair<std::string,std::string>("title", getTitle()));
	{
		std::vector<std::string>::iterator it;
		for (it = source.begin(); it != source.end(); it++)
			value.push_back(std::pair<std::string,std::string>("source", *it));
	}
	{
		std::vector<std::string>::iterator it;
		for (it = author.begin(); it != author.end(); it++)
			value.push_back(std::pair<std::string,std::string>("author", *it));
	}

	return true;

}
//Print method
void BookRecord::print()const
{

	string tempTitle, tempAuthor, tempPublisher;
		
	if(getTitle().length() > 22)
		tempTitle = getTitle().substr(0,22);
	else
		tempTitle = getTitle();
	
	if(getAuthor().length() > 22)
		tempAuthor = getAuthor().substr(0,22);
	else
		tempAuthor = getAuthor();
	
	if(getPublisher().length() > 22)
		tempPublisher = getPublisher().substr(0,22);
	else
		tempPublisher = getPublisher();
	
	//Re-initialize our output settings
	cout.setf(ios::left, ios::adjustfield);
	cout << setfill(' ');
	
	//Print the title, author, and publisher
	cout << setw(22) << tempTitle << " ";
	cout << setw(22) << tempAuthor << " "; 
	cout << setw(22) << tempPublisher << " ";
	
	//Prints the ISBN number
	cout.setf(ios::right, ios::adjustfield);
	cout << setw(10) << setfill('0') << getISBN();
	cout << setfill(' ') << " ";

}
void Project::setMissingAudioPluginDefaultValues()
{
    const String sanitisedProjectName (CodeHelpers::makeValidIdentifier (getTitle(), false, true, false));

    setValueIfVoid (shouldBuildVST(),                   true);
    setValueIfVoid (shouldBuildVST3(),                  false);
    setValueIfVoid (shouldBuildAU(),                    true);
    setValueIfVoid (shouldBuildAUv3(),                  false);
    setValueIfVoid (shouldBuildRTAS(),                  false);
    setValueIfVoid (shouldBuildAAX(),                   false);
    setValueIfVoid (shouldBuildStandalone(),            false);

    setValueIfVoid (getPluginName(),                    getTitle());
    setValueIfVoid (getPluginDesc(),                    getTitle());
    setValueIfVoid (getPluginManufacturer(),            "yourcompany");
    setValueIfVoid (getPluginManufacturerCode(),        "Manu");
    setValueIfVoid (getPluginCode(),                    makeValid4CC (getProjectUID() + getProjectUID()));
    setValueIfVoid (getPluginChannelConfigs(),          String());
    setValueIfVoid (getPluginIsSynth(),                 false);
    setValueIfVoid (getPluginWantsMidiInput(),          false);
    setValueIfVoid (getPluginProducesMidiOut(),         false);
    setValueIfVoid (getPluginIsMidiEffectPlugin(),      false);
    setValueIfVoid (getPluginEditorNeedsKeyFocus(),     false);
    setValueIfVoid (getPluginAUExportPrefix(),          sanitisedProjectName + "AU");
    setValueIfVoid (getPluginRTASCategory(),            String());
    setValueIfVoid (getBundleIdentifier(),              getDefaultBundleIdentifier());
    setValueIfVoid (getAAXIdentifier(),                 getDefaultAAXIdentifier());
    setValueIfVoid (getPluginAAXCategory(),             "AAX_ePlugInCategory_Dynamics");
}
Beispiel #4
0
struct titleInfoRec *readTitleInfo ( FILE *dbFp, long offset, TitleID searchKey )  
{ 
  char *line ; 
  int len ;
  struct titleInfoRec *head = NULL, *tail = NULL, *lrec = NULL ; 
  TitleID titleKey ;

  (void) fseek ( dbFp, offset, SEEK_SET ) ;

  titleKey = getTitle ( dbFp ) ;

  while ( feof ( dbFp ) == 0 && titleKey == searchKey ) 
  { 
    len = getByte ( dbFp ) ;
    line = getString ( len, dbFp ) ;
    lrec = newTitleInfoRec ( ) ;
    lrec -> text = line ; 
    lrec -> attrKey = getAttr ( dbFp ) ;
    lrec -> next = NULL ; 
    if ( head == NULL ) 
      head = lrec ; 
    else 
      tail -> next = lrec ; 
    tail = lrec ; 
    titleKey = getTitle ( dbFp ) ;
  } 
  return ( head ) ; 
} 
Beispiel #5
0
bool UniPAX::PublicationXref::merge(PublicationXref& object)
{
	if (!object.getYear() != 0)
	{
		if (!getYear() != 0)
		{
			if (getYear() != object.getYear())
			{
				std::cerr << "Error during merging: UniPAX::PublicationXref::year not equal ..."
						<< getYear() << " != " << object.getYear() << std::endl;
				return false;
			}
		}
		else
			setYear(object.getYear());
	}
	{
		std::set<std::string> tmp(getUrls().begin(), getUrls().end());
		for (std::vector<std::string>::iterator it = object.getUrls().begin(); it != object.getUrls().end(); it++)
		{
			tmp.insert(*it);
		}
		getUrls().assign(tmp.begin(), tmp.end());
	}
	if (!object.getTitle().empty())
	{
		if (!getTitle().empty())
		{
			if (getTitle() != object.getTitle())
			{
				std::cerr << "Error during merging: UniPAX::PublicationXref::title not equal ..."
						<< getTitle() << " != " << object.getTitle() << std::endl;
				return false;
			}
		}
		else
			setTitle(object.getTitle());
	}
	{
		std::set<std::string> tmp(getSources().begin(), getSources().end());
		for (std::vector<std::string>::iterator it = object.getSources().begin(); it != object.getSources().end(); it++)
		{
			tmp.insert(*it);
		}
		getSources().assign(tmp.begin(), tmp.end());
	}
	{
		std::set<std::string> tmp(getAuthors().begin(), getAuthors().end());
		for (std::vector<std::string>::iterator it = object.getAuthors().begin(); it != object.getAuthors().end(); it++)
		{
			tmp.insert(*it);
		}
		getAuthors().assign(tmp.begin(), tmp.end());
	}

	return UniPAX::Xref::merge(object);
}
Beispiel #6
0
void HTMLEditor::writeHeader()
{
    out << "<HEAD>" << endl;
    out << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">" << endl;
    out << "<META NAME=\"Description\" CONTENT=\"" + getTitle() + "\">" << endl;
    out << "<TITLE>" + getTitle() + "</TITLE>" << endl;
    out << "</HEAD>" << endl;
    out << "<H2 align=center>Vodafone SMS Competition Results</H2>" << endl;
    out << "<BODY TEXT=\"#000000\" BGCOLOR=red COLOR=white>\n" <<endl;
    out << "<TABLE border=1 align=center cellpadding=5>\n" <<endl;
}
Beispiel #7
0
void getEff2(TH1D* h1, TH1D* h2, bool isData, TString varType, TString INPUTDIR_PREFIX, double from, double to) {
   
   gStyle->SetOptTitle(0);
   gStyle->SetEndErrorSize(2);
   gStyle->SetErrorX(0.5);
   
   TLegend* leg = MakeLegend();
   TPaveText* pt = MakeTPave();
   
   TCanvas* c1 = new TCanvas("c1","c1",800,600);
   c1->cd();
   if (varType != "rapidity") c1->SetLogx();
   h1->SetMarkerSize(0);
   h1->SetLineWidth(1.2);
   //range
   if (varType == "pt") h1->GetXaxis()->SetRangeUser(8,180);
   else if (varType == "vtx") h1->GetXaxis()->SetRangeUser(0,20.4);
   else if (varType == "mass") h1->GetXaxis()->SetRangeUser(15, 999);
   h1->GetYaxis()->SetRangeUser(from,to);
   h1->GetXaxis()->SetMoreLogLabels();
   h1->GetYaxis()->SetTitle("#epsilon");
   h1->SetLineColor(kRed);
   h1->SetFillColor(kRed);
   if (!isData) {
     h2->SetLineColor(kGreen+1);
     h2->SetFillColor(kGreen+1);
     h2->SetFillStyle(3144);
   } else {
     h2->SetMarkerStyle(20);
   }
   
   //if you compare data to data
   h1->Draw("E2");
   h1->GetXaxis()->SetTitle(getTitle(varType,true));
   if (!isData) {
     h2->Draw("E2same");
   } else {
     h2->Draw("PEsame");
   }
   leg->AddEntry(h1,"MC, combined PF iso","f");
   if (!isData) {
     leg->AddEntry(h2,"MC, PF iso no e-#gamma","f");
   } else {
     leg->AddEntry(h2,"T&P data","pl");
   }
   leg->Draw("same");
   //if (dataOnly && !(varType == "rrr")) pt->Draw("same");
   //if (varType == "pt") c1->SetLogx();
   //Save
   c1->SaveAs(INPUTDIR_PREFIX+"/"+h1->GetName()+getTitle(varType,true)+".png");

}
Beispiel #8
0
    void Frame::repaint()
    {
        if (this->__g == NULL) return;
        /* 矩形ウィンドウ */
        int w = getWidth();
        int h = getHeight();
        /* 外枠 */
        __g->setColor(Color::lightGray);
        __g->fillRect(0, 0, w, h);
        __g->setColor(Color::black);
        __g->drawRect(0, 0, w, h);
        /* 内枠 */
        __g->setColor(Color::black);
        __g->drawRect(5, 21, w - 10, h - 26);

        /* 枠 */
        __g->setColor(Color::white);
        __g->drawLine(1, 1, w - 2, 1);
        __g->drawLine(1, 1, 1, h - 2);
        __g->drawLine(w - 5, 21, w - 5, h - 5);
        __g->drawLine(5, h - 5, w - 5, h - 5);
        __g->setColor(Color::gray);
        __g->drawLine(w - 2, 2, w - 2, h - 2);
        __g->drawLine(2, h - 2, w - 2, h - 2);
        __g->drawLine(4, 20, w - 6, 20);
        __g->drawLine(4, 20, 4, h - 6);

        if (getFocused() == true) {
            /* タイトルバー */
            for (int i = 4; i <= 14; i = i + 2) {
                __g->setColor(Color::gray);
                __g->drawLine(20, i, w - 7, i);
                __g->setColor(Color::white);
                __g->drawLine(21, i + 1, w - 6, i + 1);
            }
            drawCloseButton(__g);
        }

        /* タイトル */
        int fw = getFontMetrics()->getWidth(getTitle());
        int fh = getFontMetrics()->getHeight(getTitle());
        __g->setColor(Color::lightGray);
        __g->fillRect(((w - fw) / 2) - 4, 2, fw + 8, getInsets()->top - 4);
        if (getFocused() == true) {
            __g->setColor(Color::black);
        } else {
            __g->setColor(Color::gray);
        }
        __g->drawString(getTitle(), ((w - fw) / 2), ((getInsets()->top - fh) / 2));
        Container::repaint();
    }
Beispiel #9
0
void getEff1(TH1D* h1, bool isData, TString varType, TString INPUTDIR_PREFIX, double from, double to) {

   gStyle->SetOptTitle(0);
   gStyle->SetEndErrorSize(2);
   gStyle->SetErrorX(0.5);

   TLegend* leg = MakeLegend();
   TPaveText* pt = MakeTPave();

   TCanvas* c1 = new TCanvas("c1","c1",800,600);
   c1->cd();
   if (varType != "rapidity") c1->SetLogx();
   h1->SetMarkerSize(0);
   h1->SetLineWidth(1.2);
   //range
   if (varType == "pt") h1->GetXaxis()->SetRangeUser(8,180);
   else if (varType == "vtx") h1->GetXaxis()->SetRangeUser(0,20.4);
   else if (varType == "mass") h1->GetXaxis()->SetRangeUser(15, 999);
   h1->GetYaxis()->SetRangeUser(from,to);
   h1->GetXaxis()->SetMoreLogLabels();
   h1->GetYaxis()->SetTitle("#epsilon");
   if (!isData) {
     h1->SetLineColor(kRed);
     h1->SetFillColor(kRed);
   } else {
     h1->SetMarkerStyle(20);
   } 

   //if you compare data to data
   if (!isData) {
     h1->Draw("E2");
   } else {
     h1->Draw("PE"); 
   }
   cout << "WARNING: I hardcode that this is used for T&P" << endl;
   h1->GetXaxis()->SetTitle(getTitle(varType,true));
   if (!isData) {
     leg->AddEntry(h1,"MC","f");
   } else {
     leg->AddEntry(h1,"MC","pl");
   }
   //leg->Draw("COLZsame");
   //if (dataOnly && !(varType == "rrr")) pt->Draw("same");
   //if (varType == "pt") c1->SetLogx();
   //Save
   c1->SaveAs(INPUTDIR_PREFIX+"/"+h1->GetName()+getTitle(varType, true)+".png");

}
  void IndexArticle::readEntriesB()
  {
    try
    {
      zim::size_type categoryCount[4];
      zim::Blob b = getData();
      ptrstream data(const_cast<char*>(b.data()), const_cast<char*>(b.end()));
      for (unsigned c = 0; c < 4; ++c)
        categoryCount[c] = getSizeValue(data);

      for (unsigned c = 0; c < 4; ++c)
      {
        log_debug("read " << categoryCount[c] << " entries for category " << c);
        for (unsigned n = 0; n < categoryCount[c]; ++n)
        {
          Entry entry;
          entry.index = getSizeValue(data);
          if (getNamespace() == 'X')
            entry.pos = getNamespace() ? getSizeValue(data) : 0;
          entries[c].push_back(entry);
        }
      }
    }
    catch (const Eof&)
    {
      log_error("end of file when reading index entries for article " << getTitle());
      return;
    }
  }
GtkWidget * AP_UnixDialog_ListRevisions::constructWindow ()
{
  GtkWidget *ap_UnixDialog_ListRevisions;
  GtkWidget *vbDialog;
  GtkWidget *aaDialog;
	
  ap_UnixDialog_ListRevisions = abiDialogNew ( "list revisions dialog", TRUE, getTitle());	
	
  gtk_window_set_modal (GTK_WINDOW (ap_UnixDialog_ListRevisions), TRUE);
  gtk_window_set_default_size ( GTK_WINDOW(ap_UnixDialog_ListRevisions), 800, 450 ) ;

  vbDialog = gtk_dialog_get_content_area(GTK_DIALOG(ap_UnixDialog_ListRevisions));
  gtk_widget_show (vbDialog);
  gtk_container_set_border_width (GTK_CONTAINER (vbDialog), 5);

  aaDialog = gtk_dialog_get_action_area(GTK_DIALOG(ap_UnixDialog_ListRevisions));
  gtk_widget_show (aaDialog);

  constructWindowContents ( vbDialog ) ;

  abiAddStockButton ( GTK_DIALOG(ap_UnixDialog_ListRevisions), GTK_STOCK_CANCEL, BUTTON_CANCEL ) ;
  abiAddStockButton ( GTK_DIALOG(ap_UnixDialog_ListRevisions), GTK_STOCK_OK, BUTTON_OK ) ;

  return ap_UnixDialog_ListRevisions;
}
Beispiel #12
0
void GraphEditor::handleAddBlock(const Poco::JSON::Object::Ptr &blockDesc, const QPointF &where)
{
    if (not blockDesc) return;
    auto draw = this->getCurrentGraphDraw();
    auto block = new GraphBlock(draw);
    block->setBlockDesc(blockDesc);

    QString hint;
    const auto title = block->getTitle();
    for (int i = 0; i < title.length(); i++)
    {
        if (i == 0 and title.at(i).isNumber()) hint.append(QChar('_'));
        if (title.at(i).isLetterOrNumber() or title.at(i).toLatin1() == '_')
        {
            hint.append(title.at(i));
        }
    }
    block->setId(this->newId(hint));

    //set highest z-index on new block
    block->setZValue(draw->getMaxZValue()+1);

    block->setPos(where);
    block->setRotation(0);
    handleStateChange(GraphState("list-add", tr("Create block %1").arg(title)));
}
Beispiel #13
0
void Playtree::onAppend( playlist_add_t *p_add )
{
    Iterator it_node = findById( p_add->i_node );
    if( it_node != m_children.end() )
    {
        playlist_Lock( m_pPlaylist );
        playlist_item_t *pItem =
            playlist_ItemGetById( m_pPlaylist, p_add->i_item );
        if( !pItem )
        {
            playlist_Unlock( m_pPlaylist );
            return;
        }

        int pos;
        for( pos = 0; pos < pItem->p_parent->i_children; pos++ )
            if( pItem->p_parent->pp_children[pos] == pItem ) break;

        UString *pName = getTitle( pItem->p_input );
        playlist_item_t* current = playlist_CurrentPlayingItem( m_pPlaylist );

        Iterator it = it_node->add(
            p_add->i_item, UStringPtr( pName ), false, pItem == current,
            false, pItem->i_flags & PLAYLIST_RO_FLAG, pos );

        m_allItems[pItem->i_id] = &*it;

        playlist_Unlock( m_pPlaylist );

        tree_update descr(
            tree_update::ItemInserted,
            IteratorVisible( it, this ) );
        notify( &descr );
    }
}
Beispiel #14
0
struct titleInfoRec *findTitleInfo ( FILE *dbFp, FILE *indexFp, TitleID titleKey )
{
  long upper, lower, mid, offset ;
  int found = FALSE ;
  TitleID indexKey ;

  (void) fseek ( indexFp, 0, SEEK_END ) ;
  upper = ftell ( indexFp ) / 6 ;
  lower = 0 ;
  found = FALSE ;
  while ( !found && upper >= lower )
  {
    mid = ( upper + lower ) / 2 ;
    (void) fseek ( indexFp, mid * 6, SEEK_SET ) ;
    indexKey = getTitle ( indexFp ) ;
    if ( titleKey == indexKey )
      found = TRUE ;
    else if ( indexKey < titleKey )
      lower = mid + 1 ;
    else
      upper = mid - 1 ;
  }
  if ( found )
  {
    offset = getOffset ( indexFp ) ;
    return ( readTitleInfo ( dbFp, offset, titleKey ) ) ;
  }
  else
    return ( NULL ) ;
}
Beispiel #15
0
const char *ComboBox::getSelectedTitle() const
{
  if (options.empty())
    return NULL;

  return getTitle(selected_entry);
}
Beispiel #16
0
QByteArray PageRenderer::render() const {
    QString res;
    res.append("<!DOCTYPE html>\n");
    res.append("<html>\n");

    // Head
    res.append("  <head>\n");
    res.append("    <title>"+getTitle()+"</title>\n");
    res.append(renderMetaTags());
    res.append(renderStylesheets());
    res.append(renderJavascripts());
    res.append("  </head>\n");

    // Body
    res.append("  <body");
    if (!_id.isEmpty())
        res.append(" id=\""+_id+"\"");
    res.append(">\n");

    res.append(_header->render());
    res.append(_body->render());
    res.append(_footer->render());

    res.append("  </body>\n");
    res.append("</html>");
    return res.toLatin1();
}
Beispiel #17
0
void BarWidget::setAlarmEnabled(bool enable)
{
    m_bar->setAlarmEnabled(enable);
    m_alarmEnable->setChecked(enable);
    m_alarmLevel->setEnabled(enable);
    emit scriptEvent(getTitle() + "_alarmEnabled");
}
HRESULT PlaybackControls::LoadFile()
{
	QPixmap picture;
	picture = getPicture(mFile);
	if (!picture.isNull())
	{
		mpParentWindow->id3Art->setPixmap(picture.scaledToHeight(128));
	}

	HRESULT hr = 0;
	if (!mpGraph)
	{
		if (FAILED(hr = InitialiseFilterGraph()))
			return hr;
	}

	if (!mGraphValid)
	{
		hr = mpGraph->RenderFile(mFile.toStdWString().c_str(), NULL);
		if (SUCCEEDED(hr))
		{
			QString metadata = getArtist(mFile);
			mpParentWindow->artistLabel->setText("Artist : " + metadata);
			metadata = getAlbum(mFile);
			mpParentWindow->albumLabel->setText("Album : " + metadata);
			metadata = getTitle(mFile);
			mpParentWindow->titleLabel->setText("Title : " + metadata);
			mGraphValid = true;
			setVolume(mVolume);
			emit volumeChanged(mVolume);
		}
		return hr;
	}
	return S_OK;
}
Beispiel #19
0
Playlist::Entries GME::fetchTracks(const QString &url, bool &ok)
{
	Playlist::Entries entries;
	if (open(url, true))
	{
		const int tracks = gme_track_count(m_gme);
		for (int i = 0; i < tracks; ++i)
		{
			gme_info_t *info = NULL;
			if (!gme_track_info(m_gme, &info, i) && info)
			{
				Playlist::Entry entry;
				entry.url = GMEName + QString("://{%1}%2").arg(m_url).arg(i);
				entry.name = getTitle(info, i);
				entry.length = getLength(info);
				gme_free_info(info);
				entries.append(entry);
			}
		}
		if (entries.length() > 1)
		{
			for (int i = 0; i < entries.length(); ++i)
				entries[i].parent = 1;
			Playlist::Entry entry;
			entry.name = Functions::fileName(m_url, false);
			entry.url = m_url;
			entry.GID = 1;
			entries.prepend(entry);
		}
	}
	ok = !entries.isEmpty();
	return entries;
}
Beispiel #20
0
BOOL LLFloaterAvatarTextures::postBuild()
{
	mBakedHead = (LLTextureCtrl*)getChildByName("baked_head");
	mBakedEyes = (LLTextureCtrl*)getChildByName("baked_eyes");
	mBakedUpper = (LLTextureCtrl*)getChildByName("baked_upper_body");
	mBakedLower = (LLTextureCtrl*)getChildByName("baked_lower_body");
	mBakedSkirt = (LLTextureCtrl*)getChildByName("baked_skirt");
	mHair = (LLTextureCtrl*)getChildByName("hair");
	mMakeup = (LLTextureCtrl*)getChildByName("head_bodypaint");
	mEye = (LLTextureCtrl*)getChildByName("eye_texture");
	mShirt = (LLTextureCtrl*)getChildByName("shirt");
	mUpperTattoo = (LLTextureCtrl*)getChildByName("upper_bodypaint");
	mUpperJacket = (LLTextureCtrl*)getChildByName("upper_jacket");
	mGloves = (LLTextureCtrl*)getChildByName("gloves");
	mUndershirt = (LLTextureCtrl*)getChildByName("undershirt");
	mPants = (LLTextureCtrl*)getChildByName("pants");
	mLowerTattoo = (LLTextureCtrl*)getChildByName("lower_bodypaint");
	mShoes = (LLTextureCtrl*)getChildByName("shoes");
	mSocks = (LLTextureCtrl*)getChildByName("socks");
	mJacket = (LLTextureCtrl*)getChildByName("jacket");
	mUnderpants = (LLTextureCtrl*)getChildByName("underpants");
	mSkirt = (LLTextureCtrl*)getChildByName("skirt_texture");
	mTitle = getTitle();

	childSetAction("Dump", onClickDump, this);

	refresh();
	return TRUE;
}
	json ApiSettingItem::infoToJson(bool aForceAutoValues) const noexcept {
		auto value = valueToJson(aForceAutoValues);

		// Serialize the setting
		json ret;
		ret["value"] = value.first;
		ret["key"] = name;
		ret["title"] = getTitle();
		if (value.second) {
			ret["auto"] = true;
		}

		if (unit.str != ResourceManager::LAST) {
			ret["unit"] = ResourceManager::getInstance()->getString(unit.str) + (unit.isSpeed ? "/s" : "");
		}

		if (type == TYPE_FILE_PATH) {
			ret["type"] = "file_path";
		} else if (type == TYPE_DIRECTORY_PATH) {
			ret["type"] = "directory_path";
		} else if (type == TYPE_LONG_TEXT) {
			ret["type"] = "long_text";
		}

		return ret;
	}
Beispiel #22
0
static void getFileInfo(char *file, char *title, int *length_in_ms)
{
	char filename[MAX_PATH];
	const char *hash;
	if (file == NULL || file[0] == '\0')
		file = playing_filename_with_song;
	title_song = extractSongNumber(file, filename);
	if (title_song < 0)
		expandPlaylistSongs();
	if (!loadModule(filename, module, &module_len))
		return;
	hash = atrFilenameHash(filename);
	if (!ASAPInfo_Load(title_info, hash != NULL ? hash + 1 : filename, module, module_len))
		return;
	if (title_song < 0)
		title_song = ASAPInfo_GetDefaultSong(title_info);
	if (title != NULL) {
		waFormatTitle fmt_title = {
			NULL, NULL, title, 512, tagFunc, tagFreeFunc
		};
		getTitle(title); // in case IPC_FORMAT_TITLE doesn't work...
		SendMessage(mod.hMainWindow, WM_WA_IPC, (WPARAM) &fmt_title, IPC_FORMAT_TITLE);
	}
	if (length_in_ms != NULL)
		*length_in_ms = getSongDuration(title_info, title_song);
}
Beispiel #23
0
static int l_RenderWindow_getWindowTitle(lua_State *L) {
    auto renderWindow = lua_torenderwindow(L, 1);
    stringType title = renderWindow->getTitle();

    lua_pushstring(L, title.c_str());
    return 1;
}
Beispiel #24
0
Playlist::Entries SIDPlay::fetchTracks(const QString &url, bool &ok)
{
	Playlist::Entries entries;
	if (open(url, true))
	{
		const int tracks = m_tune->getInfo()->songs();
		for (int i = 0; i < tracks; ++i)
		{
			const SidTuneInfo *info = m_tune->getInfo(i);
			if (info)
			{
				Playlist::Entry entry;
				entry.url = SIDPlayName + QString("://{%1}%2").arg(m_url).arg(i);
				entry.name = getTitle(info, i);
				entry.length = m_length;
				entries.append(entry);
			}
		}
		if (entries.length() > 1)
		{
			for (int i = 0; i < entries.length(); ++i)
				entries[i].parent = 1;
			Playlist::Entry entry;
			entry.name = Functions::fileName(m_url, false);
			entry.url = m_url;
			entry.GID = 1;
			entries.prepend(entry);
		}
	}
	ok = !entries.isEmpty();
	return entries;
}
Beispiel #25
0
void HTMLWriter::beginBody()
{
  stream << "<body>" ; 
  writeLineFormating() ;
  stream << "<h1>"<< getTitle() << "</h1>" ; 
  writeLineFormating() ;
}
Beispiel #26
0
const std::string IMDWorkspace::toString() const {
  std::ostringstream os;
  os << id() << "\n"
     << "Title: " + getTitle() << "\n";
  for (size_t i = 0; i < getNumDims(); i++) {
    const auto &dim = getDimension(i);
    os << "Dim " << i << ": (" << dim->getName() << ") " << dim->getMinimum()
       << " to " << dim->getMaximum() << " in " << dim->getNBins() << " bins";
    // Also show the dimension ID string, if different than name
    if (dim->getDimensionId() != dim->getName())
      os << ". Id=" << dim->getDimensionId();
    os << "\n";
  }
  if (hasOriginalWorkspace()) {
    os << "Binned from '" << getOriginalWorkspace()->getName();
  }
  os << "\n";
  if (this->getConvention() == "Crystallography")
    os << "Crystallography: kf-ki";
  else
    os << "Inelastic: ki-kf";
  os << "\n";

  return os.str();
}
Beispiel #27
0
// virtual
BOOL LLFloaterGesture::postBuild()
{
	std::string label;

	// Translate title
	label = getTitle();
	
	setTitle(label);

	childSetCommitCallback("gesture_list", onCommitList, this);
	childSetDoubleClickCallback("gesture_list", onClickPlay);

	childSetAction("inventory_btn", onClickInventory, this);

	childSetAction("edit_btn", onClickEdit, this);

	childSetAction("play_btn", onClickPlay, this);
	childSetAction("stop_btn", onClickPlay, this);

	childSetAction("new_gesture_btn", onClickNew, this);

	childSetVisible("play_btn", true);
	childSetVisible("stop_btn", false);
	setDefaultBtn("play_btn");

	return TRUE;
}
Beispiel #28
0
void getEff5(TH1D* h1, TH1D* h2, TH1D* h3, TH1D* h4, TH1D* h5, TString varType, TString INPUTDIR_PREFIX, double from, double to) {

   gStyle->SetOptTitle(0);
   gStyle->SetEndErrorSize(2);
   gStyle->SetErrorX(0.5);

   TLegend* leg = MakeLegend();
   TPaveText* pt = MakeTPave();

   TCanvas* c1 = new TCanvas("c1","c1",800,600);
   c1->cd();
   if (varType != "rapidity") c1->SetLogx();
   h1->SetMarkerSize(0);
   h1->SetLineWidth(1.2);
   //range
   if (varType == "pt") h1->GetXaxis()->SetRangeUser(8,180);
   else if (varType == "vtx") h1->GetXaxis()->SetRangeUser(0,20.4);
   else if (varType == "mass") h1->GetXaxis()->SetRangeUser(15, 999);
   h1->GetYaxis()->SetRangeUser(from,to);
   h1->GetXaxis()->SetMoreLogLabels();
   h1->GetYaxis()->SetTitle("#epsilon");
   h1->SetLineColor(kRed);
   h1->SetFillColor(kRed);
   h2->SetMarkerStyle(20);
   h2->SetMarkerSize(1.1);
   h2->SetMarkerColor(kBlack);
   h2->SetLineColor(kBlack);
   h3->SetMarkerStyle(20);
   h3->SetMarkerSize(1.1);
   h3->SetMarkerColor(kGreen);
   h3->SetLineColor(kGreen);
   h4->SetMarkerStyle(20);
   h4->SetMarkerSize(1.1);
   h4->SetMarkerColor(kBlue);
   h4->SetLineColor(kBlue);
   h5->SetMarkerStyle(20);
   h5->SetMarkerSize(1.1);
   h5->SetMarkerColor(kViolet);
   h5->SetLineColor(kViolet);

   //if you compare data to data
   h1->Draw("E2");
   h1->GetXaxis()->SetTitle(getTitle(varType, true));
   h2->Draw("PEsame");
   h3->Draw("PEsame");
   h4->Draw("PEsame");
   h5->Draw("PEsame");
   leg->AddEntry(h1,"MC","f");
   leg->AddEntry(h2,"Data, Run A","pl");
   leg->AddEntry(h3,"Data, Run B","pl");
   leg->AddEntry(h4,"Data, Run A+B combined","pl");
   leg->AddEntry(h5,"Data, Run A+B split","pl");
   leg->Draw("same");
   //if (dataOnly && !(varType == "rrr")) pt->Draw("same");
   //if (varType == "pt") c1->SetLogx();

   //Save
   c1->SaveAs(INPUTDIR_PREFIX+"/"+h1->GetName()+varType+".png");
}
Beispiel #29
0
void PDFDock::myVisibilityChanged(bool visible)
{
	setWindowTitle(getTitle());
	if (visible && document && !filled) {
		fillInfo();
		filled = true;
	}
}
void VecPlnrVMStructureHkTbl::fillFeed(
			const uint ixPlnrVLocale
			, Feed& feed
		) {
	feed.clear();

	for (unsigned int i=1;i<=2;i++) feed.appendIxSrefTitles(i, getSref(i), getTitle(i, ixPlnrVLocale));
};