本文整理汇总了C++中TFilePath::getQString方法的典型用法代码示例。如果您正苦于以下问题:C++ TFilePath::getQString方法的具体用法?C++ TFilePath::getQString怎么用?C++ TFilePath::getQString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFilePath
的用法示例。
在下文中一共展示了TFilePath::getQString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool Preferences::LevelFormat::matches(const TFilePath &fp) const
{
return m_pathFormat.exactMatch(fp.getQString());
}
示例2: main
//.........这里部分代码省略.........
MainWindow w(argumentLayoutFileName);
splash.showMessage(offsetStr + "Loading style sheet ...", Qt::AlignCenter, Qt::white);
a.processEvents();
// Carico lo styleSheet
QString currentStyle = Preferences::instance()->getCurrentStyleSheet();
a.setStyleSheet(currentStyle);
TApp::instance()->setMainWindow(&w);
w.setWindowTitle(applicationFullName);
splash.showMessage(offsetStr + "Starting main window ...", Qt::AlignCenter, Qt::white);
a.processEvents();
TFilePath fp = ToonzFolder::getModuleFile("mainwindow.ini");
QSettings settings(toQString(fp), QSettings::IniFormat);
w.restoreGeometry(settings.value("MainWindowGeometry").toByteArray());
#ifndef MACOSX
//Workaround for the maximized window case: Qt delivers two resize events, one in the normal geometry, before
//maximizing (why!?), the second afterwards - all inside the following show() call. This makes troublesome for
//the docking system to correctly restore the saved geometry. Fortunately, MainWindow::showEvent(..) gets called
//just between the two, so we can disable the currentRoom layout right before showing and re-enable it after
//the normal resize has happened.
if (w.isMaximized())
w.getCurrentRoom()->layout()->setEnabled(false);
#endif
QRect splashGeometry = splash.geometry();
splash.finish(&w);
a.setQuitOnLastWindowClosed(false);
// a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
w.checkForUpdates();
w.show();
//Show floating panels only after the main window has been shown
w.startupFloatingPanels();
CommandManager::instance()->execute(T_Hand);
if (!loadScenePath.isEmpty()) {
splash.showMessage(QString("Loading file '") + loadScenePath.getQString() + "'...", Qt::AlignCenter, Qt::white);
loadScenePath = loadScenePath.withType("tnz");
if (TFileStatus(loadScenePath).doesExist())
IoCmd::loadScene(loadScenePath);
}
QFont *myFont;
std::string family = EnvSoftwareCurrentFont;
myFont = new QFont(QString(family.c_str()));
myFont->setPixelSize(EnvSoftwareCurrentFontSize);
/*-- フォントのBoldの指定 --*/
std::string weight = EnvSoftwareCurrentFontWeight;
if (strcmp(weight.c_str(), "Yes") == 0)
myFont->setBold(true);
else
myFont->setBold(false);
a.setFont(*myFont);
QAction *action = CommandManager::instance()->getAction("MI_OpenTMessage");
if (action)
QObject::connect(TMessageRepository::instance(), SIGNAL(openMessageCenter()), action, SLOT(trigger()));
QObject::connect(
TUndoManager::manager(), SIGNAL(somethingChanged()),
TApp::instance()->getCurrentScene(), SLOT(setDirtyFlag()));
#ifdef _WIN32
#ifndef x64
//On 32-bit architecture, there could be cases in which initialization could alter the
//FPU floating point control word. I've seen this happen when loading some AVI coded (VFAPI),
//where 80-bit internal precision was used instead of the standard 64-bit (much faster and
//sufficient - especially considering that x86 truncates to 64-bit representation anyway).
//IN ANY CASE, revert to the original control word.
//In the x64 case these precision changes simply should not take place up to _controlfp_s
//documentation.
_controlfp_s(0, fpWord, -1);
#endif
#endif
a.installEventFilter(TApp::instance());
int ret = a.exec();
TUndoManager::manager()->reset();
PreviewFxManager::instance()->reset();
#ifdef _WIN32
if (consoleAttached) {
::FreeConsole();
}
#endif
return ret;
}