53 #include <QtCore/qglobal.h> 54 #if !defined(QT_NO_STYLE_GTK) 56 #include <QtCore/QEvent> 57 #include <QtCore/QFile> 58 #include <QtCore/QStringList> 59 #include <QtCore/QTextStream> 60 #include <QtCore/QHash> 61 #include <QtCore/QUrl> 62 #include <QtCore/QLibrary> 63 #include <QtCore/QDebug> 65 #include <private/qapplication_p.h> 66 #include <private/qiconloader_p.h> 68 #include <QtGui/QMenu> 69 #include <QtGui/QStyle> 70 #include <QtGui/QApplication> 71 #include <QtGui/QPixmapCache> 72 #include <QtGui/QStatusBar> 73 #include <QtGui/QMenuBar> 74 #include <QtGui/QToolBar> 75 #include <QtGui/QToolButton> 76 #include <QtGui/QX11Info> 78 #include <private/qt_x11_p.h> 217 qRegisterMetaType<QGtkStylePrivate *>();
227 GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
228 g_object_get(gtkToolBar,
"toolbar-style", &toolbar_style, NULL);
230 for (
int i = 0; i < widgets.
size(); ++i) {
232 if (qobject_cast<QToolButton*>(widget)) {
244 char *copy = class_path;
245 if (strncmp(copy,
"GtkWindow.", 10) == 0)
247 if (strncmp(copy,
"GtkFixed.", 9) == 0)
494 uid_t ruid = getuid ();
495 uid_t rgid = getgid ();
496 uid_t euid = geteuid ();
497 uid_t egid = getegid ();
498 if (ruid != euid || rgid != egid) {
499 qWarning(
"\nThis process is currently running setuid or setgid.\nGTK+ does not allow this " 500 "therefore Qt cannot use the GTK+ integration.\nTry launching your app using \'gksudo\', " 501 "\'kdesudo\' or a similar tool.\n\n" 502 "See http://www.gtk.org/setuid.html for more information.\n");
510 if (themeName ==
QLS(
"Qt") || themeName ==
QLS(
"Qt4")) {
513 qWarning(
"QGtkStyle cannot be used together with the GTK_Qt engine.");
522 XSetErrorHandler(qt_x_errhandler);
563 g_signal_connect (toolbar,
"notify::toolbar-style", G_CALLBACK (
update_toolbar_style), toolbar);
577 QHashIterator<QHashableLatin1Literal, GtkWidget*>
it(oldMap);
578 while (it.hasNext()) {
580 if (!strchr(it.key().data(),
'.')) {
583 free(const_cast<char *>(it.key().data()));
587 qWarning(
"QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.");
602 free(const_cast<char *>(
it.key().data()));
627 g_object_unref(client);
642 g_object_unref(client);
660 foreach (
const QString &rcPath, paths) {
662 QFile rcFile(rcPath);
702 XSetErrorHandler(qt_x_errhandler);
705 g_object_get(settings,
"gtk-icon-theme-name", &value, NULL);
714 const int MIN_ARROW_WIDTH = 6;
715 GtkWidget *spinButton =
gtkWidget(
"GtkSpinButton");
716 GtkStyle *style = spinButton->style;
719 arrow_size =
qMax(PANGO_PIXELS (size), MIN_ARROW_WIDTH) + style->xthickness;
720 arrow_size += arrow_size%2 + 1;
727 static int version = -1;
730 return (version == 4);
736 GdkColor gdkBg =
gtkWidget(
"GtkMenu")->style->bg[GTK_STATE_NORMAL];
737 QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
740 qApp->setPalette(menuPal,
"QMenu");
743 qApp->setPalette(toolbarPal,
"QToolBar");
746 qApp->setPalette(menuBarPal,
"QMenuBar");
760 static GtkWidget* protoLayout = 0;
767 if (!widget->parent && !GTK_WIDGET_TOPLEVEL(widget))
777 if (it != map->
end()) {
778 free(const_cast<char *>(it.
key().data()));
791 #ifdef DUMP_GTK_WIDGET_TREE 811 GdkColor gdkBg = gtkWidget->style->bg[GTK_STATE_NORMAL];
812 GdkColor gdkText = gtkWidget->style->fg[GTK_STATE_NORMAL];
813 GdkColor gdkDisabledText = gtkWidget->style->fg[GTK_STATE_INSENSITIVE];
814 QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
815 QColor textColor(gdkText.red>>8, gdkText.green>>8, gdkText.blue>>8);
816 QColor disabledTextColor(gdkDisabledText.red>>8, gdkDisabledText.green>>8, gdkDisabledText.blue>>8);
841 if (!QGtkStylePrivate::instances.
isEmpty()) {
870 if (style &&
qApp->desktopSettingsAware())
872 PangoFontDescription *gtk_font = style->font_desc;
880 if (weight >= PANGO_WEIGHT_HEAVY)
882 else if (weight >= PANGO_WEIGHT_BOLD)
884 else if (weight >= PANGO_WEIGHT_SEMIBOLD)
886 else if (weight >= PANGO_WEIGHT_NORMAL)
892 if (fontstyle == PANGO_STYLE_ITALIC)
894 else if (fontstyle == PANGO_STYLE_OBLIQUE)
920 QFileDialog::Options options,
bool isSaveDialog,
924 g_object_set(gtkFileChooser,
"local_only", gboolean(
true), NULL);
927 foreach (
const QString &rawfilter, filters) {
933 foreach (
const QString &fileExtension, extensions) {
938 for (
int i = 0 ; i < fileExtension.
length() ; ++i) {
939 QChar ch = fileExtension.
at(i);
947 caseInsensitive.
append(ch);
954 filterMap->
insert(gtkFilter, rawfilter);
956 if (selectedFilter && (rawfilter == *selectedFilter))
978 if (fileinfo.
isDir()) {
980 }
else if (isSaveDialog) {
989 QString *selectedFilter, QFileDialog::Options options)
994 GTK_FILE_CHOOSER_ACTION_OPEN,
995 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
996 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
999 setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options,
false, &filterMap);
1010 g_free (gtk_filename);
1011 if (selectedFilter) {
1013 *selectedFilter = filterMap.
value(gtkFilter);
1028 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
1029 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1030 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
1043 g_free (gtk_filename);
1052 QString *selectedFilter, QFileDialog::Options options)
1058 GTK_FILE_CHOOSER_ACTION_OPEN,
1059 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1060 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
1063 setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options,
false, &filterMap);
1064 g_object_set(gtkFileChooser,
"select-multiple", gboolean(
true), NULL);
1071 if (
gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
1073 for (GSList *iterator = gtk_file_names ; iterator; iterator = iterator->next)
1075 g_slist_free(gtk_file_names);
1076 if (selectedFilter) {
1078 *selectedFilter = filterMap.
value(gtkFilter);
1088 QString *selectedFilter, QFileDialog::Options options)
1093 GTK_FILE_CHOOSER_ACTION_SAVE,
1094 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1095 GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
1097 setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options,
true, &filterMap);
1108 g_free (gtk_filename);
1109 if (selectedFilter) {
1111 *selectedFilter = filterMap.
value(gtkFilter);
1136 return QIcon(iconName);
1156 h = (h << 4) + *p++;
1157 if ((g = (h & 0xf0000000)) != 0)
1166 #endif // !defined(QT_NO_STYLE_GTK) static Ptr_gdk_drawable_get_depth gdk_drawable_get_depth
static Ptr_gtk_widget_path gtk_widget_path
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
#define Q_GTK_IS_WIDGET(widget)
static Ptr_gtk_window_new gtk_window_new
The QColor class provides colors based on RGB, HSV or CMYK values.
Q_DECLARE_METATYPE(QGtkStylePrivate *)
char *(* Ptr_gnome_icon_lookup_sync)(GtkIconTheme *icon_theme, GnomeThumbnailFactory *, const char *file_uri, const char *custom_icon, GnomeIconLookupFlags flags, GnomeIconLookupResultFlags *result)
int(* Ptr_gdk_pixbuf_get_height)(const GdkPixbuf *pixbuf)
static QWidgetList allWidgets()
Returns a list of all the widgets in the application.
GdkPixbuf *(* Ptr_gtk_icon_set_render_icon)(GtkIconSet *, GtkStyle *, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget *, const char *)
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter
PangoWeight(* Ptr_pango_font_description_get_weight)(const PangoFontDescription *)
static Ptr_gdk_draw_rectangle gdk_draw_rectangle
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
void(* Ptr_gdk_draw_rectangle)(GdkDrawable *drawable, GdkGC *gc, gboolean filled, gint x, gint y, gint width, gint height)
static void setPalette(const QPalette &, const char *className=0)
Changes the default application palette to palette.
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
bool isLetter() const
Returns true if the character is a letter (Letter_* categories); otherwise returns false...
static QList< QGtkStylePrivate * > instances
static Ptr_gtk_widget_get_type gtk_widget_get_type
static Ptr_gtk_entry_new gtk_entry_new
static mach_timebase_info_data_t info
XID(* Ptr_gdk_x11_drawable_get_xid)(GdkDrawable *)
GtkStyle *(* Ptr_gtk_style_attach)(GtkStyle *, GdkWindow *)
static Ptr_pango_font_description_get_style pango_font_description_get_style
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
static Ptr_gconf_client_get_string gconf_client_get_string
#define QT_END_NAMESPACE
This macro expands to.
GtkObject *(* Ptr_gtk_adjustment_new)(double, double, double, double, double, double)
static Ptr_gconf_client_get_default gconf_client_get_default
QString readLine(qint64 maxlen=0)
Reads one line of text from the stream, and returns it as a QString.
QPointer< QWidget > widget
void(* Ptr_gtk_paint_box)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
gchar *(* Ptr_gtk_check_version)(guint, guint, guint)
void clear()
Removes all items from the hash.
void(* Ptr_gtk_widget_size_allocate)(GtkWidget *, GtkAllocation *)
void(* Ptr_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
char * data()
Returns a pointer to the data stored in the byte array.
static Ptr_gtk_file_filter_new gtk_file_filter_new
static WidgetMap * widgetMap
static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new
const QChar at(int i) const
Returns the character at the given index position in the string.
static unsigned long appUserTime()
Returns the X11 user time.
static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new
static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid
The QRegExp class provides pattern matching using regular expressions.
void(* Ptr_gtk_paint_slider)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkOrientation)
static Ptr_gtk_style_attach gtk_style_attach
static Ptr_gtk_expander_new gtk_expander_new
static Ptr_gtk_paint_check gtk_paint_check
static Ptr_gtk_widget_set_direction gtk_widget_set_direction
#define it(className, varName)
GtkWidget *(* Ptr_gtk_vscale_new)(GtkAdjustment *)
bool open(OpenMode flags)
Opens the file using OpenMode mode, returning true if successful; otherwise false.
GtkWidget *(* Ptr_gtk_arrow_new)(GtkArrowType, GtkShadowType)
static Ptr_gtk_range_set_inverted gtk_range_set_inverted
static QString saveFilename(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
static Ptr_gtk_progress_bar_new gtk_progress_bar_new
static QIcon fromTheme(const QString &name, const QIcon &fallback=QIcon())
Returns the QIcon corresponding to name in the current icon theme.
void(* Ptr_gtk_file_filter_add_pattern)(GtkFileFilter *filter, const gchar *pattern)
GtkWidget *(* Ptr_gtk_combo_box_entry_new)(void)
static Ptr_gtk_menu_new gtk_menu_new
The QByteArray class provides an array of bytes.
void(* Ptr_gdk_drawable_unref)(GdkDrawable *)
int length() const
Returns the number of characters in this string.
static Ptr_gtk_widget_size_allocate gtk_widget_size_allocate
virtual int getSpinboxArrowSize() const
static Ptr_gtk_widget_destroy gtk_widget_destroy
bool eventFilter(QObject *obj, QEvent *e)
Filters events if this object has been installed as an event filter for the watched object...
PangoStyle(* Ptr_pango_font_description_get_style)(const PangoFontDescription *desc)
void(* Ptr_gtk_paint_option)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
GtkWidget *(* Ptr_gtk_tool_button_new)(GtkWidget *, const gchar *)
QString fileName() const
Returns the name of the file, excluding the path.
GtkWidget *(* Ptr_gtk_file_chooser_dialog_new)(const gchar *title, GtkWindow *parent, GtkFileChooserAction action, const gchar *first_button_text,...)
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename
char *(* Ptr_gconf_client_get_string)(GConfClient *, const char *, GError **)
static Ptr_gdk_pixbuf_get_width gdk_pixbuf_get_width
static Ptr_gtk_fixed_new gtk_fixed_new
static Ptr_gtk_paint_vline gtk_paint_vline
static Ptr_gtk_range_get_adjustment gtk_range_get_adjustment
void(* Ptr_gdk_color_free)(const GdkColor *)
GtkWidget *(* Ptr_gtk_menu_item_new_with_label)(const gchar *)
static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new
static Ptr_gtk_container_get_type gtk_container_get_type
virtual void initGtkWidgets() const
static Ptr_gconf_client_get_bool gconf_client_get_bool
GtkFileFilter *(* Ptr_gtk_file_filter_new)(void)
QString absoluteFilePath() const
Returns an absolute path including the file name.
static Ptr_gtk_widget_modify_color gtk_widget_modify_bg
static Ptr_gdk_pixmap_new gdk_pixmap_new
static Ptr_gtk_file_filter_set_name gtk_file_filter_set_name
static QPalette palette()
Returns the application palette.
GtkIconTheme *(* Ptr_gtk_icon_theme_get_default)(void)
void(* Ptr_gtk_file_chooser_add_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
static bool isKDE4Session()
static Ptr_gtk_paint_arrow gtk_paint_arrow
static Ptr_gtk_paint_option gtk_paint_option
static Ptr_gtk_menu_bar_new gtk_menu_bar_new
GtkWidget *(* Ptr_gtk_statusbar_new)(void)
void * resolve(const char *symbol)
Returns the address of the exported symbol symbol.
static Ptr_gtk_menu_shell_append gtk_menu_shell_append
static Ptr_gtk_window_get_type gtk_window_get_type
const char * data() const
void(* Ptr_gtk_menu_shell_append)(GtkMenuShell *, GtkWidget *)
static QStringList openFilenames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
The QString class provides a Unicode character string.
gint(* Ptr_pango_font_description_get_size)(const PangoFontDescription *)
static QString currentPath()
Returns the absolute path of the application's current directory.
The QHash class is a template class that provides a hash-table-based dictionary.
GtkAdjustment *(* Ptr_gtk_range_get_adjustment)(GtkRange *)
The QObject class is the base class of all Qt objects.
void(* Ptr_gtk_progress_configure)(GtkProgress *, double, double, double)
static void setupGtkFileChooser(GtkWidget *gtkFileChooser, QWidget *parent, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, bool isSaveDialog=false, QMap< GtkFileFilter *, QString > *filterMap=0)
static Ptr_gtk_toolbar_insert gtk_toolbar_insert
Q_GUI_EXPORT QString extensions()
void(* Ptr_gtk_paint_hline)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint y)
GtkType(* Ptr_gtk_window_get_type)(void)
static void addWidgetToMap(GtkWidget *widget)
GtkType(* Ptr_gtk_container_get_type)(void)
static Ptr_gtk_paint_box gtk_paint_box
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new
The QChar class provides a 16-bit Unicode character.
static GtkWidget * gtkWidget(const QHashableLatin1Literal &path)
QGtkStylePrivate * stylePrivate
static Ptr_gtk_paint_handle gtk_paint_handle
static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern
const T value(const Key &key) const
Returns the value associated with the key.
static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay
static QHashableLatin1Literal fromData(const char *str)
GtkTreeViewColumn *(* Ptr_gtk_tree_view_column_new)(void)
static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void(* Ptr_gtk_paint_shadow)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
static Ptr_gtk_widget_style_get gtk_widget_style_get
static Ptr_gtk_paint_extension gtk_paint_extension
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
GtkWidget *(* Ptr_gtk_hscrollbar_new)(GtkAdjustment *)
const char *(* Ptr_pango_font_description_get_family)(const PangoFontDescription *)
static Ptr_pango_font_description_get_size pango_font_description_get_size
static QString getIconThemeName()
static QFont font()
Returns the default application font.
GtkWidget *(* Ptr_gtk_menu_new)(void)
void setFamily(const QString &)
Sets the family name of the font.
bool exists() const
Returns true if the file specified by fileName() exists; otherwise returns false. ...
static Ptr_gtk_combo_box_new gtk_combo_box_new
gboolean(* Ptr_gnome_vfs_init)(void)
void(* Ptr_gtk_file_chooser_set_current_name)(GtkFileChooser *, const gchar *)
static Ptr_gdk_pixbuf_get_height gdk_pixbuf_get_height
bool removeOne(const T &t)
Removes the first occurrence of value in the list and returns true on success; otherwise returns fals...
GtkWidget *(* Ptr_gtk_frame_new)(const gchar *)
static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer)
GtkWidget *(* Ptr_gtk_expander_new)(const gchar *)
static Ptr_gtk_dialog_run gtk_dialog_run
static Ptr_gdk_pixbuf_new gdk_pixbuf_new
void append(const T &t)
Inserts value at the end of the list.
static Ptr_gtk_paint_expander gtk_paint_expander
GtkWidget *(* Ptr_gtk_radio_button_new)(GSList *)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static Ptr_gtk_file_chooser_set_filename gtk_file_chooser_set_filename
static QString openFilename(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
void setBrush(ColorRole cr, const QBrush &brush)
Sets the brush for the given color role to the specified brush for all groups in the palette...
void(* Ptr_gtk_paint_vline)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint)
static bool isEmpty(const char *str)
static Ptr_gdk_color_free gdk_color_free
static Ptr_gtk_icon_set_render_icon gtk_icon_set_render_icon
static QStringList extract_filter(const QString &rawFilter)
int indexIn(const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
Attempts to find a match in str from position offset (0 by default).
void(* Ptr_gtk_paint_arrow)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, GtkArrowType, gboolean, gint, gint, gint, gint)
static void removeWidgetFromMap(const QHashableLatin1Literal &path)
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise ret...
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
static Ptr_gtk_tree_view_get_column gtk_tree_view_get_column
static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
GtkIconSet *(* Ptr_gtk_icon_factory_lookup_default)(const gchar *)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static Ptr_gtk_spin_button_new gtk_spin_button_new
static Ptr_gtk_paint_focus gtk_paint_focus
void(* Ptr_gtk_widget_set_default_direction)(GtkTextDirection)
GtkSettings *(* Ptr_gtk_settings_get_default)(void)
void(* Ptr_gtk_paint_resize_grip)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, GdkWindowEdge, gint, gint, gint, gint)
static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new
const T value(const Key &key) const
Returns the value associated with the key key.
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
GtkWidget *(* Ptr_gtk_window_new)(GtkWindowType)
static Ptr_gtk_notebook_new gtk_notebook_new
void(* Ptr_gtk_border_free)(GtkBorder *)
const T & at(int i) const
Returns the item at index position i in the list.
GtkType(* Ptr_gtk_widget_get_type)(void)
static void gtkStyleSetCallback(GtkWidget *)
The QStringList class provides a list of strings.
bool operator==(const QHashableLatin1Literal &l1, const QHashableLatin1Literal &l2)
bool makeAbsolute()
Converts the file's path to an absolute path if it is not already in that form.
void(* Ptr_gdk_x11_window_set_user_time)(GdkWindow *window, guint32)
static void clear()
Removes all pixmaps from the cache.
void setFile(const QString &file)
Sets the file that the QFileInfo provides information about to file.
GtkWidget *(* Ptr_gtk_vscrollbar_new)(GtkAdjustment *)
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
void(* Ptr_gtk_paint_handle)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkOrientation)
bool isEmpty() const
Returns true if the hash contains no items; otherwise returns false.
uint qHash(const QHashableLatin1Literal &key)
static Ptr_gtk_button_new gtk_button_new
Q_CORE_EXPORT void qWarning(const char *,...)
GtkWidget *(* Ptr_gtk_check_menu_item_new_with_label)(const gchar *)
GtkWidget *(* Ptr_gtk_progress_bar_new)(void)
static void addWidget(GtkWidget *widget)
static QString getGConfString(const QString &key, const QString &fallback=QString())
static Ptr_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static Ptr_gtk_paint_shadow gtk_paint_shadow
GSList *(* Ptr_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser)
int(* Ptr_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf)
void(* Ptr_gtk_container_forall)(GtkContainer *, GtkCallback, gpointer)
static Ptr_gtk_adjustment_new gtk_adjustment_new
GdkPixbuf *(* Ptr_gdk_pixbuf_get_from_drawable)(GdkPixbuf *dest, GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void(* Ptr_gtk_tree_view_append_column)(GtkTreeView *, GtkTreeViewColumn *)
static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time
void(* Ptr_gtk_menu_item_set_submenu)(GtkMenuItem *, GtkWidget *)
QChar toUpper() const
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
static Ptr_gtk_widget_realize gtk_widget_realize
bool(* Ptr_gconf_client_get_bool)(GConfClient *, const char *, GError **)
static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new
QString right(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n rightmost characters of the string.
virtual GtkWidget * getTextColorWidget() const
static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column
void(* Ptr_gtk_widget_style_get)(GtkWidget *, const gchar *first_property_name,...)
int(* x11ErrorHandler)(Display *, XErrorEvent *)
const Key & key() const
Returns the current item's key as a const reference.
void(* Ptr_gtk_paint_check)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
virtual void resolveGtk() const
gboolean(* Ptr_gtk_file_chooser_set_current_folder)(GtkFileChooser *, const gchar *)
static Ptr_gtk_widget_size_request gtk_widget_size_request
static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter
virtual QPalette gtkWidgetPalette(const QHashableLatin1Literal >kWidgetName) const
static Ptr_gtk_radio_button_new gtk_radio_button_new
static Ptr_gtk_statusbar_new gtk_statusbar_new
static Ptr_gtk_check_version gtk_check_version
static Ptr_gtk_range_set_adjustment gtk_range_set_adjustment
static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new
static Ptr_gtk_paint_flat_box gtk_paint_flat_box
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
static Ptr_gtk_paint_box_gap gtk_paint_box_gap
static Ptr_gtk_paint_hline gtk_paint_hline
gboolean(* Ptr_gtk_file_chooser_set_filename)(GtkFileChooser *chooser, const gchar *name)
static QIcon getFilesystemIcon(const QFileInfo &)
static QIconLoader * instance()
static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new
GtkWidget *(* Ptr_gtk_separator_menu_item_new)(void)
static Ptr_gtk_border_free gtk_border_free
static void cleanupGtkWidgets()
static Ptr_gtk_container_forall gtk_container_forall
void(* Ptr_gtk_range_set_adjustment)(GtkRange *, GtkAdjustment *)
static Ptr_gtk_icon_factory_lookup_default gtk_icon_factory_lookup_default
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
QString join(const QString &sep) const
Joins all the string list's strings into a single string with each element separated by the given sep...
static Ptr_gtk_paint_resize_grip gtk_paint_resize_grip
GtkTreeViewColumn *(* Ptr_gtk_tree_view_get_column)(GtkTreeView *, gint)
static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
gchar *(* Ptr_gtk_file_chooser_get_filename)(GtkFileChooser *chooser)
void(* Ptr_gdk_pixbuf_unref)(GdkPixbuf *)
static const char *const filters[3]
static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label
static QFont getThemeFont()
static Ptr_gtk_frame_new gtk_frame_new
GtkWidget *(* Ptr_gtk_hbutton_box_new)(void)
void(* Ptr_gtk_paint_flat_box)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
QString & append(QChar c)
GtkWidget *(* Ptr_gtk_combo_box_new)(void)
GtkWidget *(* Ptr_gtk_spin_button_new)(GtkAdjustment *, double, int)
static Ptr_gtk_check_button_new gtk_check_button_new
The QFile class provides an interface for reading from and writing to files.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
static Ptr_gtk_settings_get_default gtk_settings_get_default
static Ptr_gtk_widget_modify_color gtk_widget_modify_fg
static Ptr_gtk_adjustment_configure gtk_adjustment_configure
The QTextStream class provides a convenient interface for reading and writing text.
static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter
The QFont class specifies a font used for drawing text.
static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void(* Ptr_gtk_paint_expander)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, GtkExpanderStyle)
GtkStyle *(* Ptr_gtk_rc_get_style_by_paths)(GtkSettings *, const char *, const char *, GType)
GtkWidget *(* Ptr_gtk_tree_view_new)(void)
static Ptr_gtk_vscale_new gtk_vscale_new
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
GtkWidget *(* Ptr_gtk_scrolled_window_new)(GtkAdjustment *, GtkAdjustment *)
int toInt(bool *ok=0, int base=10) const
Returns the byte array converted to an int using base base, which is 10 by default and must be betwee...
static GtkStyle * gtkStyle(const QHashableLatin1Literal &path=QHashableLatin1Literal("GtkWindow"))
static Ptr_gtk_progress_configure gtk_progress_configure
static QString getThemeName()
void(* Ptr_gtk_init)(int *, char ***)
T & last()
Returns a reference to the last item in the list.
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
int size() const
Returns the number of items in the list.
static void addAllSubWidgets(GtkWidget *widget, gpointer v=0)
gint(* Ptr_gtk_dialog_run)(GtkDialog *)
GtkWidget *(* Ptr_gtk_toolbar_new)(void)
static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
void setWeight(int)
Sets the weight the font to weight, which should be a value from the QFont::Weight enumeration...
void(* Ptr_gtk_paint_extension)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType)
static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder
static Ptr_pango_font_description_get_weight pango_font_description_get_weight
GtkToolItem *(* Ptr_gtk_separator_tool_item_new)(void)
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
static bool resolveGConf()
void(* Ptr_gtk_container_add)(GtkContainer *container, GtkWidget *widget)
static Ptr_gdk_pixbuf_unref gdk_pixbuf_unref
static QString openDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
static void setSystemPalette(const QPalette &pal)
void setLoadHints(LoadHints hints)
static Ptr_gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames
void(* Ptr_gtk_widget_modify_color)(GtkWidget *widget, GtkStateType state, const GdkColor *color)
void setPointSizeF(qreal)
Sets the point size to pointSize.
Display *(* Ptr_gdk_x11_drawable_get_xdisplay)(GdkDrawable *)
GtkWidget *(* Ptr_gtk_entry_new)(void)
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
GtkWidget *(* Ptr_gtk_button_new)(void)
virtual void initGtkTreeview() const
static Ptr_gtk_tool_button_new gtk_tool_button_new
static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
int qstrcmp(const QByteArray &str1, const char *str2)
GtkFileFilter *(* Ptr_gtk_file_chooser_get_filter)(GtkFileChooser *chooser)
static Ptr_gdk_pixbuf_get_from_drawable gdk_pixbuf_get_from_drawable
static Ptr_gtk_hscale_new gtk_hscale_new
virtual void initGtkMenu() const
GdkPixmap *(* Ptr_gdk_pixmap_new)(GdkDrawable *drawable, gint width, gint height, gint depth)
static Ptr_gdk_drawable_unref gdk_drawable_unref
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
static Ptr_gtk_toolbar_new gtk_toolbar_new
GtkWidget *(* Ptr_gtk_check_button_new)(void)
static Ptr_gtk_init gtk_init
bool atEnd() const
Returns true if there is no more data to be read from the QTextStream; otherwise returns false...
static Ptr_gtk_paint_slider gtk_paint_slider
static Ptr_gnome_vfs_init gnome_vfs_init
static QHashableLatin1Literal classPath(GtkWidget *widget)
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QStringList qt_make_filter_list(const QString &filter)
void applyCustomPaletteHash()
void(* Ptr_gtk_widget_set_direction)(GtkWidget *, GtkTextDirection)
static Ptr_gtk_container_add gtk_container_add
void(* Ptr_gtk_paint_box_gap)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType, gint gap_x, gint gap_width)
void(* Ptr_gtk_toolbar_insert)(GtkToolbar *toolbar, GtkToolItem *item, int pos)
The QFileInfo class provides system-independent file information.
PaletteHash * qt_app_palettes_hash()
void(* Ptr_gtk_paint_focus)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
static Ptr_gtk_arrow_new gtk_arrow_new
The QEvent class is the base class of all event classes.
gint(* Ptr_gdk_drawable_get_depth)(GdkDrawable *)
#define qPrintable(string)
Type type() const
Returns the event type.
GtkWidget *(* Ptr_gtk_fixed_new)(void)
GdkPixbuf *(* Ptr_gdk_pixbuf_new)(GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height)
static void leaveModal(QWidget *)
static WidgetMap * gtkWidgetMap()
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void(* Ptr_gtk_widget_size_request)(GtkWidget *widget, GtkRequisition *requisition)
QChar toLower() const
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the ch...
QString absolutePath() const
Returns a file's path absolute path.
GtkWidget *(* Ptr_gtk_notebook_new)(void)
iterator erase(iterator it)
Removes the (key, value) pair associated with the iterator pos from the hash, and returns an iterator...
static bool getGConfBool(const QString &key, bool fallback=0)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
void setStyle(Style style)
Sets the style of the font to style.
static void enterModal(QWidget *)
void(* Ptr_gtk_widget_destroy)(GtkWidget *)
static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default
static void setupGtkWidget(GtkWidget *widget)
The QMap class is a template class that provides a skip-list-based dictionary.
void(* Ptr_gtk_range_set_inverted)(GtkRange *, bool)
static Ptr_gtk_file_chooser_set_current_name gtk_file_chooser_set_current_name
guchar *(* Ptr_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf)
The QLibrary class loads shared libraries at runtime.
void(* Ptr_gtk_widget_path)(GtkWidget *, guint *, gchar **, gchar **)
GConfClient *(* Ptr_gconf_client_get_default)()
GtkWidget *(* Ptr_gtk_hscale_new)(GtkAdjustment *)
The QList class is a template class that provides lists.
static Ptr_pango_font_description_get_family pango_font_description_get_family
static Ptr_gtk_tree_view_new gtk_tree_view_new
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
GtkWidget *(* Ptr_gtk_menu_bar_new)(void)
void(* Ptr_gtk_widget_realize)(GtkWidget *)
void(* Ptr_gtk_adjustment_configure)(GtkAdjustment *, double, double, double, double, double, double)
The QPalette class contains color groups for each widget state.
The QIcon class provides scalable icons in different modes and states.
void(* Ptr_gtk_file_filter_set_name)(GtkFileFilter *, const gchar *)