2024-08-25 04:08:24 +00:00
# include <QAbstractItemDelegate>
# include <QAbstractProxyModel>
# include <QByteArray>
2024-11-19 06:29:06 +00:00
# include <QCloseEvent>
# include <QContextMenuEvent>
# include <QDialog>
2024-08-25 04:08:24 +00:00
# include <QDir>
2024-11-19 06:29:06 +00:00
# include <QEvent>
2024-08-25 04:08:24 +00:00
# include <QFileDialog>
# include <QFileIconProvider>
2024-11-19 06:29:06 +00:00
# include <QKeyEvent>
2024-08-25 04:08:24 +00:00
# include <QList>
# include <QMetaObject>
2024-11-19 06:29:06 +00:00
# include <QObject>
# include <QPaintDevice>
# include <QResizeEvent>
# include <QShowEvent>
# include <QSize>
2024-08-25 04:08:24 +00:00
# include <QString>
2024-08-29 07:01:51 +00:00
# include <QByteArray>
# include <cstring>
2024-08-25 04:08:24 +00:00
# include <QUrl>
# include <QWidget>
2024-10-16 05:07:56 +00:00
# include <qfiledialog.h>
2024-08-29 07:01:51 +00:00
# include "gen_qfiledialog.h"
2024-09-14 22:29:05 +00:00
# include "_cgo_export.h"
2024-08-25 04:08:24 +00:00
2024-11-19 06:29:06 +00:00
class MiqtVirtualQFileDialog : public virtual QFileDialog {
public :
MiqtVirtualQFileDialog ( QWidget * parent ) : QFileDialog ( parent ) { } ;
MiqtVirtualQFileDialog ( QWidget * parent , Qt : : WindowFlags f ) : QFileDialog ( parent , f ) { } ;
MiqtVirtualQFileDialog ( ) : QFileDialog ( ) { } ;
MiqtVirtualQFileDialog ( QWidget * parent , const QString & caption ) : QFileDialog ( parent , caption ) { } ;
MiqtVirtualQFileDialog ( QWidget * parent , const QString & caption , const QString & directory ) : QFileDialog ( parent , caption , directory ) { } ;
MiqtVirtualQFileDialog ( QWidget * parent , const QString & caption , const QString & directory , const QString & filter ) : QFileDialog ( parent , caption , directory , filter ) { } ;
virtual ~ MiqtVirtualQFileDialog ( ) = default ;
// cgo.Handle value for overwritten implementation
intptr_t handle__SetVisible = 0 ;
// Subclass to allow providing a Go implementation
virtual void setVisible ( bool visible ) override {
if ( handle__SetVisible = = 0 ) {
QFileDialog : : setVisible ( visible ) ;
return ;
}
bool sigval1 = visible ;
miqt_exec_callback_QFileDialog_SetVisible ( this , handle__SetVisible , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_SetVisible ( bool visible ) {
QFileDialog : : setVisible ( visible ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Done = 0 ;
// Subclass to allow providing a Go implementation
virtual void done ( int result ) override {
if ( handle__Done = = 0 ) {
QFileDialog : : done ( result ) ;
return ;
}
int sigval1 = result ;
miqt_exec_callback_QFileDialog_Done ( this , handle__Done , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_Done ( int result ) {
QFileDialog : : done ( static_cast < int > ( result ) ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Accept = 0 ;
// Subclass to allow providing a Go implementation
virtual void accept ( ) override {
if ( handle__Accept = = 0 ) {
QFileDialog : : accept ( ) ;
return ;
}
miqt_exec_callback_QFileDialog_Accept ( this , handle__Accept ) ;
}
// Wrapper to allow calling protected method
void virtualbase_Accept ( ) {
QFileDialog : : accept ( ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__ChangeEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void changeEvent ( QEvent * e ) override {
if ( handle__ChangeEvent = = 0 ) {
QFileDialog : : changeEvent ( e ) ;
return ;
}
QEvent * sigval1 = e ;
miqt_exec_callback_QFileDialog_ChangeEvent ( this , handle__ChangeEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_ChangeEvent ( QEvent * e ) {
QFileDialog : : changeEvent ( e ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__SizeHint = 0 ;
// Subclass to allow providing a Go implementation
virtual QSize sizeHint ( ) const override {
if ( handle__SizeHint = = 0 ) {
return QFileDialog : : sizeHint ( ) ;
}
QSize * callback_return_value = miqt_exec_callback_QFileDialog_SizeHint ( const_cast < MiqtVirtualQFileDialog * > ( this ) , handle__SizeHint ) ;
return * callback_return_value ;
}
// Wrapper to allow calling protected method
QSize * virtualbase_SizeHint ( ) const {
return new QSize ( QFileDialog : : sizeHint ( ) ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__MinimumSizeHint = 0 ;
// Subclass to allow providing a Go implementation
virtual QSize minimumSizeHint ( ) const override {
if ( handle__MinimumSizeHint = = 0 ) {
return QFileDialog : : minimumSizeHint ( ) ;
}
QSize * callback_return_value = miqt_exec_callback_QFileDialog_MinimumSizeHint ( const_cast < MiqtVirtualQFileDialog * > ( this ) , handle__MinimumSizeHint ) ;
return * callback_return_value ;
}
// Wrapper to allow calling protected method
QSize * virtualbase_MinimumSizeHint ( ) const {
return new QSize ( QFileDialog : : minimumSizeHint ( ) ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Open = 0 ;
// Subclass to allow providing a Go implementation
virtual void open ( ) override {
if ( handle__Open = = 0 ) {
QFileDialog : : open ( ) ;
return ;
}
miqt_exec_callback_QFileDialog_Open ( this , handle__Open ) ;
}
// Wrapper to allow calling protected method
void virtualbase_Open ( ) {
QFileDialog : : open ( ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Exec = 0 ;
// Subclass to allow providing a Go implementation
virtual int exec ( ) override {
if ( handle__Exec = = 0 ) {
return QFileDialog : : exec ( ) ;
}
int callback_return_value = miqt_exec_callback_QFileDialog_Exec ( this , handle__Exec ) ;
return static_cast < int > ( callback_return_value ) ;
}
// Wrapper to allow calling protected method
int virtualbase_Exec ( ) {
return QFileDialog : : exec ( ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__Reject = 0 ;
// Subclass to allow providing a Go implementation
virtual void reject ( ) override {
if ( handle__Reject = = 0 ) {
QFileDialog : : reject ( ) ;
return ;
}
miqt_exec_callback_QFileDialog_Reject ( this , handle__Reject ) ;
}
// Wrapper to allow calling protected method
void virtualbase_Reject ( ) {
QFileDialog : : reject ( ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__KeyPressEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void keyPressEvent ( QKeyEvent * param1 ) override {
if ( handle__KeyPressEvent = = 0 ) {
QFileDialog : : keyPressEvent ( param1 ) ;
return ;
}
QKeyEvent * sigval1 = param1 ;
miqt_exec_callback_QFileDialog_KeyPressEvent ( this , handle__KeyPressEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_KeyPressEvent ( QKeyEvent * param1 ) {
QFileDialog : : keyPressEvent ( param1 ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__CloseEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void closeEvent ( QCloseEvent * param1 ) override {
if ( handle__CloseEvent = = 0 ) {
QFileDialog : : closeEvent ( param1 ) ;
return ;
}
QCloseEvent * sigval1 = param1 ;
miqt_exec_callback_QFileDialog_CloseEvent ( this , handle__CloseEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_CloseEvent ( QCloseEvent * param1 ) {
QFileDialog : : closeEvent ( param1 ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__ShowEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void showEvent ( QShowEvent * param1 ) override {
if ( handle__ShowEvent = = 0 ) {
QFileDialog : : showEvent ( param1 ) ;
return ;
}
QShowEvent * sigval1 = param1 ;
miqt_exec_callback_QFileDialog_ShowEvent ( this , handle__ShowEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_ShowEvent ( QShowEvent * param1 ) {
QFileDialog : : showEvent ( param1 ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__ResizeEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void resizeEvent ( QResizeEvent * param1 ) override {
if ( handle__ResizeEvent = = 0 ) {
QFileDialog : : resizeEvent ( param1 ) ;
return ;
}
QResizeEvent * sigval1 = param1 ;
miqt_exec_callback_QFileDialog_ResizeEvent ( this , handle__ResizeEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_ResizeEvent ( QResizeEvent * param1 ) {
QFileDialog : : resizeEvent ( param1 ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__ContextMenuEvent = 0 ;
// Subclass to allow providing a Go implementation
virtual void contextMenuEvent ( QContextMenuEvent * param1 ) override {
if ( handle__ContextMenuEvent = = 0 ) {
QFileDialog : : contextMenuEvent ( param1 ) ;
return ;
}
QContextMenuEvent * sigval1 = param1 ;
miqt_exec_callback_QFileDialog_ContextMenuEvent ( this , handle__ContextMenuEvent , sigval1 ) ;
}
// Wrapper to allow calling protected method
void virtualbase_ContextMenuEvent ( QContextMenuEvent * param1 ) {
QFileDialog : : contextMenuEvent ( param1 ) ;
}
// cgo.Handle value for overwritten implementation
intptr_t handle__EventFilter = 0 ;
// Subclass to allow providing a Go implementation
virtual bool eventFilter ( QObject * param1 , QEvent * param2 ) override {
if ( handle__EventFilter = = 0 ) {
return QFileDialog : : eventFilter ( param1 , param2 ) ;
}
QObject * sigval1 = param1 ;
QEvent * sigval2 = param2 ;
bool callback_return_value = miqt_exec_callback_QFileDialog_EventFilter ( this , handle__EventFilter , sigval1 , sigval2 ) ;
return callback_return_value ;
}
// Wrapper to allow calling protected method
bool virtualbase_EventFilter ( QObject * param1 , QEvent * param2 ) {
return QFileDialog : : eventFilter ( param1 , param2 ) ;
}
} ;
void QFileDialog_new ( QWidget * parent , QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( parent ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_new2 ( QWidget * parent , int f , QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( parent , static_cast < Qt : : WindowFlags > ( f ) ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_new3 ( QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_new4 ( QWidget * parent , struct miqt_string caption , QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( parent , caption_QString ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_new5 ( QWidget * parent , struct miqt_string caption , struct miqt_string directory , QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString directory_QString = QString : : fromUtf8 ( directory . data , directory . len ) ;
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( parent , caption_QString , directory_QString ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_new6 ( QWidget * parent , struct miqt_string caption , struct miqt_string directory , struct miqt_string filter , QFileDialog * * outptr_QFileDialog , QDialog * * outptr_QDialog , QWidget * * outptr_QWidget , QObject * * outptr_QObject , QPaintDevice * * outptr_QPaintDevice ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString directory_QString = QString : : fromUtf8 ( directory . data , directory . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog * ret = new MiqtVirtualQFileDialog ( parent , caption_QString , directory_QString , filter_QString ) ;
* outptr_QFileDialog = ret ;
* outptr_QDialog = static_cast < QDialog * > ( ret ) ;
* outptr_QWidget = static_cast < QWidget * > ( ret ) ;
* outptr_QObject = static_cast < QObject * > ( ret ) ;
* outptr_QPaintDevice = static_cast < QPaintDevice * > ( ret ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
QMetaObject * QFileDialog_MetaObject ( const QFileDialog * self ) {
return ( QMetaObject * ) self - > metaObject ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-20 22:32:57 +00:00
void * QFileDialog_Metacast ( QFileDialog * self , const char * param1 ) {
return self - > qt_metacast ( param1 ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_Tr ( const char * s ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : tr ( s ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_TrUtf8 ( const char * s ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : trUtf8 ( s ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SetDirectory ( QFileDialog * self , struct miqt_string directory ) {
QString directory_QString = QString : : fromUtf8 ( directory . data , directory . len ) ;
2024-08-25 04:08:24 +00:00
self - > setDirectory ( directory_QString ) ;
}
void QFileDialog_SetDirectoryWithDirectory ( QFileDialog * self , QDir * directory ) {
self - > setDirectory ( * directory ) ;
}
2024-09-11 05:41:09 +00:00
QDir * QFileDialog_Directory ( const QFileDialog * self ) {
2024-09-17 06:29:11 +00:00
return new QDir ( self - > directory ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetDirectoryUrl ( QFileDialog * self , QUrl * directory ) {
self - > setDirectoryUrl ( * directory ) ;
}
2024-09-11 05:41:09 +00:00
QUrl * QFileDialog_DirectoryUrl ( const QFileDialog * self ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( self - > directoryUrl ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SelectFile ( QFileDialog * self , struct miqt_string filename ) {
QString filename_QString = QString : : fromUtf8 ( filename . data , filename . len ) ;
2024-08-25 04:08:24 +00:00
self - > selectFile ( filename_QString ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_SelectedFiles ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > selectedFiles ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SelectUrl ( QFileDialog * self , QUrl * url ) {
self - > selectUrl ( * url ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_SelectedUrls ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = self - > selectedUrls ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetNameFilterDetailsVisible ( QFileDialog * self , bool enabled ) {
self - > setNameFilterDetailsVisible ( enabled ) ;
}
2024-09-11 05:41:09 +00:00
bool QFileDialog_IsNameFilterDetailsVisible ( const QFileDialog * self ) {
return self - > isNameFilterDetailsVisible ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SetNameFilter ( QFileDialog * self , struct miqt_string filter ) {
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-08-25 04:08:24 +00:00
self - > setNameFilter ( filter_QString ) ;
}
2024-11-17 06:21:37 +00:00
void QFileDialog_SetNameFilters ( QFileDialog * self , struct miqt_array /* of struct miqt_string */ filters ) {
2024-10-16 05:07:56 +00:00
QStringList filters_QList ;
2024-11-04 07:18:27 +00:00
filters_QList . reserve ( filters . len ) ;
struct miqt_string * filters_arr = static_cast < struct miqt_string * > ( filters . data ) ;
for ( size_t i = 0 ; i < filters . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString filters_arr_i_QString = QString : : fromUtf8 ( filters_arr [ i ] . data , filters_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
filters_QList . push_back ( filters_arr_i_QString ) ;
2024-08-25 04:08:24 +00:00
}
self - > setNameFilters ( filters_QList ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_NameFilters ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > nameFilters ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SelectNameFilter ( QFileDialog * self , struct miqt_string filter ) {
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-08-25 04:08:24 +00:00
self - > selectNameFilter ( filter_QString ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_SelectedMimeTypeFilter ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QString _ret = self - > selectedMimeTypeFilter ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_SelectedNameFilter ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QString _ret = self - > selectedNameFilter ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-17 06:21:37 +00:00
void QFileDialog_SetMimeTypeFilters ( QFileDialog * self , struct miqt_array /* of struct miqt_string */ filters ) {
2024-10-16 05:07:56 +00:00
QStringList filters_QList ;
2024-11-04 07:18:27 +00:00
filters_QList . reserve ( filters . len ) ;
struct miqt_string * filters_arr = static_cast < struct miqt_string * > ( filters . data ) ;
for ( size_t i = 0 ; i < filters . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString filters_arr_i_QString = QString : : fromUtf8 ( filters_arr [ i ] . data , filters_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
filters_QList . push_back ( filters_arr_i_QString ) ;
2024-08-25 04:08:24 +00:00
}
self - > setMimeTypeFilters ( filters_QList ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_MimeTypeFilters ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > mimeTypeFilters ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SelectMimeTypeFilter ( QFileDialog * self , struct miqt_string filter ) {
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-08-25 04:08:24 +00:00
self - > selectMimeTypeFilter ( filter_QString ) ;
}
2024-09-11 05:41:09 +00:00
int QFileDialog_Filter ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QDir : : Filters _ret = self - > filter ( ) ;
return static_cast < int > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
void QFileDialog_SetFilter ( QFileDialog * self , int filters ) {
self - > setFilter ( static_cast < QDir : : Filters > ( filters ) ) ;
}
2024-09-18 00:12:02 +00:00
void QFileDialog_SetViewMode ( QFileDialog * self , int mode ) {
2024-08-29 07:01:51 +00:00
self - > setViewMode ( static_cast < QFileDialog : : ViewMode > ( mode ) ) ;
}
2024-09-18 00:12:02 +00:00
int QFileDialog_ViewMode ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QFileDialog : : ViewMode _ret = self - > viewMode ( ) ;
2024-09-18 00:12:02 +00:00
return static_cast < int > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-18 00:12:02 +00:00
void QFileDialog_SetFileMode ( QFileDialog * self , int mode ) {
2024-08-29 07:01:51 +00:00
self - > setFileMode ( static_cast < QFileDialog : : FileMode > ( mode ) ) ;
}
2024-09-18 00:12:02 +00:00
int QFileDialog_FileMode ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QFileDialog : : FileMode _ret = self - > fileMode ( ) ;
2024-09-18 00:12:02 +00:00
return static_cast < int > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-18 00:12:02 +00:00
void QFileDialog_SetAcceptMode ( QFileDialog * self , int mode ) {
2024-08-29 07:01:51 +00:00
self - > setAcceptMode ( static_cast < QFileDialog : : AcceptMode > ( mode ) ) ;
}
2024-09-18 00:12:02 +00:00
int QFileDialog_AcceptMode ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QFileDialog : : AcceptMode _ret = self - > acceptMode ( ) ;
2024-09-18 00:12:02 +00:00
return static_cast < int > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-08-25 04:08:24 +00:00
void QFileDialog_SetReadOnly ( QFileDialog * self , bool enabled ) {
self - > setReadOnly ( enabled ) ;
}
2024-09-11 05:41:09 +00:00
bool QFileDialog_IsReadOnly ( const QFileDialog * self ) {
return self - > isReadOnly ( ) ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetResolveSymlinks ( QFileDialog * self , bool enabled ) {
self - > setResolveSymlinks ( enabled ) ;
}
2024-09-11 05:41:09 +00:00
bool QFileDialog_ResolveSymlinks ( const QFileDialog * self ) {
return self - > resolveSymlinks ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-17 06:21:37 +00:00
void QFileDialog_SetSidebarUrls ( QFileDialog * self , struct miqt_array /* of QUrl* */ urls ) {
2024-08-25 04:08:24 +00:00
QList < QUrl > urls_QList ;
2024-11-04 07:18:27 +00:00
urls_QList . reserve ( urls . len ) ;
QUrl * * urls_arr = static_cast < QUrl * * > ( urls . data ) ;
for ( size_t i = 0 ; i < urls . len ; + + i ) {
2024-09-14 22:29:05 +00:00
urls_QList . push_back ( * ( urls_arr [ i ] ) ) ;
2024-08-25 04:08:24 +00:00
}
self - > setSidebarUrls ( urls_QList ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_SidebarUrls ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = self - > sidebarUrls ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_SaveState ( const QFileDialog * self ) {
QByteArray _qb = self - > saveState ( ) ;
struct miqt_string _ms ;
_ms . len = _qb . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _qb . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
bool QFileDialog_RestoreState ( QFileDialog * self , struct miqt_string state ) {
QByteArray state_QByteArray ( state . data , state . len ) ;
return self - > restoreState ( state_QByteArray ) ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetConfirmOverwrite ( QFileDialog * self , bool enabled ) {
self - > setConfirmOverwrite ( enabled ) ;
}
2024-09-11 05:41:09 +00:00
bool QFileDialog_ConfirmOverwrite ( const QFileDialog * self ) {
return self - > confirmOverwrite ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SetDefaultSuffix ( QFileDialog * self , struct miqt_string suffix ) {
QString suffix_QString = QString : : fromUtf8 ( suffix . data , suffix . len ) ;
2024-08-25 04:08:24 +00:00
self - > setDefaultSuffix ( suffix_QString ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_DefaultSuffix ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QString _ret = self - > defaultSuffix ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-17 06:21:37 +00:00
void QFileDialog_SetHistory ( QFileDialog * self , struct miqt_array /* of struct miqt_string */ paths ) {
2024-10-16 05:07:56 +00:00
QStringList paths_QList ;
2024-11-04 07:18:27 +00:00
paths_QList . reserve ( paths . len ) ;
struct miqt_string * paths_arr = static_cast < struct miqt_string * > ( paths . data ) ;
for ( size_t i = 0 ; i < paths . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString paths_arr_i_QString = QString : : fromUtf8 ( paths_arr [ i ] . data , paths_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
paths_QList . push_back ( paths_arr_i_QString ) ;
2024-08-25 04:08:24 +00:00
}
self - > setHistory ( paths_QList ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_History ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > history ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetItemDelegate ( QFileDialog * self , QAbstractItemDelegate * delegate ) {
self - > setItemDelegate ( delegate ) ;
}
2024-09-11 05:41:09 +00:00
QAbstractItemDelegate * QFileDialog_ItemDelegate ( const QFileDialog * self ) {
return self - > itemDelegate ( ) ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetIconProvider ( QFileDialog * self , QFileIconProvider * provider ) {
self - > setIconProvider ( provider ) ;
}
2024-09-11 05:41:09 +00:00
QFileIconProvider * QFileDialog_IconProvider ( const QFileDialog * self ) {
return self - > iconProvider ( ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
void QFileDialog_SetLabelText ( QFileDialog * self , int label , struct miqt_string text ) {
QString text_QString = QString : : fromUtf8 ( text . data , text . len ) ;
2024-08-29 07:01:51 +00:00
self - > setLabelText ( static_cast < QFileDialog : : DialogLabel > ( label ) , text_QString ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_LabelText ( const QFileDialog * self , int label ) {
2024-09-14 22:29:05 +00:00
QString _ret = self - > labelText ( static_cast < QFileDialog : : DialogLabel > ( label ) ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-17 06:21:37 +00:00
void QFileDialog_SetSupportedSchemes ( QFileDialog * self , struct miqt_array /* of struct miqt_string */ schemes ) {
2024-10-16 05:07:56 +00:00
QStringList schemes_QList ;
2024-11-04 07:18:27 +00:00
schemes_QList . reserve ( schemes . len ) ;
struct miqt_string * schemes_arr = static_cast < struct miqt_string * > ( schemes . data ) ;
for ( size_t i = 0 ; i < schemes . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString schemes_arr_i_QString = QString : : fromUtf8 ( schemes_arr [ i ] . data , schemes_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
schemes_QList . push_back ( schemes_arr_i_QString ) ;
2024-08-25 04:08:24 +00:00
}
self - > setSupportedSchemes ( schemes_QList ) ;
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_SupportedSchemes ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = self - > supportedSchemes ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-25 04:08:24 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetProxyModel ( QFileDialog * self , QAbstractProxyModel * model ) {
self - > setProxyModel ( model ) ;
}
2024-09-11 05:41:09 +00:00
QAbstractProxyModel * QFileDialog_ProxyModel ( const QFileDialog * self ) {
return self - > proxyModel ( ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-18 00:12:02 +00:00
void QFileDialog_SetOption ( QFileDialog * self , int option ) {
2024-08-29 07:01:51 +00:00
self - > setOption ( static_cast < QFileDialog : : Option > ( option ) ) ;
}
2024-09-18 00:12:02 +00:00
bool QFileDialog_TestOption ( const QFileDialog * self , int option ) {
2024-09-11 05:41:09 +00:00
return self - > testOption ( static_cast < QFileDialog : : Option > ( option ) ) ;
2024-08-29 07:01:51 +00:00
}
void QFileDialog_SetOptions ( QFileDialog * self , int options ) {
self - > setOptions ( static_cast < QFileDialog : : Options > ( options ) ) ;
}
2024-09-11 05:41:09 +00:00
int QFileDialog_Options ( const QFileDialog * self ) {
2024-09-14 22:29:05 +00:00
QFileDialog : : Options _ret = self - > options ( ) ;
return static_cast < int > ( _ret ) ;
2024-08-25 04:08:24 +00:00
}
void QFileDialog_SetVisible ( QFileDialog * self , bool visible ) {
self - > setVisible ( visible ) ;
}
2024-10-18 23:53:33 +00:00
void QFileDialog_FileSelected ( QFileDialog * self , struct miqt_string file ) {
QString file_QString = QString : : fromUtf8 ( file . data , file . len ) ;
2024-08-25 04:08:24 +00:00
self - > fileSelected ( file_QString ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_FileSelected ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QString & ) > ( & QFileDialog : : fileSelected ) , self , [ = ] ( const QString & file ) {
2024-09-14 22:29:05 +00:00
const QString file_ret = file ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray file_b = file_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string file_ms ;
file_ms . len = file_b . length ( ) ;
file_ms . data = static_cast < char * > ( malloc ( file_ms . len ) ) ;
memcpy ( file_ms . data , file_b . data ( ) , file_ms . len ) ;
struct miqt_string sigval1 = file_ms ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_FileSelected ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-11-17 06:21:37 +00:00
void QFileDialog_FilesSelected ( QFileDialog * self , struct miqt_array /* of struct miqt_string */ files ) {
2024-10-16 05:07:56 +00:00
QStringList files_QList ;
2024-11-04 07:18:27 +00:00
files_QList . reserve ( files . len ) ;
struct miqt_string * files_arr = static_cast < struct miqt_string * > ( files . data ) ;
for ( size_t i = 0 ; i < files . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString files_arr_i_QString = QString : : fromUtf8 ( files_arr [ i ] . data , files_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
files_QList . push_back ( files_arr_i_QString ) ;
2024-08-25 04:08:24 +00:00
}
self - > filesSelected ( files_QList ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_FilesSelected ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QStringList & ) > ( & QFileDialog : : filesSelected ) , self , [ = ] ( const QStringList & files ) {
2024-09-14 22:29:05 +00:00
const QStringList & files_ret = files ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * files_arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * files_ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = files_ret . length ( ) ; i < e ; + + i ) {
QString files_lv_ret = files_ret [ i ] ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray files_lv_b = files_lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string files_lv_ms ;
files_lv_ms . len = files_lv_b . length ( ) ;
files_lv_ms . data = static_cast < char * > ( malloc ( files_lv_ms . len ) ) ;
memcpy ( files_lv_ms . data , files_lv_b . data ( ) , files_lv_ms . len ) ;
files_arr [ i ] = files_lv_ms ;
2024-09-14 22:29:05 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array files_out ;
files_out . len = files_ret . length ( ) ;
files_out . data = static_cast < void * > ( files_arr ) ;
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ sigval1 = files_out ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_FilesSelected ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-10-18 23:53:33 +00:00
void QFileDialog_CurrentChanged ( QFileDialog * self , struct miqt_string path ) {
QString path_QString = QString : : fromUtf8 ( path . data , path . len ) ;
2024-08-25 04:08:24 +00:00
self - > currentChanged ( path_QString ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_CurrentChanged ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QString & ) > ( & QFileDialog : : currentChanged ) , self , [ = ] ( const QString & path ) {
2024-09-14 22:29:05 +00:00
const QString path_ret = path ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray path_b = path_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string path_ms ;
path_ms . len = path_b . length ( ) ;
path_ms . data = static_cast < char * > ( malloc ( path_ms . len ) ) ;
memcpy ( path_ms . data , path_b . data ( ) , path_ms . len ) ;
struct miqt_string sigval1 = path_ms ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_CurrentChanged ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-10-18 23:53:33 +00:00
void QFileDialog_DirectoryEntered ( QFileDialog * self , struct miqt_string directory ) {
QString directory_QString = QString : : fromUtf8 ( directory . data , directory . len ) ;
2024-08-25 04:08:24 +00:00
self - > directoryEntered ( directory_QString ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_DirectoryEntered ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QString & ) > ( & QFileDialog : : directoryEntered ) , self , [ = ] ( const QString & directory ) {
2024-09-14 22:29:05 +00:00
const QString directory_ret = directory ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray directory_b = directory_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string directory_ms ;
directory_ms . len = directory_b . length ( ) ;
directory_ms . data = static_cast < char * > ( malloc ( directory_ms . len ) ) ;
memcpy ( directory_ms . data , directory_b . data ( ) , directory_ms . len ) ;
struct miqt_string sigval1 = directory_ms ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_DirectoryEntered ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
void QFileDialog_UrlSelected ( QFileDialog * self , QUrl * url ) {
self - > urlSelected ( * url ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_UrlSelected ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QUrl & ) > ( & QFileDialog : : urlSelected ) , self , [ = ] ( const QUrl & url ) {
2024-09-14 22:29:05 +00:00
const QUrl & url_ret = url ;
// Cast returned reference into pointer
QUrl * sigval1 = const_cast < QUrl * > ( & url_ret ) ;
miqt_exec_callback_QFileDialog_UrlSelected ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-11-17 06:21:37 +00:00
void QFileDialog_UrlsSelected ( QFileDialog * self , struct miqt_array /* of QUrl* */ urls ) {
2024-08-25 04:08:24 +00:00
QList < QUrl > urls_QList ;
2024-11-04 07:18:27 +00:00
urls_QList . reserve ( urls . len ) ;
QUrl * * urls_arr = static_cast < QUrl * * > ( urls . data ) ;
for ( size_t i = 0 ; i < urls . len ; + + i ) {
2024-09-14 22:29:05 +00:00
urls_QList . push_back ( * ( urls_arr [ i ] ) ) ;
2024-08-25 04:08:24 +00:00
}
self - > urlsSelected ( urls_QList ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_UrlsSelected ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QList < QUrl > & ) > ( & QFileDialog : : urlsSelected ) , self , [ = ] ( const QList < QUrl > & urls ) {
2024-09-14 22:29:05 +00:00
const QList < QUrl > & urls_ret = urls ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * urls_arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * urls_ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = urls_ret . length ( ) ; i < e ; + + i ) {
urls_arr [ i ] = new QUrl ( urls_ret [ i ] ) ;
}
2024-11-04 07:18:27 +00:00
struct miqt_array urls_out ;
urls_out . len = urls_ret . length ( ) ;
urls_out . data = static_cast < void * > ( urls_arr ) ;
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ sigval1 = urls_out ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_UrlsSelected ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
void QFileDialog_CurrentUrlChanged ( QFileDialog * self , QUrl * url ) {
self - > currentUrlChanged ( * url ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_CurrentUrlChanged ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QUrl & ) > ( & QFileDialog : : currentUrlChanged ) , self , [ = ] ( const QUrl & url ) {
2024-09-14 22:29:05 +00:00
const QUrl & url_ret = url ;
// Cast returned reference into pointer
QUrl * sigval1 = const_cast < QUrl * > ( & url_ret ) ;
miqt_exec_callback_QFileDialog_CurrentUrlChanged ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
void QFileDialog_DirectoryUrlEntered ( QFileDialog * self , QUrl * directory ) {
self - > directoryUrlEntered ( * directory ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_DirectoryUrlEntered ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QUrl & ) > ( & QFileDialog : : directoryUrlEntered ) , self , [ = ] ( const QUrl & directory ) {
2024-09-14 22:29:05 +00:00
const QUrl & directory_ret = directory ;
// Cast returned reference into pointer
QUrl * sigval1 = const_cast < QUrl * > ( & directory_ret ) ;
miqt_exec_callback_QFileDialog_DirectoryUrlEntered ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-10-18 23:53:33 +00:00
void QFileDialog_FilterSelected ( QFileDialog * self , struct miqt_string filter ) {
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-08-25 04:08:24 +00:00
self - > filterSelected ( filter_QString ) ;
}
2024-10-13 06:06:06 +00:00
void QFileDialog_connect_FilterSelected ( QFileDialog * self , intptr_t slot ) {
2024-11-19 06:29:06 +00:00
MiqtVirtualQFileDialog : : connect ( self , static_cast < void ( QFileDialog : : * ) ( const QString & ) > ( & QFileDialog : : filterSelected ) , self , [ = ] ( const QString & filter ) {
2024-09-14 22:29:05 +00:00
const QString filter_ret = filter ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray filter_b = filter_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string filter_ms ;
filter_ms . len = filter_b . length ( ) ;
filter_ms . data = static_cast < char * > ( malloc ( filter_ms . len ) ) ;
memcpy ( filter_ms . data , filter_b . data ( ) , filter_ms . len ) ;
struct miqt_string sigval1 = filter_ms ;
2024-09-14 22:29:05 +00:00
miqt_exec_callback_QFileDialog_FilterSelected ( slot , sigval1 ) ;
2024-08-25 04:08:24 +00:00
} ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetOpenFileName ( ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getOpenFileName ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetOpenFileUrl ( ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getOpenFileUrl ( ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetSaveFileName ( ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getSaveFileName ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetSaveFileUrl ( ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getSaveFileUrl ( ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetExistingDirectory ( ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getExistingDirectory ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetExistingDirectoryUrl ( ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames ( ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = QFileDialog : : getOpenFileNames ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls ( ) {
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = QFileDialog : : getOpenFileUrls ( ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-10-25 21:42:03 +00:00
void QFileDialog_SaveFileContent ( struct miqt_string fileContent , struct miqt_string fileNameHint ) {
2024-10-18 23:53:33 +00:00
QByteArray fileContent_QByteArray ( fileContent . data , fileContent . len ) ;
2024-10-25 21:42:03 +00:00
QString fileNameHint_QString = QString : : fromUtf8 ( fileNameHint . data , fileNameHint . len ) ;
QFileDialog : : saveFileContent ( fileContent_QByteArray , fileNameHint_QString ) ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_Tr2 ( const char * s , const char * c ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : tr ( s , c ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_Tr3 ( const char * s , const char * c , int n ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : tr ( s , c , static_cast < int > ( n ) ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_TrUtf82 ( const char * s , const char * c ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : trUtf8 ( s , c ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_TrUtf83 ( const char * s , const char * c , int n ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : trUtf8 ( s , c , static_cast < int > ( n ) ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-25 04:08:24 +00:00
}
2024-09-18 00:12:02 +00:00
void QFileDialog_SetOption2 ( QFileDialog * self , int option , bool on ) {
2024-08-29 07:01:51 +00:00
self - > setOption ( static_cast < QFileDialog : : Option > ( option ) , on ) ;
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetOpenFileName1 ( QWidget * parent ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getOpenFileName ( parent ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetOpenFileName2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getOpenFileName ( parent , caption_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetOpenFileName3 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getOpenFileName ( parent , caption_QString , dir_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetOpenFileName4 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir , struct miqt_string filter ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getOpenFileName ( parent , caption_QString , dir_QString , filter_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetOpenFileUrl1 ( QWidget * parent ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getOpenFileUrl ( parent ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetOpenFileUrl2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getOpenFileUrl ( parent , caption_QString ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetOpenFileUrl3 ( QWidget * parent , struct miqt_string caption , QUrl * dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getOpenFileUrl ( parent , caption_QString , * dir ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetOpenFileUrl4 ( QWidget * parent , struct miqt_string caption , QUrl * dir , struct miqt_string filter ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getOpenFileUrl ( parent , caption_QString , * dir , filter_QString ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetSaveFileName1 ( QWidget * parent ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getSaveFileName ( parent ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetSaveFileName2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getSaveFileName ( parent , caption_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetSaveFileName3 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getSaveFileName ( parent , caption_QString , dir_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetSaveFileName4 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir , struct miqt_string filter ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getSaveFileName ( parent , caption_QString , dir_QString , filter_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetSaveFileUrl1 ( QWidget * parent ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getSaveFileUrl ( parent ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetSaveFileUrl2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getSaveFileUrl ( parent , caption_QString ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetSaveFileUrl3 ( QWidget * parent , struct miqt_string caption , QUrl * dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getSaveFileUrl ( parent , caption_QString , * dir ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetSaveFileUrl4 ( QWidget * parent , struct miqt_string caption , QUrl * dir , struct miqt_string filter ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getSaveFileUrl ( parent , caption_QString , * dir , filter_QString ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetExistingDirectory1 ( QWidget * parent ) {
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getExistingDirectory ( parent ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetExistingDirectory2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getExistingDirectory ( parent , caption_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetExistingDirectory3 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getExistingDirectory ( parent , caption_QString , dir_QString ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
struct miqt_string QFileDialog_GetExistingDirectory4 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir , int options ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
2024-09-14 22:29:05 +00:00
QString _ret = QFileDialog : : getExistingDirectory ( parent , caption_QString , dir_QString , static_cast < QFileDialog : : Options > ( options ) ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _ms ;
_ms . len = _b . length ( ) ;
_ms . data = static_cast < char * > ( malloc ( _ms . len ) ) ;
memcpy ( _ms . data , _b . data ( ) , _ms . len ) ;
return _ms ;
2024-08-29 07:01:51 +00:00
}
QUrl * QFileDialog_GetExistingDirectoryUrl1 ( QWidget * parent ) {
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( parent ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetExistingDirectoryUrl2 ( QWidget * parent , struct miqt_string caption ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( parent , caption_QString ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetExistingDirectoryUrl3 ( QWidget * parent , struct miqt_string caption , QUrl * dir ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( parent , caption_QString , * dir ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-10-18 23:53:33 +00:00
QUrl * QFileDialog_GetExistingDirectoryUrl4 ( QWidget * parent , struct miqt_string caption , QUrl * dir , int options ) {
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( parent , caption_QString , * dir , static_cast < QFileDialog : : Options > ( options ) ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
QUrl * QFileDialog_GetExistingDirectoryUrl5 ( QWidget * parent , struct miqt_string caption , QUrl * dir , int options , struct miqt_array /* of struct miqt_string */ supportedSchemes ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-10-16 05:07:56 +00:00
QStringList supportedSchemes_QList ;
2024-11-04 07:18:27 +00:00
supportedSchemes_QList . reserve ( supportedSchemes . len ) ;
struct miqt_string * supportedSchemes_arr = static_cast < struct miqt_string * > ( supportedSchemes . data ) ;
for ( size_t i = 0 ; i < supportedSchemes . len ; + + i ) {
2024-10-18 23:53:33 +00:00
QString supportedSchemes_arr_i_QString = QString : : fromUtf8 ( supportedSchemes_arr [ i ] . data , supportedSchemes_arr [ i ] . len ) ;
2024-09-17 07:43:35 +00:00
supportedSchemes_QList . push_back ( supportedSchemes_arr_i_QString ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-17 06:29:11 +00:00
return new QUrl ( QFileDialog : : getExistingDirectoryUrl ( parent , caption_QString , * dir , static_cast < QFileDialog : : Options > ( options ) , supportedSchemes_QList ) ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames1 ( QWidget * parent ) {
2024-09-14 22:29:05 +00:00
QStringList _ret = QFileDialog : : getOpenFileNames ( parent ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames2 ( QWidget * parent , struct miqt_string caption ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QStringList _ret = QFileDialog : : getOpenFileNames ( parent , caption_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames3 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
2024-09-14 22:29:05 +00:00
QStringList _ret = QFileDialog : : getOpenFileNames ( parent , caption_QString , dir_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of struct miqt_string */ QFileDialog_GetOpenFileNames4 ( QWidget * parent , struct miqt_string caption , struct miqt_string dir , struct miqt_string filter ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString dir_QString = QString : : fromUtf8 ( dir . data , dir . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-14 22:29:05 +00:00
QStringList _ret = QFileDialog : : getOpenFileNames ( parent , caption_QString , dir_QString , filter_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
2024-10-18 23:53:33 +00:00
struct miqt_string * _arr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
QString _lv_ret = _ret [ i ] ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _lv_b = _lv_ret . toUtf8 ( ) ;
2024-10-18 23:53:33 +00:00
struct miqt_string _lv_ms ;
_lv_ms . len = _lv_b . length ( ) ;
_lv_ms . data = static_cast < char * > ( malloc ( _lv_ms . len ) ) ;
memcpy ( _lv_ms . data , _lv_b . data ( ) , _lv_ms . len ) ;
_arr [ i ] = _lv_ms ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls1 ( QWidget * parent ) {
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = QFileDialog : : getOpenFileUrls ( parent ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls2 ( QWidget * parent , struct miqt_string caption ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = QFileDialog : : getOpenFileUrls ( parent , caption_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls3 ( QWidget * parent , struct miqt_string caption , QUrl * dir ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = QFileDialog : : getOpenFileUrls ( parent , caption_QString , * dir ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-17 06:21:37 +00:00
struct miqt_array /* of QUrl* */ QFileDialog_GetOpenFileUrls4 ( QWidget * parent , struct miqt_string caption , QUrl * dir , struct miqt_string filter ) {
2024-10-18 23:53:33 +00:00
QString caption_QString = QString : : fromUtf8 ( caption . data , caption . len ) ;
QString filter_QString = QString : : fromUtf8 ( filter . data , filter . len ) ;
2024-09-14 22:29:05 +00:00
QList < QUrl > _ret = QFileDialog : : getOpenFileUrls ( parent , caption_QString , * dir , filter_QString ) ;
2024-09-17 06:29:11 +00:00
// Convert QList<> from C++ memory to manually-managed C memory
QUrl * * _arr = static_cast < QUrl * * > ( malloc ( sizeof ( QUrl * ) * _ret . length ( ) ) ) ;
2024-09-14 22:29:05 +00:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QUrl ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-11-04 07:18:27 +00:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-14 22:29:05 +00:00
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-11-19 06:29:06 +00:00
void QFileDialog_override_virtual_SetVisible ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__SetVisible = slot ;
}
void QFileDialog_virtualbase_SetVisible ( void * self , bool visible ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_SetVisible ( visible ) ;
}
void QFileDialog_override_virtual_Done ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__Done = slot ;
}
void QFileDialog_virtualbase_Done ( void * self , int result ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_Done ( result ) ;
}
void QFileDialog_override_virtual_Accept ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__Accept = slot ;
}
void QFileDialog_virtualbase_Accept ( void * self ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_Accept ( ) ;
}
void QFileDialog_override_virtual_ChangeEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__ChangeEvent = slot ;
}
void QFileDialog_virtualbase_ChangeEvent ( void * self , QEvent * e ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_ChangeEvent ( e ) ;
}
void QFileDialog_override_virtual_SizeHint ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__SizeHint = slot ;
}
QSize * QFileDialog_virtualbase_SizeHint ( const void * self ) {
return ( ( const MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_SizeHint ( ) ;
}
void QFileDialog_override_virtual_MinimumSizeHint ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__MinimumSizeHint = slot ;
}
QSize * QFileDialog_virtualbase_MinimumSizeHint ( const void * self ) {
return ( ( const MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_MinimumSizeHint ( ) ;
}
void QFileDialog_override_virtual_Open ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__Open = slot ;
}
void QFileDialog_virtualbase_Open ( void * self ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_Open ( ) ;
}
void QFileDialog_override_virtual_Exec ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__Exec = slot ;
}
int QFileDialog_virtualbase_Exec ( void * self ) {
return ( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_Exec ( ) ;
}
void QFileDialog_override_virtual_Reject ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__Reject = slot ;
}
void QFileDialog_virtualbase_Reject ( void * self ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_Reject ( ) ;
}
void QFileDialog_override_virtual_KeyPressEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__KeyPressEvent = slot ;
}
void QFileDialog_virtualbase_KeyPressEvent ( void * self , QKeyEvent * param1 ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_KeyPressEvent ( param1 ) ;
}
void QFileDialog_override_virtual_CloseEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__CloseEvent = slot ;
}
void QFileDialog_virtualbase_CloseEvent ( void * self , QCloseEvent * param1 ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_CloseEvent ( param1 ) ;
}
void QFileDialog_override_virtual_ShowEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__ShowEvent = slot ;
}
void QFileDialog_virtualbase_ShowEvent ( void * self , QShowEvent * param1 ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_ShowEvent ( param1 ) ;
}
void QFileDialog_override_virtual_ResizeEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__ResizeEvent = slot ;
}
void QFileDialog_virtualbase_ResizeEvent ( void * self , QResizeEvent * param1 ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_ResizeEvent ( param1 ) ;
}
void QFileDialog_override_virtual_ContextMenuEvent ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__ContextMenuEvent = slot ;
}
void QFileDialog_virtualbase_ContextMenuEvent ( void * self , QContextMenuEvent * param1 ) {
( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_ContextMenuEvent ( param1 ) ;
}
void QFileDialog_override_virtual_EventFilter ( void * self , intptr_t slot ) {
dynamic_cast < MiqtVirtualQFileDialog * > ( ( QFileDialog * ) ( self ) ) - > handle__EventFilter = slot ;
}
bool QFileDialog_virtualbase_EventFilter ( void * self , QObject * param1 , QEvent * param2 ) {
return ( ( MiqtVirtualQFileDialog * ) ( self ) ) - > virtualbase_EventFilter ( param1 , param2 ) ;
}
void QFileDialog_Delete ( QFileDialog * self , bool isSubclass ) {
if ( isSubclass ) {
delete dynamic_cast < MiqtVirtualQFileDialog * > ( self ) ;
} else {
delete self ;
}
2024-08-25 04:08:24 +00:00
}