mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
As creation of a font is time consuming, create one application font instance
p4#: 21338
This commit is contained in:
@@ -135,6 +135,10 @@ RiaApplication::RiaApplication(int& argc, char** argv)
|
||||
//m_startupDefaultDirectory += "/My Documents/";
|
||||
#endif
|
||||
setDefaultFileDialogDirectory("MULTICASEIMPORT", "/");
|
||||
|
||||
// The creation of a font is time consuming, so make sure you really need your own font
|
||||
// instead of using the application font
|
||||
m_standardFont = new cvf::FixedAtlasFont(cvf::FixedAtlasFont::STANDARD);
|
||||
}
|
||||
|
||||
|
||||
@@ -1422,3 +1426,16 @@ bool RiaApplication::addEclipseCases(const QStringList& fileNames)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Font* RiaApplication::standardFont()
|
||||
{
|
||||
CVF_ASSERT(m_standardFont.notNull());
|
||||
|
||||
// The creation of a font is time consuming, so make sure you really need your own font
|
||||
// instead of using the application font
|
||||
|
||||
return m_standardFont.p();
|
||||
}
|
||||
|
||||
@@ -116,11 +116,13 @@ public:
|
||||
bool launchProcess(const QString& program, const QStringList& arguments);
|
||||
void terminateProcess();
|
||||
|
||||
RiaPreferences* preferences();
|
||||
RiaPreferences* preferences();
|
||||
void readPreferences();
|
||||
void writePreferences();
|
||||
void applyPreferences();
|
||||
|
||||
cvf::Font* standardFont();
|
||||
|
||||
private:
|
||||
void onProjectOpenedOrClosed();
|
||||
void setWindowCaptionFromAppState();
|
||||
@@ -132,15 +134,17 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimReservoirView> m_activeReservoirView;
|
||||
caf::PdmPointer<RimProject> m_project;
|
||||
caf::PdmPointer<RimReservoirView> m_activeReservoirView;
|
||||
caf::PdmPointer<RimProject> m_project;
|
||||
|
||||
RiaSocketServer* m_socketServer;
|
||||
RiaSocketServer* m_socketServer;
|
||||
|
||||
caf::UiProcess* m_workerProcess;
|
||||
caf::UiProcess* m_workerProcess;
|
||||
|
||||
RiaPreferences* m_preferences;
|
||||
RiaPreferences* m_preferences;
|
||||
|
||||
std::map<QString, QString> m_fileDialogDefaultDirectories;
|
||||
QString m_startupDefaultDirectory;
|
||||
std::map<QString, QString> m_fileDialogDefaultDirectories;
|
||||
QString m_startupDefaultDirectory;
|
||||
|
||||
cvf::ref<cvf::Font> m_standardFont;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user