Skip to main content

QCommandLineParser

Struct QCommandLineParser 

Source
pub struct QCommandLineParser { /* private fields */ }
Expand description

C++ class: QCommandLineParser.

Implementations§

Source§

impl QCommandLineParser

Source

pub unsafe fn add_help_option(&self) -> CppBox<QCommandLineOption>

Calls C++ function: QCommandLineOption QCommandLineParser::addHelpOption().

Source

pub unsafe fn add_option( &self, command_line_option: impl CastInto<Ref<QCommandLineOption>>, ) -> bool

Calls C++ function: bool QCommandLineParser::addOption(const QCommandLineOption& commandLineOption).

Source

pub unsafe fn add_options( &self, options: impl CastInto<Ref<QListOfQCommandLineOption>>, ) -> bool

Calls C++ function: bool QCommandLineParser::addOptions(const QList<QCommandLineOption>& options).

Source

pub unsafe fn add_positional_argument_3a( &self, name: impl CastInto<Ref<QString>>, description: impl CastInto<Ref<QString>>, syntax: impl CastInto<Ref<QString>>, )

Calls C++ function: void QCommandLineParser::addPositionalArgument(const QString& name, const QString& description, const QString& syntax = …).

Source

pub unsafe fn add_positional_argument_2a( &self, name: impl CastInto<Ref<QString>>, description: impl CastInto<Ref<QString>>, )

Calls C++ function: void QCommandLineParser::addPositionalArgument(const QString& name, const QString& description).

Source

pub unsafe fn add_version_option(&self) -> CppBox<QCommandLineOption>

Calls C++ function: QCommandLineOption QCommandLineParser::addVersionOption().

Source

pub unsafe fn application_description(&self) -> CppBox<QString>

Calls C++ function: QString QCommandLineParser::applicationDescription() const.

Source

pub unsafe fn clear_positional_arguments(&self)

Calls C++ function: void QCommandLineParser::clearPositionalArguments().

Source

pub unsafe fn error_text(&self) -> CppBox<QString>

Calls C++ function: QString QCommandLineParser::errorText() const.

Source

pub unsafe fn help_text(&self) -> CppBox<QString>

Calls C++ function: QString QCommandLineParser::helpText() const.

Source

pub unsafe fn is_set_q_string(&self, name: impl CastInto<Ref<QString>>) -> bool

Calls C++ function: bool QCommandLineParser::isSet(const QString& name) const.

Source

pub unsafe fn is_set_q_command_line_option( &self, option: impl CastInto<Ref<QCommandLineOption>>, ) -> bool

Calls C++ function: bool QCommandLineParser::isSet(const QCommandLineOption& option) const.

Source

pub unsafe fn new() -> CppBox<QCommandLineParser>

Calls C++ function: [constructor] void QCommandLineParser::QCommandLineParser().

Source

pub unsafe fn option_names(&self) -> CppBox<QStringList>

Calls C++ function: QStringList QCommandLineParser::optionNames() const.

Source

pub unsafe fn parse(&self, arguments: impl CastInto<Ref<QStringList>>) -> bool

Calls C++ function: bool QCommandLineParser::parse(const QStringList& arguments).

Source

pub unsafe fn positional_arguments(&self) -> CppBox<QStringList>

Calls C++ function: QStringList QCommandLineParser::positionalArguments() const.

Source

pub unsafe fn process_q_string_list( &self, arguments: impl CastInto<Ref<QStringList>>, )

Calls C++ function: void QCommandLineParser::process(const QStringList& arguments).

Source

pub unsafe fn process_q_core_application( &self, app: impl CastInto<Ref<QCoreApplication>>, )

Calls C++ function: void QCommandLineParser::process(const QCoreApplication& app).

Source

pub unsafe fn set_application_description( &self, description: impl CastInto<Ref<QString>>, )

Calls C++ function: void QCommandLineParser::setApplicationDescription(const QString& description).

Source

pub unsafe fn set_options_after_positional_arguments_mode( &self, mode: OptionsAfterPositionalArgumentsMode, )

Calls C++ function: void QCommandLineParser::setOptionsAfterPositionalArgumentsMode(QCommandLineParser::OptionsAfterPositionalArgumentsMode mode).

Source

pub unsafe fn set_single_dash_word_option_mode( &self, parsing_mode: SingleDashWordOptionMode, )

Calls C++ function: void QCommandLineParser::setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode parsingMode).

Source

pub unsafe fn show_help_1a(&self, exit_code: c_int)

Calls C++ function: void QCommandLineParser::showHelp(int exitCode = …).

Source

pub unsafe fn show_help_0a(&self)

Calls C++ function: void QCommandLineParser::showHelp().

Source

pub unsafe fn show_version(&self)

Calls C++ function: void QCommandLineParser::showVersion().

Source

pub unsafe fn tr( source_text: *const c_char, disambiguation: *const c_char, n: c_int, ) -> CppBox<QString>

Calls C++ function: static QString QCommandLineParser::tr(const char* sourceText, const char* disambiguation, int n).

Source

pub unsafe fn tr_utf8( source_text: *const c_char, disambiguation: *const c_char, n: c_int, ) -> CppBox<QString>

Calls C++ function: static QString QCommandLineParser::trUtf8(const char* sourceText, const char* disambiguation, int n).

Source

pub unsafe fn unknown_option_names(&self) -> CppBox<QStringList>

Calls C++ function: QStringList QCommandLineParser::unknownOptionNames() const.

Source

pub unsafe fn value_q_string( &self, name: impl CastInto<Ref<QString>>, ) -> CppBox<QString>

Calls C++ function: QString QCommandLineParser::value(const QString& name) const.

Source

pub unsafe fn value_q_command_line_option( &self, option: impl CastInto<Ref<QCommandLineOption>>, ) -> CppBox<QString>

Calls C++ function: QString QCommandLineParser::value(const QCommandLineOption& option) const.

Source

pub unsafe fn values_q_string( &self, name: impl CastInto<Ref<QString>>, ) -> CppBox<QStringList>

Calls C++ function: QStringList QCommandLineParser::values(const QString& name) const.

Source

pub unsafe fn values_q_command_line_option( &self, option: impl CastInto<Ref<QCommandLineOption>>, ) -> CppBox<QStringList>

Calls C++ function: QStringList QCommandLineParser::values(const QCommandLineOption& option) const.

Trait Implementations§

Source§

impl CppDeletable for QCommandLineParser

Source§

unsafe fn delete(&self)

Calls C++ function: [destructor] void QCommandLineParser::~QCommandLineParser().

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.