Beispiel #1
0
static int numChannels(CMyString str)
{
   if (str.IsEmpty()) return 0;
   CMyString numStr((str[0] == 'A') ? str[2] : str[1]);
   int num = _ttoi(numStr);
   if (num > 4) num = 0;
   return num;
}
Beispiel #2
0
void CMainFrame::setMoveNum(int num){
	char* a = new char[7];

	_itoa(num, a, 10);

	CString numStr(a);

	delete a;

	CString str("Moves made : ");
	str.Append(numStr);
	stBar.SetPaneText(5, str);
}
Beispiel #3
0
void Editor::gotoFileLine(std::string const &lineBuf)
    {
    size_t pos = lineBuf.rfind(':');
    if(pos != std::string::npos)
        {
        int lineNum;
        OovString numStr(lineBuf.substr(pos+1, lineBuf.length()-pos));
        if(numStr.getInt(0, INT_MAX, lineNum))
            {
            if(lineNum == 0)
                lineNum = 1;
            mEditFiles.viewFile(lineBuf.substr(0, pos), lineNum);
            }
        }
    }
Beispiel #4
0
void
PDDocument::NameNewDoc(
	ResIDT	inFileTitles)
{

	// Validate pointers.

	ValidateThis_();
	ValidateObject_(mWindow);

	// Make sure we have a valid file titles string.
	
	if (inFileTitles == 0)
		inFileTitles = STR_FileTitles;

	// Start with the default name ("untitled").

	StApplicationContext appContext;
	LStr255 name(inFileTitles, str_Untitled);
	SInt32 num = 0;

	while (UWindows::FindNamedWindow(name) != nil) {
			
		// An existing window has the current name; increment counter and try again.

		::GetIndString(name, inFileTitles, str_UntitledNumbered);
		num++;
		LStr255 numStr((SInt32) num);
		name += numStr;
	}		

	// Now that we've found a unique name, set window title.
	
	mWindow->SetDescriptor(name);

}
Beispiel #5
0
void ValueMap::writeEntry(const QString& k, bool v )
{
   m_map[k] = numStr(v);
}
Beispiel #6
0
void ValueMap::writeEntry(const QString& k, const QPoint& v )
{
   m_map[k] = numStr(v.x()) + "," + numStr(v.y());
}
Beispiel #7
0
void ValueMap::writeEntry(const QString& k, const QSize& v )
{
   m_map[k] = numStr(v.width()) + "," + numStr(v.height());
}
Beispiel #8
0
void ValueMap::writeEntry(const QString& k, const QColor& v )
{
   m_map[k] = numStr(v.red()) + "," + numStr(v.green()) + "," + numStr(v.blue());
}