ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvApplicationBase Class Reference

#include <ecvApplicationBase.h>

Inheritance diagram for ecvApplicationBase:
[legend]
Collaboration diagram for ecvApplicationBase:
[legend]

Public Member Functions

 ecvApplicationBase (int &argc, char **argv, bool isCommandLine, const QString &version)
 
bool isCommandLine () const
 
QString versionStr () const
 
QString versionLongStr (bool includeOS) const
 
const QString & translationPath () const
 
bool setAppStyle (const QString &styleKey)
 Set the application style. More...
 
- Public Member Functions inherited from QApplication
 QApplication (int argc, char **argv)
 

Static Public Member Functions

static void InitOpenGL ()
 

Constructor & Destructor Documentation

◆ ecvApplicationBase()

ecvApplicationBase::ecvApplicationBase ( int &  argc,
char **  argv,
bool  isCommandLine,
const QString &  version 
)

Member Function Documentation

◆ InitOpenGL()

void ecvApplicationBase::InitOpenGL ( )
static

This must be called before instantiating the application class so it can setup OpenGL first.

Calling QSurfaceFormat::setDefaultFormat() before constructing the QApplication instance is mandatory on some platforms (for example, OS X) when an OpenGL core profile context is requested. This is to ensure that resource sharing between contexts stays functional as all internal contexts are created using the correct version and profile.

References format.

Referenced by main().

◆ isCommandLine()

bool ecvApplicationBase::isCommandLine ( ) const
inline

◆ setAppStyle()

bool ecvApplicationBase::setAppStyle ( const QString &  styleKey)

Set the application style.

Parameters
styleKeyStyle name (from QStyleFactory::keys() or custom like "QDarkStyleSheet::Dark")
Returns
true if successful, false otherwise

Supported style keys:

  • Any Qt native style (e.g., "Fusion", "Windows", "macOS", "macintosh")
  • "QDarkStyleSheet::Dark" - Dark theme (if available)
  • "QDarkStyleSheet::Light" - Light theme (if available)

On macOS, the native "macintosh" or "macOS" style is used by default if available, providing native macOS appearance.

References ecvPS::AppStyle(), CVLog::Print(), ecvSettingManager::setValue(), and CVLog::Warning().

◆ translationPath()

const QString & ecvApplicationBase::translationPath ( ) const

◆ versionLongStr()

QString ecvApplicationBase::versionLongStr ( bool  includeOS) const

◆ versionStr()

QString ecvApplicationBase::versionStr ( ) const

The documentation for this class was generated from the following files: