[−][src]Struct qt_gui::QFileOpenEvent
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
C++ class: QFileOpenEvent
.
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
File open events will be sent to the QApplication::instance() when the operating system requests that a file or URL should be opened. This is a high-level event that can be caused by different user actions depending on the user's desktop environment; for example, double clicking on an file icon in the Finder on macOS.
This event is only used to notify the application of a request. It may be safely ignored.
Note: This class is currently supported for macOS only.
Methods
impl QFileOpenEvent
[src]
pub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QFileOpenEvent>>
) -> Ref<QFileOpenEvent>
[src]
&self,
other: impl CastInto<Ref<QFileOpenEvent>>
) -> Ref<QFileOpenEvent>
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
Calls C++ function: QFileOpenEvent& QFileOpenEvent::operator=(const QFileOpenEvent& other)
.
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
File open events will be sent to the QApplication::instance() when the operating system requests that a file or URL should be opened. This is a high-level event that can be caused by different user actions depending on the user's desktop environment; for example, double clicking on an file icon in the Finder on macOS.
This event is only used to notify the application of a request. It may be safely ignored.
Note: This class is currently supported for macOS only.
pub unsafe fn file(&self) -> CppBox<QString>
[src]
Returns the file that is being opened.
Calls C++ function: QString QFileOpenEvent::file() const
.
Returns the file that is being opened.
pub unsafe fn from_q_string(
file: impl CastInto<Ref<QString>>
) -> CppBox<QFileOpenEvent>
[src]
file: impl CastInto<Ref<QString>>
) -> CppBox<QFileOpenEvent>
Calls C++ function: [constructor] void QFileOpenEvent::QFileOpenEvent(const QString& file)
.
pub unsafe fn from_q_url(
url: impl CastInto<Ref<QUrl>>
) -> CppBox<QFileOpenEvent>
[src]
url: impl CastInto<Ref<QUrl>>
) -> CppBox<QFileOpenEvent>
Calls C++ function: [constructor] void QFileOpenEvent::QFileOpenEvent(const QUrl& url)
.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QFileOpenEvent>>
) -> CppBox<QFileOpenEvent>
[src]
other: impl CastInto<Ref<QFileOpenEvent>>
) -> CppBox<QFileOpenEvent>
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
Calls C++ function: [constructor] void QFileOpenEvent::QFileOpenEvent(const QFileOpenEvent& other)
.
The QFileOpenEvent class provides an event that will be sent when there is a request to open a file or a URL.
File open events will be sent to the QApplication::instance() when the operating system requests that a file or URL should be opened. This is a high-level event that can be caused by different user actions depending on the user's desktop environment; for example, double clicking on an file icon in the Finder on macOS.
This event is only used to notify the application of a request. It may be safely ignored.
Note: This class is currently supported for macOS only.
pub unsafe fn open_file(
&self,
file: impl CastInto<Ref<QFile>>,
flags: QFlags<OpenModeFlag>
) -> bool
[src]
&self,
file: impl CastInto<Ref<QFile>>,
flags: QFlags<OpenModeFlag>
) -> bool
Opens a QFile on the file referenced by this event in the mode specified by flags. Returns true
if successful; otherwise returns false
.
Calls C++ function: bool QFileOpenEvent::openFile(QFile& file, QFlags<QIODevice::OpenModeFlag> flags) const
.
Opens a QFile on the file referenced by this event in the mode specified by flags. Returns true
if successful; otherwise returns false
.
This is necessary as some files cannot be opened by name, but require specific information stored in this event.
This function was introduced in Qt 4.8.
pub unsafe fn url(&self) -> CppBox<QUrl>
[src]
Returns the url that is being opened.
Calls C++ function: QUrl QFileOpenEvent::url() const
.
Returns the url that is being opened.
This function was introduced in Qt 4.6.
Trait Implementations
impl CppDeletable for QFileOpenEvent
[src]
unsafe fn delete(&self)
[src]
Calls C++ function: virtual [destructor] void QFileOpenEvent::~QFileOpenEvent()
.
impl Deref for QFileOpenEvent
[src]
type Target = QEvent
The resulting type after dereferencing.
fn deref(&self) -> &QEvent
[src]
Calls C++ function: QEvent* static_cast<QEvent*>(QFileOpenEvent* ptr)
.
impl DynamicCast<QFileOpenEvent> for QEvent
[src]
unsafe fn dynamic_cast(ptr: Ptr<QEvent>) -> Ptr<QFileOpenEvent>
[src]
Calls C++ function: QFileOpenEvent* dynamic_cast<QFileOpenEvent*>(QEvent* ptr)
.
impl StaticDowncast<QFileOpenEvent> for QEvent
[src]
unsafe fn static_downcast(ptr: Ptr<QEvent>) -> Ptr<QFileOpenEvent>
[src]
Calls C++ function: QFileOpenEvent* static_cast<QFileOpenEvent*>(QEvent* ptr)
.
impl StaticUpcast<QEvent> for QFileOpenEvent
[src]
unsafe fn static_upcast(ptr: Ptr<QFileOpenEvent>) -> Ptr<QEvent>
[src]
Calls C++ function: QEvent* static_cast<QEvent*>(QFileOpenEvent* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QFileOpenEvent
impl Send for QFileOpenEvent
impl Sync for QFileOpenEvent
impl Unpin for QFileOpenEvent
impl UnwindSafe for QFileOpenEvent
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,