Qt 4.8
Public Functions | Static Public Functions | Public Variables | Static Public Variables | Protected Types | Protected Functions | Static Protected Functions | Static Private Attributes | Friends | List of all members
QGtkStylePrivate Class Reference

#include <qgtkstyle_p.h>

Inheritance diagram for QGtkStylePrivate:
QCleanlooksStylePrivate QWindowsStylePrivate QCommonStylePrivate QStylePrivate QObjectPrivate QObjectData

Public Functions

void applyCustomPaletteHash ()
 
virtual int getSpinboxArrowSize () const
 
virtual QPalette gtkWidgetPalette (const QHashableLatin1Literal &gtkWidgetName) const
 
virtual void initGtkMenu () const
 
virtual void initGtkTreeview () const
 
virtual void initGtkWidgets () const
 
 QGtkStylePrivate ()
 
virtual void resolveGtk () const
 
 ~QGtkStylePrivate ()
 
- Public Functions inherited from QCleanlooksStylePrivate
 QCleanlooksStylePrivate ()
 
 ~QCleanlooksStylePrivate ()
 
- Public Functions inherited from QWindowsStylePrivate
bool altDown () const
 
bool hasSeenAlt (const QWidget *widget) const
 
 QWindowsStylePrivate ()
 
void startAnimation (QObject *o, QProgressBar *bar)
 
void stopAnimation (QObject *o, QProgressBar *bar)
 
- Public Functions inherited from QCommonStylePrivate
bool isViewItemCached (const QStyleOptionViewItemV4 &option) const
 
 QCommonStylePrivate ()
 
void tabLayout (const QStyleOptionTabV3 *opt, const QWidget *widget, QRect *textRect, QRect *pixmapRect) const
 
void viewItemDrawText (QPainter *p, const QStyleOptionViewItemV4 *option, const QRect &rect) const
 
void viewItemLayout (const QStyleOptionViewItemV4 *opt, QRect *checkRect, QRect *pixmapRect, QRect *textRect, bool sizehint) const
 Set sizehint to false to layout the elements inside opt->rect. More...
 
QSize viewItemSize (const QStyleOptionViewItemV4 *option, int role) const
 
 ~QCommonStylePrivate ()
 
- Public Functions inherited from QStylePrivate
 QStylePrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Static Public Functions

static void cleanupGtkWidgets ()
 
static QIcon getFilesystemIcon (const QFileInfo &)
 
static bool getGConfBool (const QString &key, bool fallback=0)
 
static QString getGConfString (const QString &key, const QString &fallback=QString())
 
static QString getIconThemeName ()
 
static QFont getThemeFont ()
 
static QString getThemeName ()
 
static GtkStyle * gtkStyle (const QHashableLatin1Literal &path=QHashableLatin1Literal("GtkWindow"))
 
static GtkWidget * gtkWidget (const QHashableLatin1Literal &path)
 
static bool isKDE4Session ()
 
static bool isThemeAvailable ()
 
static QString openDirectory (QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
 
static QString openFilename (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
 
static QStringList openFilenames (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
 
static QString saveFilename (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
 
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 Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Public Variables

QGtkStyleFilter filter
 
- Public Variables inherited from QWindowsStylePrivate
QColor activeCaptionColor
 
QColor activeGradientCaptionColor
 
bool alt_down
 
QList< QProgressBar * > animatedProgressBars
 
int animateStep
 
int animateTimer
 
int animationFps
 
QColor inactiveCaptionColor
 
QColor inactiveCaptionText
 
QColor inactiveGradientCaptionColor
 
int menuBarTimer
 
QList< const QWidget * > seenAlt
 
QElapsedTimer startTime
 
- Public Variables inherited from QCommonStylePrivate
QStyleOptionViewItemV4cachedOption
 
QRect checkRect
 
QRect decorationRect
 
QRect displayRect
 
QIcon tabBarcloseButtonIcon
 
- Public Variables inherited from QStylePrivate
int layoutSpacingIndex
 
QStyleproxyStyle
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Static Public Variables

static Ptr_gconf_client_get_bool gconf_client_get_bool = 0
 
static Ptr_gconf_client_get_default gconf_client_get_default = 0
 
static Ptr_gconf_client_get_string gconf_client_get_string = 0
 
static Ptr_gdk_color_free gdk_color_free = 0
 
static Ptr_gdk_draw_rectangle gdk_draw_rectangle = 0
 
static Ptr_gdk_drawable_get_depth gdk_drawable_get_depth = 0
 
static Ptr_gdk_drawable_unref gdk_drawable_unref = 0
 
static Ptr_gdk_pixbuf_get_from_drawable gdk_pixbuf_get_from_drawable = 0
 
static Ptr_gdk_pixbuf_get_height gdk_pixbuf_get_height = 0
 
static Ptr_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels = 0
 
static Ptr_gdk_pixbuf_get_width gdk_pixbuf_get_width = 0
 
static Ptr_gdk_pixbuf_new gdk_pixbuf_new = 0
 
static Ptr_gdk_pixbuf_unref gdk_pixbuf_unref = 0
 
static Ptr_gdk_pixmap_new gdk_pixmap_new = 0
 
static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay = 0
 
static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid = 0
 
static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time = 0
 
static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync = 0
 
static Ptr_gnome_vfs_init gnome_vfs_init = 0
 
static Ptr_gtk_adjustment_configure gtk_adjustment_configure = 0
 
static Ptr_gtk_adjustment_new gtk_adjustment_new = 0
 
static Ptr_gtk_arrow_new gtk_arrow_new = 0
 
static Ptr_gtk_border_free gtk_border_free = 0
 
static Ptr_gtk_button_new gtk_button_new = 0
 
static Ptr_gtk_check_button_new gtk_check_button_new = 0
 
static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label = 0
 
static Ptr_gtk_check_version gtk_check_version = 0
 
static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new = 0
 
static Ptr_gtk_combo_box_new gtk_combo_box_new = 0
 
static Ptr_gtk_container_add gtk_container_add = 0
 
static Ptr_gtk_container_forall gtk_container_forall = 0
 
static Ptr_gtk_container_get_type gtk_container_get_type = 0
 
static Ptr_gtk_dialog_run gtk_dialog_run = 0
 
static Ptr_gtk_entry_new gtk_entry_new = 0
 
static Ptr_gtk_expander_new gtk_expander_new = 0
 
static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter = 0
 
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new = 0
 
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename = 0
 
static Ptr_gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames = 0
 
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter = 0
 
static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder = 0
 
static Ptr_gtk_file_chooser_set_current_name gtk_file_chooser_set_current_name = 0
 
static Ptr_gtk_file_chooser_set_filename gtk_file_chooser_set_filename = 0
 
static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter = 0
 
static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern = 0
 
static Ptr_gtk_file_filter_new gtk_file_filter_new = 0
 
static Ptr_gtk_file_filter_set_name gtk_file_filter_set_name = 0
 
static Ptr_gtk_fixed_new gtk_fixed_new = 0
 
static Ptr_gtk_frame_new gtk_frame_new = 0
 
static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new = 0
 
static Ptr_gtk_hscale_new gtk_hscale_new = 0
 
static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new = 0
 
static Ptr_gtk_icon_factory_lookup_default gtk_icon_factory_lookup_default = 0
 
static Ptr_gtk_icon_set_render_icon gtk_icon_set_render_icon = 0
 
static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default = 0
 
static Ptr_gtk_init gtk_init = 0
 
static Ptr_gtk_menu_bar_new gtk_menu_bar_new = 0
 
static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label = 0
 
static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu = 0
 
static Ptr_gtk_menu_new gtk_menu_new = 0
 
static Ptr_gtk_menu_shell_append gtk_menu_shell_append = 0
 
static Ptr_gtk_notebook_new gtk_notebook_new = 0
 
static Ptr_gtk_paint_arrow gtk_paint_arrow = 0
 
static Ptr_gtk_paint_box gtk_paint_box = 0
 
static Ptr_gtk_paint_box_gap gtk_paint_box_gap = 0
 
static Ptr_gtk_paint_check gtk_paint_check = 0
 
static Ptr_gtk_paint_expander gtk_paint_expander = 0
 
static Ptr_gtk_paint_extension gtk_paint_extension = 0
 
static Ptr_gtk_paint_flat_box gtk_paint_flat_box = 0
 
static Ptr_gtk_paint_focus gtk_paint_focus = 0
 
static Ptr_gtk_paint_handle gtk_paint_handle = 0
 
static Ptr_gtk_paint_hline gtk_paint_hline = 0
 
static Ptr_gtk_paint_option gtk_paint_option = 0
 
static Ptr_gtk_paint_resize_grip gtk_paint_resize_grip = 0
 
static Ptr_gtk_paint_shadow gtk_paint_shadow = 0
 
static Ptr_gtk_paint_slider gtk_paint_slider = 0
 
static Ptr_gtk_paint_vline gtk_paint_vline = 0
 
static Ptr_gtk_progress_bar_new gtk_progress_bar_new = 0
 
static Ptr_gtk_progress_configure gtk_progress_configure = 0
 
static Ptr_gtk_radio_button_new gtk_radio_button_new = 0
 
static Ptr_gtk_range_get_adjustment gtk_range_get_adjustment = 0
 
static Ptr_gtk_range_set_adjustment gtk_range_set_adjustment = 0
 
static Ptr_gtk_range_set_inverted gtk_range_set_inverted = 0
 
static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths = 0
 
static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new = 0
 
static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new = 0
 
static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new = 0
 
static Ptr_gtk_settings_get_default gtk_settings_get_default = 0
 
static Ptr_gtk_spin_button_new gtk_spin_button_new = 0
 
static Ptr_gtk_statusbar_new gtk_statusbar_new = 0
 
static Ptr_gtk_style_attach gtk_style_attach = 0
 
static Ptr_gtk_tool_button_new gtk_tool_button_new = 0
 
static Ptr_gtk_toolbar_insert gtk_toolbar_insert = 0
 
static Ptr_gtk_toolbar_new gtk_toolbar_new = 0
 
static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column = 0
 
static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new = 0
 
static Ptr_gtk_tree_view_get_column gtk_tree_view_get_column = 0
 
static Ptr_gtk_tree_view_new gtk_tree_view_new = 0
 
static Ptr_gtk_vscale_new gtk_vscale_new = 0
 
static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new = 0
 
static Ptr_gtk_widget_destroy gtk_widget_destroy = 0
 
static Ptr_gtk_widget_get_type gtk_widget_get_type = 0
 
static Ptr_gtk_widget_modify_color gtk_widget_modify_bg = 0
 
static Ptr_gtk_widget_modify_color gtk_widget_modify_fg = 0
 
static Ptr_gtk_widget_path gtk_widget_path = 0
 
static Ptr_gtk_widget_realize gtk_widget_realize = 0
 
static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction = 0
 
static Ptr_gtk_widget_set_direction gtk_widget_set_direction = 0
 
static Ptr_gtk_widget_size_allocate gtk_widget_size_allocate = 0
 
static Ptr_gtk_widget_size_request gtk_widget_size_request = 0
 
static Ptr_gtk_widget_style_get gtk_widget_style_get = 0
 
static Ptr_gtk_window_get_type gtk_window_get_type = 0
 
static Ptr_gtk_window_new gtk_window_new = 0
 
static Ptr_pango_font_description_get_family pango_font_description_get_family = 0
 
static Ptr_pango_font_description_get_size pango_font_description_get_size = 0
 
static Ptr_pango_font_description_get_style pango_font_description_get_style = 0
 
static Ptr_pango_font_description_get_weight pango_font_description_get_weight = 0
 

Protected Types

typedef QHash< QHashableLatin1Literal, GtkWidget * > WidgetMap
 

Protected Functions

virtual GtkWidget * getTextColorWidget () const
 
virtual void init ()
 

Static Protected Functions

static void addAllSubWidgets (GtkWidget *widget, gpointer v=0)
 
static void addWidget (GtkWidget *widget)
 
static void addWidgetToMap (GtkWidget *widget)
 
static void destroyWidgetMap ()
 
static QStringList extract_filter (const QString &rawFilter)
 
static WidgetMapgtkWidgetMap ()
 
static void removeWidgetFromMap (const QHashableLatin1Literal &path)
 
static void setupGtkWidget (GtkWidget *widget)
 

Static Private Attributes

static QList< QGtkStylePrivate * > instances
 
static WidgetMapwidgetMap = 0
 

Friends

class QGtkStyleUpdateScheduler
 

Additional Inherited Members

- Public Types inherited from QWindowsStylePrivate
enum  {
  windowsItemFrame = 2, windowsSepHeight = 9, windowsItemHMargin = 3, windowsItemVMargin = 2,
  windowsArrowHMargin = 6, windowsRightBorder = 15, windowsCheckMarkWidth = 12
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Detailed Description

Definition at line 314 of file qgtkstyle_p.h.

Typedefs

◆ WidgetMap

Definition at line 485 of file qgtkstyle_p.h.

Constructors and Destructors

◆ QGtkStylePrivate()

QGtkStylePrivate::QGtkStylePrivate ( )

Definition at line 274 of file qgtkstyle_p.cpp.

276  , filter(this)
277 {
278  instances.append(this);
279 }
static QList< QGtkStylePrivate * > instances
Definition: qgtkstyle_p.h:515
QGtkStyleFilter filter
Definition: qgtkstyle_p.h:321
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507

◆ ~QGtkStylePrivate()

QGtkStylePrivate::~QGtkStylePrivate ( )

Definition at line 281 of file qgtkstyle_p.cpp.

282 {
283  instances.removeOne(this);
284 }
static QList< QGtkStylePrivate * > instances
Definition: qgtkstyle_p.h:515
bool removeOne(const T &t)
Removes the first occurrence of value in the list and returns true on success; otherwise returns fals...
Definition: qlist.h:796

Functions

◆ addAllSubWidgets()

void QGtkStylePrivate::addAllSubWidgets ( GtkWidget *  widget,
gpointer  v = 0 
)
staticprotected

Definition at line 797 of file qgtkstyle_p.cpp.

Referenced by addWidget(), initGtkMenu(), and initGtkWidgets().

798 {
799  Q_UNUSED(v);
801  if (GTK_CHECK_TYPE ((widget), gtk_container_get_type()))
802  gtk_container_forall((GtkContainer*)widget, addAllSubWidgets, NULL);
803 }
QPointer< QWidget > widget
static Ptr_gtk_container_get_type gtk_container_get_type
Definition: qgtkstyle_p.h:434
static void addWidgetToMap(GtkWidget *widget)
static Ptr_gtk_container_forall gtk_container_forall
Definition: qgtkstyle_p.h:359
static void addAllSubWidgets(GtkWidget *widget, gpointer v=0)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ addWidget()

void QGtkStylePrivate::addWidget ( GtkWidget *  widget)
staticprotected

Definition at line 855 of file qgtkstyle_p.cpp.

Referenced by initGtkTreeview(), and initGtkWidgets().

856 {
857  if (widget) {
860  }
861 }
QPointer< QWidget > widget
static void addAllSubWidgets(GtkWidget *widget, gpointer v=0)
static void setupGtkWidget(GtkWidget *widget)

◆ addWidgetToMap()

void QGtkStylePrivate::addWidgetToMap ( GtkWidget *  widget)
staticprotected

Definition at line 783 of file qgtkstyle_p.cpp.

Referenced by addAllSubWidgets().

784 {
785  if (Q_GTK_IS_WIDGET(widget)) {
788 
789  removeWidgetFromMap(widgetPath);
790  gtkWidgetMap()->insert(widgetPath, widget);
791 #ifdef DUMP_GTK_WIDGET_TREE
792  qWarning("Inserted Gtk Widget: %s", widgetPath.data());
793 #endif
794  }
795  }
#define Q_GTK_IS_WIDGET(widget)
Definition: qgtkstyle_p.h:75
QPointer< QWidget > widget
const char * data() const
Definition: qgtkstyle_p.h:86
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
static void removeWidgetFromMap(const QHashableLatin1Literal &path)
Q_CORE_EXPORT void qWarning(const char *,...)
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
static QHashableLatin1Literal classPath(GtkWidget *widget)
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494

◆ applyCustomPaletteHash()

void QGtkStylePrivate::applyCustomPaletteHash ( )

Definition at line 733 of file qgtkstyle_p.cpp.

Referenced by QGtkStyleFilter::eventFilter(), and QGtkStyleUpdateScheduler::updateTheme().

734 {
735  QPalette menuPal = gtkWidgetPalette("GtkMenu");
736  GdkColor gdkBg = gtkWidget("GtkMenu")->style->bg[GTK_STATE_NORMAL];
737  QColor bgColor(gdkBg.red>>8, gdkBg.green>>8, gdkBg.blue>>8);
738  menuPal.setBrush(QPalette::Base, bgColor);
739  menuPal.setBrush(QPalette::Window, bgColor);
740  qApp->setPalette(menuPal, "QMenu");
741 
742  QPalette toolbarPal = gtkWidgetPalette("GtkToolbar");
743  qApp->setPalette(toolbarPal, "QToolBar");
744 
745  QPalette menuBarPal = gtkWidgetPalette("GtkMenuBar");
746  qApp->setPalette(menuBarPal, "QMenuBar");
747 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
static GtkWidget * gtkWidget(const QHashableLatin1Literal &path)
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...
Definition: qpalette.h:206
#define qApp
virtual QPalette gtkWidgetPalette(const QHashableLatin1Literal &gtkWidgetName) const
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61

◆ cleanupGtkWidgets()

void QGtkStylePrivate::cleanupGtkWidgets ( )
static
Warning
This function is not part of the public interface. destroys all previously buffered widgets.

Definition at line 594 of file qgtkstyle_p.cpp.

595 {
596  if (!widgetMap)
597  return;
598  if (widgetMap->contains("GtkWindow")) // Gtk will destroy all children
599  gtk_widget_destroy(widgetMap->value("GtkWindow"));
601  it != widgetMap->constEnd(); ++it)
602  free(const_cast<char *>(it.key().data()));
603 }
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
Definition: qhash.h:395
static WidgetMap * widgetMap
Definition: qgtkstyle_p.h:516
#define it(className, varName)
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
Definition: qhash.h:466
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
Definition: qhash.h:469

◆ destroyWidgetMap()

static void QGtkStylePrivate::destroyWidgetMap ( )
inlinestaticprotected

Definition at line 487 of file qgtkstyle_p.h.

488  {
490  delete widgetMap;
491  widgetMap = 0;
492  }
static WidgetMap * widgetMap
Definition: qgtkstyle_p.h:516
static void cleanupGtkWidgets()

◆ extract_filter()

QStringList QGtkStylePrivate::extract_filter ( const QString rawFilter)
staticprotected

Definition at line 906 of file qgtkstyle_p.cpp.

Referenced by setupGtkFileChooser().

907 {
908  QString result = rawFilter;
909  QRegExp r(QString::fromLatin1("^([^()]*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$"));
910  int index = r.indexIn(result);
911  if (index >= 0)
912  result = r.cap(2);
913  return result.split(QLatin1Char(' '));
914 }
The QRegExp class provides pattern matching using regular expressions.
Definition: qregexp.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
quint16 index
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...
Definition: qstring.cpp:6526
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

◆ getFilesystemIcon()

QIcon QGtkStylePrivate::getFilesystemIcon ( const QFileInfo info)
static

Definition at line 1120 of file qgtkstyle_p.cpp.

Referenced by QFileIconProvider::icon().

1121 {
1122  QIcon icon;
1124  gnome_vfs_init();
1125  GtkIconTheme *theme = gtk_icon_theme_get_default();
1126  QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded();
1127  char * icon_name = gnome_icon_lookup_sync(theme,
1128  NULL,
1129  fileurl.data(),
1130  NULL,
1132  NULL);
1133  QString iconName = QString::fromUtf8(icon_name);
1134  g_free(icon_name);
1135  if (iconName.startsWith(QLatin1Char('/')))
1136  return QIcon(iconName);
1137  return QIcon::fromTheme(iconName);
1138  }
1139  return icon;
1140 }
char * data()
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:429
static QIcon fromTheme(const QString &name, const QIcon &fallback=QIcon())
Returns the QIcon corresponding to name in the current icon theme.
Definition: qicon.cpp:1039
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QString absoluteFilePath() const
Returns an absolute path including the file name.
Definition: qfileinfo.cpp:534
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync
Definition: qgtkstyle_p.h:479
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
Definition: qurl.cpp:6374
static Ptr_gnome_vfs_init gnome_vfs_init
Definition: qgtkstyle_p.h:480
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default
Definition: qgtkstyle_p.h:404
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ getGConfBool()

bool QGtkStylePrivate::getGConfBool ( const QString key,
bool  fallback = 0 
)
static

Definition at line 634 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::getGConfBool().

635 {
636  bool retVal = fallback;
637  if (resolveGConf()) {
638  g_type_init();
639  GConfClient* client = gconf_client_get_default();
640  GError *err = 0;
641  bool result = gconf_client_get_bool(client, qPrintable(key), &err);
642  g_object_unref(client);
643  if (!err)
644  retVal = result;
645  else
646  g_error_free (err);
647  }
648  return retVal;
649 }
static Ptr_gconf_client_get_default gconf_client_get_default
Definition: qgtkstyle_p.h:475
static Ptr_gconf_client_get_bool gconf_client_get_bool
Definition: qgtkstyle_p.h:477
static bool resolveGConf()
#define qPrintable(string)
Definition: qglobal.h:1750
static QMenuBar * fallback
Definition: qmenu_mac.mm:1617

◆ getGConfString()

QString QGtkStylePrivate::getGConfString ( const QString key,
const QString fallback = QString() 
)
static

Definition at line 615 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::getGConfString(), and getThemeName().

616 {
617  QString retVal = fallback;
618  if (resolveGConf()) {
619  g_type_init();
620  GConfClient* client = gconf_client_get_default();
621  GError *err = 0;
622  char *str = gconf_client_get_string(client, qPrintable(value), &err);
623  if (!err) {
624  retVal = QString::fromUtf8(str);
625  g_free(str);
626  }
627  g_object_unref(client);
628  if (err)
629  g_error_free (err);
630  }
631  return retVal;
632 }
static Ptr_gconf_client_get_string gconf_client_get_string
Definition: qgtkstyle_p.h:476
static Ptr_gconf_client_get_default gconf_client_get_default
Definition: qgtkstyle_p.h:475
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
static bool resolveGConf()
#define qPrintable(string)
Definition: qglobal.h:1750
static QMenuBar * fallback
Definition: qmenu_mac.mm:1617

◆ getIconThemeName()

QString QGtkStylePrivate::getIconThemeName ( )
static

Definition at line 689 of file qgtkstyle_p.cpp.

Referenced by QGuiPlatformPlugin::systemIconThemeName().

689  {
691  // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
692  QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
693  libgtk.setLoadHints(QLibrary::ImprovedSearchHeuristics);
694  gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
695  gtk_settings_get_default = (Ptr_gtk_settings_get_default)libgtk.resolve("gtk_settings_get_default");
696  }
698  return QString();
699  }
700  x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
701  gtk_init(NULL, NULL);
702  XSetErrorHandler(qt_x_errhandler);
703  GtkSettings *settings = gtk_settings_get_default();
704  gchararray value;
705  g_object_get(settings, "gtk-icon-theme-name", &value, NULL);
706  QString result = QString::fromUtf8(value);
707  g_free(value);
708  return result;
709 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define QLS(x)
Definition: qgtkstyle_p.h:77
GtkSettings *(* Ptr_gtk_settings_get_default)(void)
Definition: qgtkstyle_p.h:176
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
int(* x11ErrorHandler)(Display *, XErrorEvent *)
static Ptr_gtk_settings_get_default gtk_settings_get_default
Definition: qgtkstyle_p.h:428
void(* Ptr_gtk_init)(int *, char ***)
Definition: qgtkstyle_p.h:139
static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
static Ptr_gtk_init gtk_init
Definition: qgtkstyle_p.h:360
The QLibrary class loads shared libraries at runtime.
Definition: qlibrary.h:62

◆ getSpinboxArrowSize()

int QGtkStylePrivate::getSpinboxArrowSize ( ) const
virtual

Definition at line 712 of file qgtkstyle_p.cpp.

713 {
714  const int MIN_ARROW_WIDTH = 6;
715  GtkWidget *spinButton = gtkWidget("GtkSpinButton");
716  GtkStyle *style = spinButton->style;
717  gint size = pango_font_description_get_size (style->font_desc);
718  gint arrow_size;
719  arrow_size = qMax(PANGO_PIXELS (size), MIN_ARROW_WIDTH) + style->xthickness;
720  arrow_size += arrow_size%2 + 1;
721  return arrow_size;
722 }
static GtkWidget * gtkWidget(const QHashableLatin1Literal &path)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
static Ptr_pango_font_description_get_size pango_font_description_get_size
Definition: qgtkstyle_p.h:441

◆ getTextColorWidget()

GtkWidget * QGtkStylePrivate::getTextColorWidget ( ) const
protectedvirtual
Warning
This function is not part of the public interface. Returns the gtk Widget that should be used to determine text foreground and background colors.

Definition at line 752 of file qgtkstyle_p.cpp.

753 {
754  return gtkWidget("GtkEntry");
755 }
static GtkWidget * gtkWidget(const QHashableLatin1Literal &path)

◆ getThemeFont()

QFont QGtkStylePrivate::getThemeFont ( )
static

Definition at line 866 of file qgtkstyle_p.cpp.

Referenced by QGtkStyleUpdateScheduler::updateTheme().

867 {
868  QFont font;
869  GtkStyle *style = gtkStyle();
870  if (style && qApp->desktopSettingsAware())
871  {
872  PangoFontDescription *gtk_font = style->font_desc;
873  font.setPointSizeF((float)(pango_font_description_get_size(gtk_font))/PANGO_SCALE);
874 
876  if (!family.isEmpty())
877  font.setFamily(family);
878 
879  int weight = pango_font_description_get_weight(gtk_font);
880  if (weight >= PANGO_WEIGHT_HEAVY)
881  font.setWeight(QFont::Black);
882  else if (weight >= PANGO_WEIGHT_BOLD)
883  font.setWeight(QFont::Bold);
884  else if (weight >= PANGO_WEIGHT_SEMIBOLD)
886  else if (weight >= PANGO_WEIGHT_NORMAL)
887  font.setWeight(QFont::Normal);
888  else
889  font.setWeight(QFont::Light);
890 
891  PangoStyle fontstyle = pango_font_description_get_style(gtk_font);
892  if (fontstyle == PANGO_STYLE_ITALIC)
894  else if (fontstyle == PANGO_STYLE_OBLIQUE)
896  else
898  }
899  return font;
900 }
static Ptr_pango_font_description_get_style pango_font_description_get_style
Definition: qgtkstyle_p.h:444
The QString class provides a Unicode character string.
Definition: qstring.h:83
static Ptr_pango_font_description_get_size pango_font_description_get_size
Definition: qgtkstyle_p.h:441
void setFamily(const QString &)
Sets the family name of the font.
Definition: qfont.cpp:924
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
#define qApp
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
static GtkStyle * gtkStyle(const QHashableLatin1Literal &path=QHashableLatin1Literal("GtkWindow"))
void setWeight(int)
Sets the weight the font to weight, which should be a value from the QFont::Weight enumeration...
Definition: qfont.cpp:1278
static Ptr_pango_font_description_get_weight pango_font_description_get_weight
Definition: qgtkstyle_p.h:442
void setPointSizeF(qreal)
Sets the point size to pointSize.
Definition: qfont.cpp:1121
void setStyle(Style style)
Sets the style of the font to style.
Definition: qfont.cpp:1234
static Ptr_pango_font_description_get_family pango_font_description_get_family
Definition: qgtkstyle_p.h:443

◆ getThemeName()

QString QGtkStylePrivate::getThemeName ( )
static

Definition at line 651 of file qgtkstyle_p.cpp.

Referenced by initGtkWidgets(), and QGtkStyleUpdateScheduler::updateTheme().

652 {
653  QString themeName;
654  // We try to parse the gtkrc file first
655  // primarily to avoid resolving Gtk functions if
656  // the KDE 3 "Qt" style is currently in use
657  QString rcPaths = QString::fromLocal8Bit(qgetenv("GTK2_RC_FILES"));
658  if (!rcPaths.isEmpty()) {
659  QStringList paths = rcPaths.split(QLS(":"));
660  foreach (const QString &rcPath, paths) {
661  if (!rcPath.isEmpty()) {
662  QFile rcFile(rcPath);
663  if (rcFile.exists() && rcFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
664  QTextStream in(&rcFile);
665  while(!in.atEnd()) {
666  QString line = in.readLine();
667  if (line.contains(QLS("gtk-theme-name"))) {
668  line = line.right(line.length() - line.indexOf(QLatin1Char('=')) - 1);
669  line.remove(QLatin1Char('\"'));
670  line = line.trimmed();
671  themeName = line;
672  break;
673  }
674  }
675  }
676  }
677  if (!themeName.isEmpty())
678  break;
679  }
680  }
681 
682  // Fall back to gconf
683  if (themeName.isEmpty() && resolveGConf())
684  themeName = getGConfString(QLS("/desktop/gnome/interface/gtk_theme"));
685 
686  return themeName;
687 }
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.h:904
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
Definition: qstring.cpp:4245
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
The QString class provides a Unicode character string.
Definition: qstring.h:83
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
Definition: qstring.cpp:4506
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
#define QLS(x)
Definition: qgtkstyle_p.h:77
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static QString getGConfString(const QString &key, const QString &fallback=QString())
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
QString right(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n rightmost characters of the string.
Definition: qstring.cpp:3682
The QFile class provides an interface for reading from and writing to files.
Definition: qfile.h:65
The QTextStream class provides a convenient interface for reading and writing text.
Definition: qtextstream.h:73
static bool resolveGConf()
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...
Definition: qstring.cpp:6526
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
Definition: qstring.cpp:1867
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

◆ gtkStyle()

GtkStyle * QGtkStylePrivate::gtkStyle ( const QHashableLatin1Literal path = QHashableLatin1Literal("GtkWindow"))
static

Definition at line 302 of file qgtkstyle_p.cpp.

Referenced by QGtkPainter::getIcon(), and getThemeFont().

303 {
304  if (GtkWidget *w = gtkWidgetMap()->value(path))
305  return w->style;
306  return 0;
307 }
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494

◆ gtkWidget()

GtkWidget * QGtkStylePrivate::gtkWidget ( const QHashableLatin1Literal path)
static

Definition at line 292 of file qgtkstyle_p.cpp.

Referenced by applyCustomPaletteHash(), getSpinboxArrowSize(), getTextColorWidget(), and gtkWidgetPalette().

293 {
294  GtkWidget *widget = gtkWidgetMap()->value(path);
295  if (!widget) {
296  // Theme might have rearranged widget internals
297  widget = gtkWidgetMap()->value(path);
298  }
299  return widget;
300 }
QPointer< QWidget > widget
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494

◆ gtkWidgetMap()

static WidgetMap* QGtkStylePrivate::gtkWidgetMap ( )
inlinestaticprotected

Definition at line 494 of file qgtkstyle_p.h.

Referenced by addWidgetToMap(), gtkStyle(), gtkWidget(), initGtkWidgets(), removeWidgetFromMap(), and setupGtkWidget().

495  {
496  if (!widgetMap) {
497  widgetMap = new WidgetMap();
499  }
500  return widgetMap;
501  }
static void destroyWidgetMap()
Definition: qgtkstyle_p.h:487
static WidgetMap * widgetMap
Definition: qgtkstyle_p.h:516
void qAddPostRoutine(QtCleanUpFunction p)
QHash< QHashableLatin1Literal, GtkWidget * > WidgetMap
Definition: qgtkstyle_p.h:485

◆ gtkWidgetPalette()

QPalette QGtkStylePrivate::gtkWidgetPalette ( const QHashableLatin1Literal gtkWidgetName) const
virtual

Definition at line 806 of file qgtkstyle_p.cpp.

Referenced by applyCustomPaletteHash().

807 {
808  GtkWidget *gtkWidget = QGtkStylePrivate::gtkWidget(gtkWidgetName);
809  Q_ASSERT(gtkWidget);
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);
817  pal.setBrush(QPalette::Window, bgColor);
818  pal.setBrush(QPalette::Button, bgColor);
820  pal.setBrush(QPalette::Disabled, QPalette::WindowText, disabledTextColor);
822  pal.setBrush(QPalette::Disabled, QPalette::ButtonText, disabledTextColor);
823  return pal;
824 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
static QPalette palette()
Returns the application palette.
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static GtkWidget * gtkWidget(const QHashableLatin1Literal &path)
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...
Definition: qpalette.h:206
The QPalette class contains color groups for each widget state.
Definition: qpalette.h:61

◆ init()

void QGtkStylePrivate::init ( )
protectedvirtual

Definition at line 286 of file qgtkstyle_p.cpp.

287 {
288  resolveGtk();
289  initGtkWidgets();
290 }
virtual void initGtkWidgets() const
virtual void resolveGtk() const

◆ initGtkMenu()

void QGtkStylePrivate::initGtkMenu ( ) const
virtual

Definition at line 446 of file qgtkstyle_p.cpp.

Referenced by initGtkWidgets().

447 {
448  // Create menubar
449  GtkWidget *gtkMenuBar = QGtkStylePrivate::gtk_menu_bar_new();
450  setupGtkWidget(gtkMenuBar);
451 
452  GtkWidget *gtkMenuBarItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X");
453  gtk_menu_shell_append((GtkMenuShell*)(gtkMenuBar), gtkMenuBarItem);
454  gtk_widget_realize(gtkMenuBarItem);
455 
456  // Create menu
457  GtkWidget *gtkMenu = QGtkStylePrivate::gtk_menu_new();
458  gtk_menu_item_set_submenu((GtkMenuItem*)(gtkMenuBarItem), gtkMenu);
459  gtk_widget_realize(gtkMenu);
460 
461  GtkWidget *gtkMenuItem = QGtkStylePrivate::gtk_menu_item_new_with_label("X");
462  gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuItem);
463  gtk_widget_realize(gtkMenuItem);
464 
465  GtkWidget *gtkCheckMenuItem = QGtkStylePrivate::gtk_check_menu_item_new_with_label("X");
466  gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkCheckMenuItem);
467  gtk_widget_realize(gtkCheckMenuItem);
468 
469  GtkWidget *gtkMenuSeparator = QGtkStylePrivate::gtk_separator_menu_item_new();
470  gtk_menu_shell_append((GtkMenuShell*)gtkMenu, gtkMenuSeparator);
471 
472  addAllSubWidgets(gtkMenuBar);
473  addAllSubWidgets(gtkMenu);
474 }
static Ptr_gtk_menu_new gtk_menu_new
Definition: qgtkstyle_p.h:372
static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new
Definition: qgtkstyle_p.h:429
static Ptr_gtk_menu_bar_new gtk_menu_bar_new
Definition: qgtkstyle_p.h:371
static Ptr_gtk_menu_shell_append gtk_menu_shell_append
Definition: qgtkstyle_p.h:398
static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label
Definition: qgtkstyle_p.h:368
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label
Definition: qgtkstyle_p.h:370
static void addAllSubWidgets(GtkWidget *widget, gpointer v=0)
static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu
Definition: qgtkstyle_p.h:427
static void setupGtkWidget(GtkWidget *widget)

◆ initGtkTreeview()

void QGtkStylePrivate::initGtkTreeview ( ) const
virtual

Definition at line 477 of file qgtkstyle_p.cpp.

Referenced by initGtkWidgets().

478 {
479  GtkWidget *gtkTreeView = gtk_tree_view_new();
480  gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new());
481  gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new());
482  gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new());
483  addWidget(gtkTreeView);
484 }
static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new
Definition: qgtkstyle_p.h:408
static void addWidget(GtkWidget *widget)
static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column
Definition: qgtkstyle_p.h:409
static Ptr_gtk_tree_view_new gtk_tree_view_new
Definition: qgtkstyle_p.h:392

◆ initGtkWidgets()

void QGtkStylePrivate::initGtkWidgets ( ) const
virtual

Definition at line 491 of file qgtkstyle_p.cpp.

Referenced by init(), and QGtkStyleUpdateScheduler::updateTheme().

492 {
493  // From gtkmain.c
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");
503  return;
504  }
505 
506  static QString themeName;
507  if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
508  themeName = getThemeName();
509 
510  if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
511  // Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
512  // we cannot support the GTK_Qt Gtk engine
513  qWarning("QGtkStyle cannot be used together with the GTK_Qt engine.");
514  return;
515  }
516  }
517 
519  // Gtk will set the Qt error handler so we have to reset it afterwards
520  x11ErrorHandler qt_x_errhandler = XSetErrorHandler(0);
521  QGtkStylePrivate::gtk_init (NULL, NULL);
522  XSetErrorHandler(qt_x_errhandler);
523 
524  // make a window
525  GtkWidget* gtkWindow = QGtkStylePrivate::gtk_window_new(GTK_WINDOW_POPUP);
527  if (displayDepth == -1)
529  QHashableLatin1Literal widgetPath = QHashableLatin1Literal::fromData(strdup("GtkWindow"));
530  removeWidgetFromMap(widgetPath);
531  gtkWidgetMap()->insert(widgetPath, gtkWindow);
532 
533 
534  // Make all other widgets. respect the text direction
535  if (qApp->layoutDirection() == Qt::RightToLeft)
537 
538  if (!gtkWidgetMap()->contains("GtkButton")) {
539  GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new();
540  addWidget(gtkButton);
541  g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0);
543  addWidget(QGtkStylePrivate::gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE));
556 
557  initGtkMenu();
561  (QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
562  GtkWidget *toolbar = gtk_toolbar_new();
563  g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar);
564  gtk_toolbar_insert((GtkToolbar*)toolbar, gtk_separator_tool_item_new(), -1);
565  addWidget(toolbar);
566  initGtkTreeview();
567  addWidget(gtk_vscale_new((GtkAdjustment*)(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
569  }
570  else // Rebuild map
571  {
572  // When styles change subwidgets can get rearranged
573  // as with the combo box. We need to update the widget map
574  // to reflect this;
576  gtkWidgetMap()->clear();
577  QHashIterator<QHashableLatin1Literal, GtkWidget*> it(oldMap);
578  while (it.hasNext()) {
579  it.next();
580  if (!strchr(it.key().data(), '.')) {
581  addAllSubWidgets(it.value());
582  }
583  free(const_cast<char *>(it.key().data()));
584  }
585  }
586  } else {
587  qWarning("QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.");
588  }
589 }
static Ptr_gdk_drawable_get_depth gdk_drawable_get_depth
Definition: qgtkstyle_p.h:469
static Ptr_gtk_window_new gtk_window_new
Definition: qgtkstyle_p.h:362
static bool displayDepth
Definition: qgtkstyle_p.cpp:82
static Ptr_gtk_entry_new gtk_entry_new
Definition: qgtkstyle_p.h:384
void clear()
Removes all items from the hash.
Definition: qhash.h:574
static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new
Definition: qgtkstyle_p.h:395
static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new
Definition: qgtkstyle_p.h:389
static Ptr_gtk_expander_new gtk_expander_new
Definition: qgtkstyle_p.h:373
#define it(className, varName)
static Ptr_gtk_progress_bar_new gtk_progress_bar_new
Definition: qgtkstyle_p.h:396
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
static Ptr_gtk_toolbar_insert gtk_toolbar_insert
Definition: qgtkstyle_p.h:381
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
NSToolbar * toolbar
static QHashableLatin1Literal fromData(const char *str)
Definition: qgtkstyle_p.h:112
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
static Ptr_gtk_combo_box_new gtk_combo_box_new
Definition: qgtkstyle_p.h:394
static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer)
static void removeWidgetFromMap(const QHashableLatin1Literal &path)
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
#define qApp
#define QLS(x)
Definition: qgtkstyle_p.h:77
static Ptr_gtk_spin_button_new gtk_spin_button_new
Definition: qgtkstyle_p.h:379
static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new
Definition: qgtkstyle_p.h:376
static Ptr_gtk_notebook_new gtk_notebook_new
Definition: qgtkstyle_p.h:390
static void gtkStyleSetCallback(GtkWidget *)
static Ptr_gtk_button_new gtk_button_new
Definition: qgtkstyle_p.h:374
Q_CORE_EXPORT void qWarning(const char *,...)
static void addWidget(GtkWidget *widget)
static Ptr_gtk_adjustment_new gtk_adjustment_new
Definition: qgtkstyle_p.h:424
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new
Definition: qgtkstyle_p.h:387
int(* x11ErrorHandler)(Display *, XErrorEvent *)
static Ptr_gtk_radio_button_new gtk_radio_button_new
Definition: qgtkstyle_p.h:378
static Ptr_gtk_statusbar_new gtk_statusbar_new
Definition: qgtkstyle_p.h:383
static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new
Definition: qgtkstyle_p.h:388
static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new
Definition: qgtkstyle_p.h:380
static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction
Definition: qgtkstyle_p.h:365
static Ptr_gtk_frame_new gtk_frame_new
Definition: qgtkstyle_p.h:382
static Ptr_gtk_check_button_new gtk_check_button_new
Definition: qgtkstyle_p.h:377
static Ptr_gtk_vscale_new gtk_vscale_new
Definition: qgtkstyle_p.h:386
static QString getThemeName()
static void addAllSubWidgets(GtkWidget *widget, gpointer v=0)
static int qt_x_errhandler(Display *dpy, XErrorEvent *err)
virtual void initGtkTreeview() const
static Ptr_gtk_tool_button_new gtk_tool_button_new
Definition: qgtkstyle_p.h:375
static Ptr_gtk_hscale_new gtk_hscale_new
Definition: qgtkstyle_p.h:385
virtual void initGtkMenu() const
static Ptr_gtk_toolbar_new gtk_toolbar_new
Definition: qgtkstyle_p.h:391
static Ptr_gtk_init gtk_init
Definition: qgtkstyle_p.h:360
static Ptr_gtk_arrow_new gtk_arrow_new
Definition: qgtkstyle_p.h:369
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494

◆ isKDE4Session()

bool QGtkStylePrivate::isKDE4Session ( )
static

Definition at line 725 of file qgtkstyle_p.cpp.

726 {
727  static int version = -1;
728  if (version == -1)
729  version = qgetenv("KDE_SESSION_VERSION").toInt();
730  return (version == 4);
731 }
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
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...

◆ isThemeAvailable()

static bool QGtkStylePrivate::isThemeAvailable ( )
inlinestatic

Definition at line 336 of file qgtkstyle_p.h.

336 { return gtkStyle() != 0; }
static GtkStyle * gtkStyle(const QHashableLatin1Literal &path=QHashableLatin1Literal("GtkWindow"))

◆ openDirectory()

QString QGtkStylePrivate::openDirectory ( QWidget parent,
const QString caption,
const QString dir,
QFileDialog::Options  options 
)
static

Definition at line 1023 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::polish().

1024 {
1026  GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
1027  NULL,
1028  GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
1029  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1030  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
1031  NULL);
1032 
1033  setupGtkFileChooser(gtkFileChooser, parent, dir, QString(), 0, options);
1034  QWidget modal_widget;
1035  modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
1036  modal_widget.setParent(parent, Qt::Window);
1037  QApplicationPrivate::enterModal(&modal_widget);
1038 
1039  QString filename;
1040  if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
1041  char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
1042  filename = QString::fromUtf8(gtk_filename);
1043  g_free (gtk_filename);
1044  }
1045 
1046  QApplicationPrivate::leaveModal(&modal_widget);
1047  gtk_widget_destroy (gtkFileChooser);
1048  return filename;
1049 }
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename
Definition: qgtkstyle_p.h:454
The QString class provides a Unicode character string.
Definition: qstring.h:83
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_dialog_run gtk_dialog_run
Definition: qgtkstyle_p.h:457
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
void setAttribute(Qt::WidgetAttribute, bool on=true)
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition: qwidget.cpp:11087
#define qPrintable(string)
Definition: qglobal.h:1750
static void leaveModal(QWidget *)
static void enterModal(QWidget *)
The QMap class is a template class that provides a skip-list-based dictionary.
Definition: qdatastream.h:67
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
Definition: qgtkstyle_p.h:452

◆ openFilename()

QString QGtkStylePrivate::openFilename ( QWidget parent,
const QString caption,
const QString dir,
const QString filter,
QString selectedFilter,
QFileDialog::Options  options 
)
static

Definition at line 988 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::polish().

990 {
992  GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
993  NULL,
994  GTK_FILE_CHOOSER_ACTION_OPEN,
995  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
996  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
997  NULL);
998 
999  setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, false, &filterMap);
1000 
1001  QWidget modal_widget;
1002  modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
1003  modal_widget.setParent(parent, Qt::Window);
1004  QApplicationPrivate::enterModal(&modal_widget);
1005 
1006  QString filename;
1007  if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
1008  char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
1009  filename = QString::fromUtf8(gtk_filename);
1010  g_free (gtk_filename);
1011  if (selectedFilter) {
1012  GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
1013  *selectedFilter = filterMap.value(gtkFilter);
1014  }
1015  }
1016 
1017  QApplicationPrivate::leaveModal(&modal_widget);
1018  gtk_widget_destroy (gtkFileChooser);
1019  return filename;
1020 }
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter
Definition: qgtkstyle_p.h:451
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename
Definition: qgtkstyle_p.h:454
The QString class provides a Unicode character string.
Definition: qstring.h:83
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_dialog_run gtk_dialog_run
Definition: qgtkstyle_p.h:457
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
void setAttribute(Qt::WidgetAttribute, bool on=true)
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition: qwidget.cpp:11087
#define qPrintable(string)
Definition: qglobal.h:1750
static void leaveModal(QWidget *)
static void enterModal(QWidget *)
The QMap class is a template class that provides a skip-list-based dictionary.
Definition: qdatastream.h:67
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
Definition: qgtkstyle_p.h:452

◆ openFilenames()

QStringList QGtkStylePrivate::openFilenames ( QWidget parent,
const QString caption,
const QString dir,
const QString filter,
QString selectedFilter,
QFileDialog::Options  options 
)
static

Definition at line 1051 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::polish().

1053 {
1054  QStringList filenames;
1056  GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
1057  NULL,
1058  GTK_FILE_CHOOSER_ACTION_OPEN,
1059  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1060  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
1061  NULL);
1062 
1063  setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, false, &filterMap);
1064  g_object_set(gtkFileChooser, "select-multiple", gboolean(true), NULL);
1065 
1066  QWidget modal_widget;
1067  modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
1068  modal_widget.setParent(parent, Qt::Window);
1069  QApplicationPrivate::enterModal(&modal_widget);
1070 
1071  if (gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
1072  GSList *gtk_file_names = QGtkStylePrivate::gtk_file_chooser_get_filenames((GtkFileChooser*)gtkFileChooser);
1073  for (GSList *iterator = gtk_file_names ; iterator; iterator = iterator->next)
1074  filenames << QString::fromUtf8((const char*)iterator->data);
1075  g_slist_free(gtk_file_names);
1076  if (selectedFilter) {
1077  GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
1078  *selectedFilter = filterMap.value(gtkFilter);
1079  }
1080  }
1081 
1082  QApplicationPrivate::leaveModal(&modal_widget);
1083  gtk_widget_destroy (gtkFileChooser);
1084  return filenames;
1085 }
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter
Definition: qgtkstyle_p.h:451
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
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_dialog_run gtk_dialog_run
Definition: qgtkstyle_p.h:457
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
void setAttribute(Qt::WidgetAttribute, bool on=true)
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition: qwidget.cpp:11087
static Ptr_gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames
Definition: qgtkstyle_p.h:455
#define qPrintable(string)
Definition: qglobal.h:1750
static void leaveModal(QWidget *)
static void enterModal(QWidget *)
The QMap class is a template class that provides a skip-list-based dictionary.
Definition: qdatastream.h:67
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
Definition: qgtkstyle_p.h:452

◆ removeWidgetFromMap()

void QGtkStylePrivate::removeWidgetFromMap ( const QHashableLatin1Literal path)
staticprotected

Definition at line 773 of file qgtkstyle_p.cpp.

Referenced by addWidgetToMap(), and initGtkWidgets().

774 {
776  WidgetMap::iterator it = map->find(path);
777  if (it != map->end()) {
778  free(const_cast<char *>(it.key().data()));
779  map->erase(it);
780  }
781 }
#define it(className, varName)
QHash< QHashableLatin1Literal, GtkWidget * > WidgetMap
Definition: qgtkstyle_p.h:485
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494
friend class iterator
Definition: qhash.h:393

◆ resolveGtk()

void QGtkStylePrivate::resolveGtk ( ) const
virtual
Warning
This function is not part of the public interface. Get references to gtk functions after we dynamically load the library.

Definition at line 312 of file qgtkstyle_p.cpp.

Referenced by init().

313 {
314  // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
315  QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
316  libgtk.setLoadHints(QLibrary::ImprovedSearchHeuristics);
317 
318  gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
319  gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
320  gtk_style_attach = (Ptr_gtk_style_attach)libgtk.resolve("gtk_style_attach");
321  gtk_widget_destroy = (Ptr_gtk_widget_destroy)libgtk.resolve("gtk_widget_destroy");
322  gtk_widget_realize = (Ptr_gtk_widget_realize)libgtk.resolve("gtk_widget_realize");
323 
324  gtk_file_chooser_set_current_folder = (Ptr_gtk_file_chooser_set_current_folder)libgtk.resolve("gtk_file_chooser_set_current_folder");
325  gtk_file_filter_new = (Ptr_gtk_file_filter_new)libgtk.resolve("gtk_file_filter_new");
326  gtk_file_filter_set_name = (Ptr_gtk_file_filter_set_name)libgtk.resolve("gtk_file_filter_set_name");
327  gtk_file_filter_add_pattern = (Ptr_gtk_file_filter_add_pattern)libgtk.resolve("gtk_file_filter_add_pattern");
328  gtk_file_chooser_add_filter = (Ptr_gtk_file_chooser_add_filter)libgtk.resolve("gtk_file_chooser_add_filter");
329  gtk_file_chooser_set_filter = (Ptr_gtk_file_chooser_set_filter)libgtk.resolve("gtk_file_chooser_set_filter");
330  gtk_file_chooser_get_filter = (Ptr_gtk_file_chooser_get_filter)libgtk.resolve("gtk_file_chooser_get_filter");
331  gtk_file_chooser_dialog_new = (Ptr_gtk_file_chooser_dialog_new)libgtk.resolve("gtk_file_chooser_dialog_new");
332  gtk_file_chooser_set_current_folder = (Ptr_gtk_file_chooser_set_current_folder)libgtk.resolve("gtk_file_chooser_set_current_folder");
333  gtk_file_chooser_get_filename = (Ptr_gtk_file_chooser_get_filename)libgtk.resolve("gtk_file_chooser_get_filename");
334  gtk_file_chooser_get_filenames = (Ptr_gtk_file_chooser_get_filenames)libgtk.resolve("gtk_file_chooser_get_filenames");
335  gtk_file_chooser_set_current_name = (Ptr_gtk_file_chooser_set_current_name)libgtk.resolve("gtk_file_chooser_set_current_name");
336  gtk_dialog_run = (Ptr_gtk_dialog_run)libgtk.resolve("gtk_dialog_run");
337  gtk_file_chooser_set_filename = (Ptr_gtk_file_chooser_set_filename)libgtk.resolve("gtk_file_chooser_set_filename");
338 
339  gdk_pixbuf_get_pixels = (Ptr_gdk_pixbuf_get_pixels)libgtk.resolve("gdk_pixbuf_get_pixels");
340  gdk_pixbuf_get_width = (Ptr_gdk_pixbuf_get_width)libgtk.resolve("gdk_pixbuf_get_width");
341  gdk_pixbuf_get_height = (Ptr_gdk_pixbuf_get_height)libgtk.resolve("gdk_pixbuf_get_height");
342  gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
343  gdk_pixbuf_new = (Ptr_gdk_pixbuf_new)libgtk.resolve("gdk_pixbuf_new");
344  gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
345  gdk_draw_rectangle = (Ptr_gdk_draw_rectangle)libgtk.resolve("gdk_draw_rectangle");
346  gdk_pixbuf_unref = (Ptr_gdk_pixbuf_unref)libgtk.resolve("gdk_pixbuf_unref");
347  gdk_drawable_unref = (Ptr_gdk_drawable_unref)libgtk.resolve("gdk_drawable_unref");
348  gdk_drawable_get_depth = (Ptr_gdk_drawable_get_depth)libgtk.resolve("gdk_drawable_get_depth");
349  gdk_color_free = (Ptr_gdk_color_free)libgtk.resolve("gdk_color_free");
350  gdk_x11_window_set_user_time = (Ptr_gdk_x11_window_set_user_time)libgtk.resolve("gdk_x11_window_set_user_time");
351  gdk_x11_drawable_get_xid = (Ptr_gdk_x11_drawable_get_xid)libgtk.resolve("gdk_x11_drawable_get_xid");
352  gdk_x11_drawable_get_xdisplay = (Ptr_gdk_x11_drawable_get_xdisplay)libgtk.resolve("gdk_x11_drawable_get_xdisplay");
353 
354  gtk_widget_set_default_direction = (Ptr_gtk_widget_set_default_direction)libgtk.resolve("gtk_widget_set_default_direction");
355  gtk_widget_modify_fg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_fg");
356  gtk_widget_modify_bg = (Ptr_gtk_widget_modify_color)libgtk.resolve("gtk_widget_modify_bg");
357  gtk_arrow_new = (Ptr_gtk_arrow_new)libgtk.resolve("gtk_arrow_new");
358  gtk_menu_item_new_with_label = (Ptr_gtk_menu_item_new_with_label)libgtk.resolve("gtk_menu_item_new_with_label");
359  gtk_check_menu_item_new_with_label = (Ptr_gtk_check_menu_item_new_with_label)libgtk.resolve("gtk_check_menu_item_new_with_label");
360  gtk_menu_bar_new = (Ptr_gtk_menu_bar_new)libgtk.resolve("gtk_menu_bar_new");
361  gtk_menu_new = (Ptr_gtk_menu_new)libgtk.resolve("gtk_menu_new");
362  gtk_toolbar_new = (Ptr_gtk_toolbar_new)libgtk.resolve("gtk_toolbar_new");
363  gtk_separator_tool_item_new = (Ptr_gtk_separator_tool_item_new)libgtk.resolve("gtk_separator_tool_item_new");
364  gtk_toolbar_insert = (Ptr_gtk_toolbar_insert)libgtk.resolve("gtk_toolbar_insert");
365  gtk_button_new = (Ptr_gtk_button_new)libgtk.resolve("gtk_button_new");
366  gtk_tool_button_new = (Ptr_gtk_tool_button_new)libgtk.resolve("gtk_tool_button_new");
367  gtk_hbutton_box_new = (Ptr_gtk_hbutton_box_new)libgtk.resolve("gtk_hbutton_box_new");
368  gtk_check_button_new = (Ptr_gtk_check_button_new)libgtk.resolve("gtk_check_button_new");
369  gtk_radio_button_new = (Ptr_gtk_radio_button_new)libgtk.resolve("gtk_radio_button_new");
370  gtk_notebook_new = (Ptr_gtk_notebook_new)libgtk.resolve("gtk_notebook_new");
371  gtk_progress_bar_new = (Ptr_gtk_progress_bar_new)libgtk.resolve("gtk_progress_bar_new");
372  gtk_spin_button_new = (Ptr_gtk_spin_button_new)libgtk.resolve("gtk_spin_button_new");
373  gtk_hscale_new = (Ptr_gtk_hscale_new)libgtk.resolve("gtk_hscale_new");
374  gtk_vscale_new = (Ptr_gtk_vscale_new)libgtk.resolve("gtk_vscale_new");
375  gtk_hscrollbar_new = (Ptr_gtk_hscrollbar_new)libgtk.resolve("gtk_hscrollbar_new");
376  gtk_vscrollbar_new = (Ptr_gtk_vscrollbar_new)libgtk.resolve("gtk_vscrollbar_new");
377  gtk_scrolled_window_new = (Ptr_gtk_scrolled_window_new)libgtk.resolve("gtk_scrolled_window_new");
378  gtk_menu_shell_append = (Ptr_gtk_menu_shell_append)libgtk.resolve("gtk_menu_shell_append");
379  gtk_entry_new = (Ptr_gtk_entry_new)libgtk.resolve("gtk_entry_new");
380  gtk_tree_view_new = (Ptr_gtk_tree_view_new)libgtk.resolve("gtk_tree_view_new");
381  gtk_combo_box_new = (Ptr_gtk_combo_box_new)libgtk.resolve("gtk_combo_box_new");
382  gtk_progress_configure = (Ptr_gtk_progress_configure)libgtk.resolve("gtk_progress_configure");
383  gtk_range_get_adjustment = (Ptr_gtk_range_get_adjustment)libgtk.resolve("gtk_range_get_adjustment");
384  gtk_range_set_adjustment = (Ptr_gtk_range_set_adjustment)libgtk.resolve("gtk_range_set_adjustment");
385  gtk_range_set_inverted = (Ptr_gtk_range_set_inverted)libgtk.resolve("gtk_range_set_inverted");
386  gtk_container_add = (Ptr_gtk_container_add)libgtk.resolve("gtk_container_add");
387  gtk_icon_factory_lookup_default = (Ptr_gtk_icon_factory_lookup_default)libgtk.resolve("gtk_icon_factory_lookup_default");
388  gtk_icon_theme_get_default = (Ptr_gtk_icon_theme_get_default)libgtk.resolve("gtk_icon_theme_get_default");
389  gtk_widget_style_get = (Ptr_gtk_widget_style_get)libgtk.resolve("gtk_widget_style_get");
390  gtk_icon_set_render_icon = (Ptr_gtk_icon_set_render_icon)libgtk.resolve("gtk_icon_set_render_icon");
391  gtk_fixed_new = (Ptr_gtk_fixed_new)libgtk.resolve("gtk_fixed_new");
392  gtk_tree_view_column_new = (Ptr_gtk_tree_view_column_new)libgtk.resolve("gtk_tree_view_column_new");
393  gtk_tree_view_append_column= (Ptr_gtk_tree_view_append_column )libgtk.resolve("gtk_tree_view_append_column");
394  gtk_tree_view_get_column = (Ptr_gtk_tree_view_get_column )libgtk.resolve("gtk_tree_view_get_column");
395  gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check");
396  gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box");
397  gtk_paint_flat_box = (Ptr_gtk_paint_flat_box)libgtk.resolve("gtk_paint_flat_box");
398  gtk_paint_check = (Ptr_gtk_paint_check)libgtk.resolve("gtk_paint_check");
399  gtk_paint_box = (Ptr_gtk_paint_box)libgtk.resolve("gtk_paint_box");
400  gtk_paint_resize_grip = (Ptr_gtk_paint_resize_grip)libgtk.resolve("gtk_paint_resize_grip");
401  gtk_paint_focus = (Ptr_gtk_paint_focus)libgtk.resolve("gtk_paint_focus");
402  gtk_paint_shadow = (Ptr_gtk_paint_shadow)libgtk.resolve("gtk_paint_shadow");
403  gtk_paint_slider = (Ptr_gtk_paint_slider)libgtk.resolve("gtk_paint_slider");
404  gtk_paint_expander = (Ptr_gtk_paint_expander)libgtk.resolve("gtk_paint_expander");
405  gtk_paint_handle = (Ptr_gtk_paint_handle)libgtk.resolve("gtk_paint_handle");
406  gtk_paint_option = (Ptr_gtk_paint_option)libgtk.resolve("gtk_paint_option");
407  gtk_paint_arrow = (Ptr_gtk_paint_arrow)libgtk.resolve("gtk_paint_arrow");
408  gtk_paint_box_gap = (Ptr_gtk_paint_box_gap)libgtk.resolve("gtk_paint_box_gap");
409  gtk_paint_extension = (Ptr_gtk_paint_extension)libgtk.resolve("gtk_paint_extension");
410  gtk_paint_hline = (Ptr_gtk_paint_hline)libgtk.resolve("gtk_paint_hline");
411  gtk_paint_vline = (Ptr_gtk_paint_vline)libgtk.resolve("gtk_paint_vline");
412  gtk_adjustment_configure = (Ptr_gtk_adjustment_configure)libgtk.resolve("gtk_adjustment_configure");
413  gtk_adjustment_new = (Ptr_gtk_adjustment_new)libgtk.resolve("gtk_adjustment_new");
414  gtk_menu_item_set_submenu = (Ptr_gtk_menu_item_set_submenu)libgtk.resolve("gtk_menu_item_set_submenu");
415  gtk_settings_get_default = (Ptr_gtk_settings_get_default)libgtk.resolve("gtk_settings_get_default");
416  gtk_separator_menu_item_new = (Ptr_gtk_separator_menu_item_new)libgtk.resolve("gtk_separator_menu_item_new");
417  gtk_frame_new = (Ptr_gtk_frame_new)libgtk.resolve("gtk_frame_new");
418  gtk_expander_new = (Ptr_gtk_expander_new)libgtk.resolve("gtk_expander_new");
419  gtk_statusbar_new = (Ptr_gtk_statusbar_new)libgtk.resolve("gtk_statusbar_new");
420  gtk_combo_box_entry_new = (Ptr_gtk_combo_box_entry_new)libgtk.resolve("gtk_combo_box_entry_new");
421  gtk_container_forall = (Ptr_gtk_container_forall)libgtk.resolve("gtk_container_forall");
422  gtk_widget_size_allocate =(Ptr_gtk_widget_size_allocate)libgtk.resolve("gtk_widget_size_allocate");
423  gtk_widget_size_request =(Ptr_gtk_widget_size_request)libgtk.resolve("gtk_widget_size_request");
424  gtk_widget_set_direction =(Ptr_gtk_widget_set_direction)libgtk.resolve("gtk_widget_set_direction");
425  gtk_widget_path =(Ptr_gtk_widget_path)libgtk.resolve("gtk_widget_path");
426  gtk_container_get_type =(Ptr_gtk_container_get_type)libgtk.resolve("gtk_container_get_type");
427  gtk_window_get_type =(Ptr_gtk_window_get_type)libgtk.resolve("gtk_window_get_type");
428  gtk_widget_get_type =(Ptr_gtk_widget_get_type)libgtk.resolve("gtk_widget_get_type");
429 
430  gtk_rc_get_style_by_paths =(Ptr_gtk_rc_get_style_by_paths)libgtk.resolve("gtk_rc_get_style_by_paths");
431  gtk_check_version =(Ptr_gtk_check_version)libgtk.resolve("gtk_check_version");
432  gtk_border_free =(Ptr_gtk_border_free)libgtk.resolve("gtk_border_free");
433  pango_font_description_get_size = (Ptr_pango_font_description_get_size)libgtk.resolve("pango_font_description_get_size");
434  pango_font_description_get_weight = (Ptr_pango_font_description_get_weight)libgtk.resolve("pango_font_description_get_weight");
435  pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
436  pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
437 
438  gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
439  gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
440 }
static Ptr_gdk_drawable_get_depth gdk_drawable_get_depth
Definition: qgtkstyle_p.h:469
static Ptr_gtk_widget_path gtk_widget_path
Definition: qgtkstyle_p.h:433
static Ptr_gtk_window_new gtk_window_new
Definition: qgtkstyle_p.h:362
char *(* Ptr_gnome_icon_lookup_sync)(GtkIconTheme *icon_theme, GnomeThumbnailFactory *, const char *file_uri, const char *custom_icon, GnomeIconLookupFlags flags, GnomeIconLookupResultFlags *result)
Definition: qgtkstyle_p.h:306
int(* Ptr_gdk_pixbuf_get_height)(const GdkPixbuf *pixbuf)
Definition: qgtkstyle_p.h:245
GdkPixbuf *(* Ptr_gtk_icon_set_render_icon)(GtkIconSet *, GtkStyle *, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget *, const char *)
Definition: qgtkstyle_p.h:187
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter
Definition: qgtkstyle_p.h:451
PangoWeight(* Ptr_pango_font_description_get_weight)(const PangoFontDescription *)
Definition: qgtkstyle_p.h:220
static Ptr_gdk_draw_rectangle gdk_draw_rectangle
Definition: qgtkstyle_p.h:466
void(* Ptr_gdk_draw_rectangle)(GdkDrawable *drawable, GdkGC *gc, gboolean filled, gint x, gint y, gint width, gint height)
Definition: qgtkstyle_p.h:253
static Ptr_gtk_widget_get_type gtk_widget_get_type
Definition: qgtkstyle_p.h:436
static Ptr_gtk_entry_new gtk_entry_new
Definition: qgtkstyle_p.h:384
XID(* Ptr_gdk_x11_drawable_get_xid)(GdkDrawable *)
Definition: qgtkstyle_p.h:259
GtkStyle *(* Ptr_gtk_style_attach)(GtkStyle *, GdkWindow *)
Definition: qgtkstyle_p.h:141
static Ptr_pango_font_description_get_style pango_font_description_get_style
Definition: qgtkstyle_p.h:444
GtkObject *(* Ptr_gtk_adjustment_new)(double, double, double, double, double, double)
Definition: qgtkstyle_p.h:203
void(* Ptr_gtk_paint_box)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:190
gchar *(* Ptr_gtk_check_version)(guint, guint, guint)
Definition: qgtkstyle_p.h:167
void(* Ptr_gtk_widget_size_allocate)(GtkWidget *, GtkAllocation *)
Definition: qgtkstyle_p.h:208
void(* Ptr_gtk_file_chooser_set_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
Definition: qgtkstyle_p.h:228
static Ptr_gtk_file_filter_new gtk_file_filter_new
Definition: qgtkstyle_p.h:446
static Ptr_gtk_combo_box_entry_new gtk_combo_box_entry_new
Definition: qgtkstyle_p.h:395
static Ptr_gtk_scrolled_window_new gtk_scrolled_window_new
Definition: qgtkstyle_p.h:389
static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid
Definition: qgtkstyle_p.h:472
void(* Ptr_gtk_paint_slider)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkOrientation)
Definition: qgtkstyle_p.h:195
static Ptr_gtk_style_attach gtk_style_attach
Definition: qgtkstyle_p.h:361
static Ptr_gtk_expander_new gtk_expander_new
Definition: qgtkstyle_p.h:373
static Ptr_gtk_paint_check gtk_paint_check
Definition: qgtkstyle_p.h:410
static Ptr_gtk_widget_set_direction gtk_widget_set_direction
Definition: qgtkstyle_p.h:432
GtkWidget *(* Ptr_gtk_vscale_new)(GtkAdjustment *)
Definition: qgtkstyle_p.h:163
GtkWidget *(* Ptr_gtk_arrow_new)(GtkArrowType, GtkShadowType)
Definition: qgtkstyle_p.h:146
static Ptr_gtk_range_set_inverted gtk_range_set_inverted
Definition: qgtkstyle_p.h:402
static Ptr_gtk_progress_bar_new gtk_progress_bar_new
Definition: qgtkstyle_p.h:396
void(* Ptr_gtk_file_filter_add_pattern)(GtkFileFilter *filter, const gchar *pattern)
Definition: qgtkstyle_p.h:226
GtkWidget *(* Ptr_gtk_combo_box_entry_new)(void)
Definition: qgtkstyle_p.h:152
static Ptr_gtk_menu_new gtk_menu_new
Definition: qgtkstyle_p.h:372
void(* Ptr_gdk_drawable_unref)(GdkDrawable *)
Definition: qgtkstyle_p.h:256
static Ptr_gtk_widget_size_allocate gtk_widget_size_allocate
Definition: qgtkstyle_p.h:430
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
PangoStyle(* Ptr_pango_font_description_get_style)(const PangoFontDescription *desc)
Definition: qgtkstyle_p.h:222
void(* Ptr_gtk_paint_option)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:199
GtkWidget *(* Ptr_gtk_tool_button_new)(GtkWidget *, const gchar *)
Definition: qgtkstyle_p.h:156
GtkWidget *(* Ptr_gtk_file_chooser_dialog_new)(const gchar *title, GtkWindow *parent, GtkFileChooserAction action, const gchar *first_button_text,...)
Definition: qgtkstyle_p.h:232
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename
Definition: qgtkstyle_p.h:454
static Ptr_gdk_pixbuf_get_width gdk_pixbuf_get_width
Definition: qgtkstyle_p.h:461
static Ptr_gtk_fixed_new gtk_fixed_new
Definition: qgtkstyle_p.h:407
static Ptr_gtk_paint_vline gtk_paint_vline
Definition: qgtkstyle_p.h:425
static Ptr_gtk_range_get_adjustment gtk_range_get_adjustment
Definition: qgtkstyle_p.h:400
void(* Ptr_gdk_color_free)(const GdkColor *)
Definition: qgtkstyle_p.h:244
GtkWidget *(* Ptr_gtk_menu_item_new_with_label)(const gchar *)
Definition: qgtkstyle_p.h:147
static Ptr_gtk_separator_menu_item_new gtk_separator_menu_item_new
Definition: qgtkstyle_p.h:429
static Ptr_gtk_container_get_type gtk_container_get_type
Definition: qgtkstyle_p.h:434
GtkFileFilter *(* Ptr_gtk_file_filter_new)(void)
Definition: qgtkstyle_p.h:224
static Ptr_gtk_widget_modify_color gtk_widget_modify_bg
Definition: qgtkstyle_p.h:367
static Ptr_gdk_pixmap_new gdk_pixmap_new
Definition: qgtkstyle_p.h:463
static Ptr_gtk_file_filter_set_name gtk_file_filter_set_name
Definition: qgtkstyle_p.h:447
GtkIconTheme *(* Ptr_gtk_icon_theme_get_default)(void)
Definition: qgtkstyle_p.h:183
void(* Ptr_gtk_file_chooser_add_filter)(GtkFileChooser *chooser, GtkFileFilter *filter)
Definition: qgtkstyle_p.h:227
static Ptr_gtk_paint_arrow gtk_paint_arrow
Definition: qgtkstyle_p.h:420
static Ptr_gtk_paint_option gtk_paint_option
Definition: qgtkstyle_p.h:414
static Ptr_gtk_menu_bar_new gtk_menu_bar_new
Definition: qgtkstyle_p.h:371
GtkWidget *(* Ptr_gtk_statusbar_new)(void)
Definition: qgtkstyle_p.h:175
void * resolve(const char *symbol)
Returns the address of the exported symbol symbol.
Definition: qlibrary.cpp:1155
static Ptr_gtk_menu_shell_append gtk_menu_shell_append
Definition: qgtkstyle_p.h:398
static Ptr_gtk_window_get_type gtk_window_get_type
Definition: qgtkstyle_p.h:435
void(* Ptr_gtk_menu_shell_append)(GtkMenuShell *, GtkWidget *)
Definition: qgtkstyle_p.h:214
gint(* Ptr_pango_font_description_get_size)(const PangoFontDescription *)
Definition: qgtkstyle_p.h:219
GtkAdjustment *(* Ptr_gtk_range_get_adjustment)(GtkRange *)
Definition: qgtkstyle_p.h:177
void(* Ptr_gtk_progress_configure)(GtkProgress *, double, double, double)
Definition: qgtkstyle_p.h:179
static Ptr_gtk_toolbar_insert gtk_toolbar_insert
Definition: qgtkstyle_p.h:381
void(* Ptr_gtk_paint_hline)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint y)
Definition: qgtkstyle_p.h:204
GtkType(* Ptr_gtk_window_get_type)(void)
Definition: qgtkstyle_p.h:216
GtkType(* Ptr_gtk_container_get_type)(void)
Definition: qgtkstyle_p.h:215
static Ptr_gtk_paint_box gtk_paint_box
Definition: qgtkstyle_p.h:411
static Ptr_gtk_tree_view_column_new gtk_tree_view_column_new
Definition: qgtkstyle_p.h:408
static Ptr_gtk_paint_handle gtk_paint_handle
Definition: qgtkstyle_p.h:421
static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern
Definition: qgtkstyle_p.h:448
static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay
Definition: qgtkstyle_p.h:473
GtkTreeViewColumn *(* Ptr_gtk_tree_view_column_new)(void)
Definition: qgtkstyle_p.h:185
static Ptr_gtk_menu_item_new_with_label gtk_menu_item_new_with_label
Definition: qgtkstyle_p.h:368
void(* Ptr_gtk_paint_shadow)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:194
static Ptr_gtk_widget_style_get gtk_widget_style_get
Definition: qgtkstyle_p.h:405
static Ptr_gtk_paint_extension gtk_paint_extension
Definition: qgtkstyle_p.h:415
GtkWidget *(* Ptr_gtk_hscrollbar_new)(GtkAdjustment *)
Definition: qgtkstyle_p.h:164
const char *(* Ptr_pango_font_description_get_family)(const PangoFontDescription *)
Definition: qgtkstyle_p.h:221
static Ptr_pango_font_description_get_size pango_font_description_get_size
Definition: qgtkstyle_p.h:441
GtkWidget *(* Ptr_gtk_menu_new)(void)
Definition: qgtkstyle_p.h:151
static Ptr_gtk_combo_box_new gtk_combo_box_new
Definition: qgtkstyle_p.h:394
gboolean(* Ptr_gnome_vfs_init)(void)
Definition: qgtkstyle_p.h:305
void(* Ptr_gtk_file_chooser_set_current_name)(GtkFileChooser *, const gchar *)
Definition: qgtkstyle_p.h:237
static Ptr_gdk_pixbuf_get_height gdk_pixbuf_get_height
Definition: qgtkstyle_p.h:462
GtkWidget *(* Ptr_gtk_frame_new)(const gchar *)
Definition: qgtkstyle_p.h:173
GtkWidget *(* Ptr_gtk_expander_new)(const gchar *)
Definition: qgtkstyle_p.h:174
static Ptr_gtk_dialog_run gtk_dialog_run
Definition: qgtkstyle_p.h:457
static Ptr_gdk_pixbuf_new gdk_pixbuf_new
Definition: qgtkstyle_p.h:464
static Ptr_gtk_paint_expander gtk_paint_expander
Definition: qgtkstyle_p.h:422
GtkWidget *(* Ptr_gtk_radio_button_new)(GSList *)
Definition: qgtkstyle_p.h:159
static Ptr_gtk_file_chooser_set_filename gtk_file_chooser_set_filename
Definition: qgtkstyle_p.h:458
void(* Ptr_gtk_paint_vline)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint)
Definition: qgtkstyle_p.h:205
static Ptr_gdk_color_free gdk_color_free
Definition: qgtkstyle_p.h:470
static Ptr_gtk_icon_set_render_icon gtk_icon_set_render_icon
Definition: qgtkstyle_p.h:406
void(* Ptr_gtk_paint_arrow)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, GtkArrowType, gboolean, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:198
static Ptr_gtk_tree_view_get_column gtk_tree_view_get_column
Definition: qgtkstyle_p.h:393
static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths
Definition: qgtkstyle_p.h:437
GtkIconSet *(* Ptr_gtk_icon_factory_lookup_default)(const gchar *)
Definition: qgtkstyle_p.h:182
#define QLS(x)
Definition: qgtkstyle_p.h:77
static Ptr_gtk_spin_button_new gtk_spin_button_new
Definition: qgtkstyle_p.h:379
static Ptr_gtk_paint_focus gtk_paint_focus
Definition: qgtkstyle_p.h:419
void(* Ptr_gtk_widget_set_default_direction)(GtkTextDirection)
Definition: qgtkstyle_p.h:144
GtkSettings *(* Ptr_gtk_settings_get_default)(void)
Definition: qgtkstyle_p.h:176
void(* Ptr_gtk_paint_resize_grip)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, GdkWindowEdge, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:192
static Ptr_gtk_hbutton_box_new gtk_hbutton_box_new
Definition: qgtkstyle_p.h:376
GtkWidget *(* Ptr_gtk_window_new)(GtkWindowType)
Definition: qgtkstyle_p.h:140
static Ptr_gtk_notebook_new gtk_notebook_new
Definition: qgtkstyle_p.h:390
void(* Ptr_gtk_border_free)(GtkBorder *)
Definition: qgtkstyle_p.h:240
GtkType(* Ptr_gtk_widget_get_type)(void)
Definition: qgtkstyle_p.h:217
void(* Ptr_gdk_x11_window_set_user_time)(GdkWindow *window, guint32)
Definition: qgtkstyle_p.h:258
GtkWidget *(* Ptr_gtk_vscrollbar_new)(GtkAdjustment *)
Definition: qgtkstyle_p.h:165
void(* Ptr_gtk_paint_handle)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkOrientation)
Definition: qgtkstyle_p.h:197
static Ptr_gtk_button_new gtk_button_new
Definition: qgtkstyle_p.h:374
GtkWidget *(* Ptr_gtk_check_menu_item_new_with_label)(const gchar *)
Definition: qgtkstyle_p.h:149
GtkWidget *(* Ptr_gtk_progress_bar_new)(void)
Definition: qgtkstyle_p.h:161
static Ptr_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels
Definition: qgtkstyle_p.h:460
static Ptr_gtk_paint_shadow gtk_paint_shadow
Definition: qgtkstyle_p.h:417
GSList *(* Ptr_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser)
Definition: qgtkstyle_p.h:231
int(* Ptr_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf)
Definition: qgtkstyle_p.h:243
void(* Ptr_gtk_container_forall)(GtkContainer *, GtkCallback, gpointer)
Definition: qgtkstyle_p.h:207
static Ptr_gtk_adjustment_new gtk_adjustment_new
Definition: qgtkstyle_p.h:424
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)
Definition: qgtkstyle_p.h:246
void(* Ptr_gtk_tree_view_append_column)(GtkTreeView *, GtkTreeViewColumn *)
Definition: qgtkstyle_p.h:188
static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time
Definition: qgtkstyle_p.h:471
void(* Ptr_gtk_menu_item_set_submenu)(GtkMenuItem *, GtkWidget *)
Definition: qgtkstyle_p.h:206
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
static Ptr_gtk_hscrollbar_new gtk_hscrollbar_new
Definition: qgtkstyle_p.h:387
static Ptr_gtk_tree_view_append_column gtk_tree_view_append_column
Definition: qgtkstyle_p.h:409
void(* Ptr_gtk_widget_style_get)(GtkWidget *, const gchar *first_property_name,...)
Definition: qgtkstyle_p.h:184
void(* Ptr_gtk_paint_check)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:189
gboolean(* Ptr_gtk_file_chooser_set_current_folder)(GtkFileChooser *, const gchar *)
Definition: qgtkstyle_p.h:223
static Ptr_gtk_widget_size_request gtk_widget_size_request
Definition: qgtkstyle_p.h:431
static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter
Definition: qgtkstyle_p.h:449
static Ptr_gtk_radio_button_new gtk_radio_button_new
Definition: qgtkstyle_p.h:378
static Ptr_gtk_statusbar_new gtk_statusbar_new
Definition: qgtkstyle_p.h:383
static Ptr_gtk_check_version gtk_check_version
Definition: qgtkstyle_p.h:438
static Ptr_gtk_range_set_adjustment gtk_range_set_adjustment
Definition: qgtkstyle_p.h:401
static Ptr_gtk_vscrollbar_new gtk_vscrollbar_new
Definition: qgtkstyle_p.h:388
static Ptr_gtk_paint_flat_box gtk_paint_flat_box
Definition: qgtkstyle_p.h:413
static Ptr_gtk_paint_box_gap gtk_paint_box_gap
Definition: qgtkstyle_p.h:412
static Ptr_gtk_paint_hline gtk_paint_hline
Definition: qgtkstyle_p.h:426
gboolean(* Ptr_gtk_file_chooser_set_filename)(GtkFileChooser *chooser, const gchar *name)
Definition: qgtkstyle_p.h:238
static Ptr_gtk_separator_tool_item_new gtk_separator_tool_item_new
Definition: qgtkstyle_p.h:380
GtkWidget *(* Ptr_gtk_separator_menu_item_new)(void)
Definition: qgtkstyle_p.h:148
static Ptr_gtk_border_free gtk_border_free
Definition: qgtkstyle_p.h:439
static Ptr_gtk_container_forall gtk_container_forall
Definition: qgtkstyle_p.h:359
void(* Ptr_gtk_range_set_adjustment)(GtkRange *, GtkAdjustment *)
Definition: qgtkstyle_p.h:178
static Ptr_gtk_icon_factory_lookup_default gtk_icon_factory_lookup_default
Definition: qgtkstyle_p.h:403
static Ptr_gtk_paint_resize_grip gtk_paint_resize_grip
Definition: qgtkstyle_p.h:418
GtkTreeViewColumn *(* Ptr_gtk_tree_view_get_column)(GtkTreeView *, gint)
Definition: qgtkstyle_p.h:171
static Ptr_gtk_widget_set_default_direction gtk_widget_set_default_direction
Definition: qgtkstyle_p.h:365
gchar *(* Ptr_gtk_file_chooser_get_filename)(GtkFileChooser *chooser)
Definition: qgtkstyle_p.h:230
void(* Ptr_gdk_pixbuf_unref)(GdkPixbuf *)
Definition: qgtkstyle_p.h:255
static Ptr_gtk_check_menu_item_new_with_label gtk_check_menu_item_new_with_label
Definition: qgtkstyle_p.h:370
static Ptr_gtk_frame_new gtk_frame_new
Definition: qgtkstyle_p.h:382
GtkWidget *(* Ptr_gtk_hbutton_box_new)(void)
Definition: qgtkstyle_p.h:157
void(* Ptr_gtk_paint_flat_box)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:200
GtkWidget *(* Ptr_gtk_combo_box_new)(void)
Definition: qgtkstyle_p.h:172
GtkWidget *(* Ptr_gtk_spin_button_new)(GtkAdjustment *, double, int)
Definition: qgtkstyle_p.h:154
static Ptr_gtk_check_button_new gtk_check_button_new
Definition: qgtkstyle_p.h:377
static Ptr_gtk_settings_get_default gtk_settings_get_default
Definition: qgtkstyle_p.h:428
static Ptr_gtk_widget_modify_color gtk_widget_modify_fg
Definition: qgtkstyle_p.h:366
static Ptr_gtk_adjustment_configure gtk_adjustment_configure
Definition: qgtkstyle_p.h:423
static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter
Definition: qgtkstyle_p.h:450
static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync
Definition: qgtkstyle_p.h:479
void(* Ptr_gtk_paint_expander)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, GtkExpanderStyle)
Definition: qgtkstyle_p.h:196
GtkStyle *(* Ptr_gtk_rc_get_style_by_paths)(GtkSettings *, const char *, const char *, GType)
Definition: qgtkstyle_p.h:218
GtkWidget *(* Ptr_gtk_tree_view_new)(void)
Definition: qgtkstyle_p.h:170
static Ptr_gtk_vscale_new gtk_vscale_new
Definition: qgtkstyle_p.h:386
GtkWidget *(* Ptr_gtk_scrolled_window_new)(GtkAdjustment *, GtkAdjustment *)
Definition: qgtkstyle_p.h:166
static Ptr_gtk_progress_configure gtk_progress_configure
Definition: qgtkstyle_p.h:399
void(* Ptr_gtk_init)(int *, char ***)
Definition: qgtkstyle_p.h:139
gint(* Ptr_gtk_dialog_run)(GtkDialog *)
Definition: qgtkstyle_p.h:239
GtkWidget *(* Ptr_gtk_toolbar_new)(void)
Definition: qgtkstyle_p.h:153
void(* Ptr_gtk_paint_extension)(GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType)
Definition: qgtkstyle_p.h:201
static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder
Definition: qgtkstyle_p.h:453
static Ptr_pango_font_description_get_weight pango_font_description_get_weight
Definition: qgtkstyle_p.h:442
GtkToolItem *(* Ptr_gtk_separator_tool_item_new)(void)
Definition: qgtkstyle_p.h:168
void(* Ptr_gtk_container_add)(GtkContainer *container, GtkWidget *widget)
Definition: qgtkstyle_p.h:181
static Ptr_gdk_pixbuf_unref gdk_pixbuf_unref
Definition: qgtkstyle_p.h:467
static Ptr_gtk_file_chooser_get_filenames gtk_file_chooser_get_filenames
Definition: qgtkstyle_p.h:455
void(* Ptr_gtk_widget_modify_color)(GtkWidget *widget, GtkStateType state, const GdkColor *color)
Definition: qgtkstyle_p.h:145
Display *(* Ptr_gdk_x11_drawable_get_xdisplay)(GdkDrawable *)
Definition: qgtkstyle_p.h:260
GtkWidget *(* Ptr_gtk_entry_new)(void)
Definition: qgtkstyle_p.h:169
GtkWidget *(* Ptr_gtk_button_new)(void)
Definition: qgtkstyle_p.h:155
static Ptr_gtk_tool_button_new gtk_tool_button_new
Definition: qgtkstyle_p.h:375
static Ptr_gtk_menu_item_set_submenu gtk_menu_item_set_submenu
Definition: qgtkstyle_p.h:427
GtkFileFilter *(* Ptr_gtk_file_chooser_get_filter)(GtkFileChooser *chooser)
Definition: qgtkstyle_p.h:229
static Ptr_gdk_pixbuf_get_from_drawable gdk_pixbuf_get_from_drawable
Definition: qgtkstyle_p.h:465
static Ptr_gtk_hscale_new gtk_hscale_new
Definition: qgtkstyle_p.h:385
GdkPixmap *(* Ptr_gdk_pixmap_new)(GdkDrawable *drawable, gint width, gint height, gint depth)
Definition: qgtkstyle_p.h:250
static Ptr_gdk_drawable_unref gdk_drawable_unref
Definition: qgtkstyle_p.h:468
static Ptr_gtk_toolbar_new gtk_toolbar_new
Definition: qgtkstyle_p.h:391
GtkWidget *(* Ptr_gtk_check_button_new)(void)
Definition: qgtkstyle_p.h:158
static Ptr_gtk_init gtk_init
Definition: qgtkstyle_p.h:360
static Ptr_gtk_paint_slider gtk_paint_slider
Definition: qgtkstyle_p.h:416
static Ptr_gnome_vfs_init gnome_vfs_init
Definition: qgtkstyle_p.h:480
void(* Ptr_gtk_widget_set_direction)(GtkWidget *, GtkTextDirection)
Definition: qgtkstyle_p.h:210
static Ptr_gtk_container_add gtk_container_add
Definition: qgtkstyle_p.h:397
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)
Definition: qgtkstyle_p.h:191
void(* Ptr_gtk_toolbar_insert)(GtkToolbar *toolbar, GtkToolItem *item, int pos)
Definition: qgtkstyle_p.h:213
void(* Ptr_gtk_paint_focus)(GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint)
Definition: qgtkstyle_p.h:193
static Ptr_gtk_arrow_new gtk_arrow_new
Definition: qgtkstyle_p.h:369
gint(* Ptr_gdk_drawable_get_depth)(GdkDrawable *)
Definition: qgtkstyle_p.h:257
GtkWidget *(* Ptr_gtk_fixed_new)(void)
Definition: qgtkstyle_p.h:186
GdkPixbuf *(* Ptr_gdk_pixbuf_new)(GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height)
Definition: qgtkstyle_p.h:251
void(* Ptr_gtk_widget_size_request)(GtkWidget *widget, GtkRequisition *requisition)
Definition: qgtkstyle_p.h:209
GtkWidget *(* Ptr_gtk_notebook_new)(void)
Definition: qgtkstyle_p.h:160
void(* Ptr_gtk_widget_destroy)(GtkWidget *)
Definition: qgtkstyle_p.h:142
static Ptr_gtk_icon_theme_get_default gtk_icon_theme_get_default
Definition: qgtkstyle_p.h:404
void(* Ptr_gtk_range_set_inverted)(GtkRange *, bool)
Definition: qgtkstyle_p.h:180
static Ptr_gtk_file_chooser_set_current_name gtk_file_chooser_set_current_name
Definition: qgtkstyle_p.h:456
guchar *(* Ptr_gdk_pixbuf_get_pixels)(const GdkPixbuf *pixbuf)
Definition: qgtkstyle_p.h:242
The QLibrary class loads shared libraries at runtime.
Definition: qlibrary.h:62
void(* Ptr_gtk_widget_path)(GtkWidget *, guint *, gchar **, gchar **)
Definition: qgtkstyle_p.h:211
GtkWidget *(* Ptr_gtk_hscale_new)(GtkAdjustment *)
Definition: qgtkstyle_p.h:162
static Ptr_pango_font_description_get_family pango_font_description_get_family
Definition: qgtkstyle_p.h:443
static Ptr_gtk_tree_view_new gtk_tree_view_new
Definition: qgtkstyle_p.h:392
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
Definition: qgtkstyle_p.h:452
GtkWidget *(* Ptr_gtk_menu_bar_new)(void)
Definition: qgtkstyle_p.h:150
void(* Ptr_gtk_widget_realize)(GtkWidget *)
Definition: qgtkstyle_p.h:143
void(* Ptr_gtk_adjustment_configure)(GtkAdjustment *, double, double, double, double, double, double)
Definition: qgtkstyle_p.h:202
void(* Ptr_gtk_file_filter_set_name)(GtkFileFilter *, const gchar *)
Definition: qgtkstyle_p.h:225

◆ saveFilename()

QString QGtkStylePrivate::saveFilename ( QWidget parent,
const QString caption,
const QString dir,
const QString filter,
QString selectedFilter,
QFileDialog::Options  options 
)
static

Definition at line 1087 of file qgtkstyle_p.cpp.

Referenced by QGtkStyle::polish().

1089 {
1091  GtkWidget *gtkFileChooser = QGtkStylePrivate::gtk_file_chooser_dialog_new (qPrintable(caption),
1092  NULL,
1093  GTK_FILE_CHOOSER_ACTION_SAVE,
1094  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1095  GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
1096  NULL);
1097  setupGtkFileChooser(gtkFileChooser, parent, dir, filter, selectedFilter, options, true, &filterMap);
1098 
1099  QWidget modal_widget;
1100  modal_widget.setAttribute(Qt::WA_NoChildEventsForParent, true);
1101  modal_widget.setParent(parent, Qt::Window);
1102  QApplicationPrivate::enterModal(&modal_widget);
1103 
1104  QString filename;
1105  if (QGtkStylePrivate::gtk_dialog_run ((GtkDialog*)gtkFileChooser) == GTK_RESPONSE_ACCEPT) {
1106  char *gtk_filename = QGtkStylePrivate::gtk_file_chooser_get_filename ((GtkFileChooser*)gtkFileChooser);
1107  filename = QString::fromUtf8(gtk_filename);
1108  g_free (gtk_filename);
1109  if (selectedFilter) {
1110  GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_chooser_get_filter ((GtkFileChooser*)gtkFileChooser);
1111  *selectedFilter = filterMap.value(gtkFilter);
1112  }
1113  }
1114 
1115  QApplicationPrivate::leaveModal(&modal_widget);
1116  gtk_widget_destroy (gtkFileChooser);
1117  return filename;
1118 }
static Ptr_gtk_file_chooser_get_filter gtk_file_chooser_get_filter
Definition: qgtkstyle_p.h:451
void setParent(QWidget *parent)
Sets the parent of the widget to parent, and resets the window flags.
Definition: qwidget.cpp:10479
static Ptr_gtk_widget_destroy gtk_widget_destroy
Definition: qgtkstyle_p.h:363
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static Ptr_gtk_file_chooser_get_filename gtk_file_chooser_get_filename
Definition: qgtkstyle_p.h:454
The QString class provides a Unicode character string.
Definition: qstring.h:83
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_dialog_run gtk_dialog_run
Definition: qgtkstyle_p.h:457
const T value(const Key &key) const
Returns the value associated with the key key.
Definition: qmap.h:499
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
void setAttribute(Qt::WidgetAttribute, bool on=true)
Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.
Definition: qwidget.cpp:11087
#define qPrintable(string)
Definition: qglobal.h:1750
static void leaveModal(QWidget *)
static void enterModal(QWidget *)
The QMap class is a template class that provides a skip-list-based dictionary.
Definition: qdatastream.h:67
static Ptr_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new
Definition: qgtkstyle_p.h:452

◆ setupGtkFileChooser()

void QGtkStylePrivate::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

Definition at line 918 of file qgtkstyle_p.cpp.

Referenced by openDirectory(), openFilename(), openFilenames(), and saveFilename().

922 {
923  g_object_set(gtkFileChooser, "do-overwrite-confirmation", gboolean(!(options & QFileDialog::DontConfirmOverwrite)), NULL);
924  g_object_set(gtkFileChooser, "local_only", gboolean(true), NULL);
925  if (!filter.isEmpty()) {
927  foreach (const QString &rawfilter, filters) {
928  GtkFileFilter *gtkFilter = QGtkStylePrivate::gtk_file_filter_new ();
929  QString name = rawfilter.left(rawfilter.indexOf(QLatin1Char('(')));
931  QGtkStylePrivate::gtk_file_filter_set_name(gtkFilter, qPrintable(name.isEmpty() ? extensions.join(QLS(", ")) : name));
932 
933  foreach (const QString &fileExtension, extensions) {
934  // Note Gtk file dialogs are by default case sensitive
935  // and only supports basic glob syntax so we
936  // rewrite .xyz to .[xX][yY][zZ]
937  QString caseInsensitive;
938  for (int i = 0 ; i < fileExtension.length() ; ++i) {
939  QChar ch = fileExtension.at(i);
940  if (ch.isLetter()) {
941  caseInsensitive.append(
942  QLatin1Char('[') +
943  ch.toLower() +
944  ch.toUpper() +
945  QLatin1Char(']'));
946  } else {
947  caseInsensitive.append(ch);
948  }
949  }
950  QGtkStylePrivate::gtk_file_filter_add_pattern (gtkFilter, qPrintable(caseInsensitive));
951 
952  }
953  if (filterMap)
954  filterMap->insert(gtkFilter, rawfilter);
955  QGtkStylePrivate::gtk_file_chooser_add_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
956  if (selectedFilter && (rawfilter == *selectedFilter))
957  QGtkStylePrivate::gtk_file_chooser_set_filter((GtkFileChooser*)gtkFileChooser, gtkFilter);
958  }
959  }
960 
961  // Using the currently active window is not entirely correct, however
962  // it gives more sensible behavior for applications that do not provide a
963  // parent
964  QWidget *modalFor = parent ? parent->window() : qApp->activeWindow();
965  if (modalFor) {
966  QGtkStylePrivate::gtk_widget_realize(gtkFileChooser); // Creates X window
967  XSetTransientForHint(QGtkStylePrivate::gdk_x11_drawable_get_xdisplay(gtkFileChooser->window),
968  QGtkStylePrivate::gdk_x11_drawable_get_xid(gtkFileChooser->window),
969  modalFor->winId());
971 
972  }
973 
974  QFileInfo fileinfo(dir);
975  if (dir.isEmpty())
976  fileinfo.setFile(QDir::currentPath());
977  fileinfo.makeAbsolute();
978  if (fileinfo.isDir()) {
979  QGtkStylePrivate::gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
980  } else if (isSaveDialog) {
981  QGtkStylePrivate::gtk_file_chooser_set_current_folder((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.absolutePath()));
982  QGtkStylePrivate::gtk_file_chooser_set_current_name((GtkFileChooser*)gtkFileChooser, qPrintable(fileinfo.fileName()));
983  } else {
984  QGtkStylePrivate::gtk_file_chooser_set_filename((GtkFileChooser*)gtkFileChooser, qPrintable(dir));
985  }
986 }
bool isLetter() const
Returns true if the character is a letter (Letter_* categories); otherwise returns false...
Definition: qchar.cpp:653
static Ptr_gtk_file_filter_new gtk_file_filter_new
Definition: qgtkstyle_p.h:446
const QChar at(int i) const
Returns the character at the given index position in the string.
Definition: qstring.h:698
static unsigned long appUserTime()
Returns the X11 user time.
static Ptr_gdk_x11_drawable_get_xid gdk_x11_drawable_get_xid
Definition: qgtkstyle_p.h:472
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static Ptr_gtk_file_filter_set_name gtk_file_filter_set_name
Definition: qgtkstyle_p.h:447
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QString currentPath()
Returns the absolute path of the application&#39;s current directory.
Definition: qdir.cpp:1875
Q_GUI_EXPORT QString extensions()
Definition: qegl.cpp:785
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
static Ptr_gtk_file_filter_add_pattern gtk_file_filter_add_pattern
Definition: qgtkstyle_p.h:448
static Ptr_gdk_x11_drawable_get_xdisplay gdk_x11_drawable_get_xdisplay
Definition: qgtkstyle_p.h:473
static Ptr_gtk_file_chooser_set_filename gtk_file_chooser_set_filename
Definition: qgtkstyle_p.h:458
static QStringList extract_filter(const QString &rawFilter)
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
Definition: qstring.cpp:3664
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
#define qApp
#define QLS(x)
Definition: qgtkstyle_p.h:77
const char * name
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.cpp:2838
static Ptr_gdk_x11_window_set_user_time gdk_x11_window_set_user_time
Definition: qgtkstyle_p.h:471
QChar toUpper() const
Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the ch...
Definition: qchar.cpp:1287
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
static Ptr_gtk_file_chooser_add_filter gtk_file_chooser_add_filter
Definition: qgtkstyle_p.h:449
QString join(const QString &sep) const
Joins all the string list&#39;s strings into a single string with each element separated by the given sep...
Definition: qstringlist.h:162
static const char *const filters[3]
QString & append(QChar c)
Definition: qstring.cpp:1777
static Ptr_gtk_file_chooser_set_filter gtk_file_chooser_set_filter
Definition: qgtkstyle_p.h:450
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
Definition: qmap.h:559
static Ptr_gtk_file_chooser_set_current_folder gtk_file_chooser_set_current_folder
Definition: qgtkstyle_p.h:453
QWidget * window() const
Returns the window for this widget, i.e.
Definition: qwidget.cpp:4492
WId winId() const
Returns the window system identifier of the widget.
Definition: qwidget.cpp:2557
QStringList qt_make_filter_list(const QString &filter)
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:60
#define qPrintable(string)
Definition: qglobal.h:1750
QChar toLower() const
Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the ch...
Definition: qchar.cpp:1239
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
static Ptr_gtk_file_chooser_set_current_name gtk_file_chooser_set_current_name
Definition: qgtkstyle_p.h:456

◆ setupGtkWidget()

void QGtkStylePrivate::setupGtkWidget ( GtkWidget *  widget)
staticprotected

Definition at line 757 of file qgtkstyle_p.cpp.

Referenced by addWidget(), and initGtkMenu().

758 {
759  if (Q_GTK_IS_WIDGET(widget)) {
760  static GtkWidget* protoLayout = 0;
761  if (!protoLayout) {
762  protoLayout = QGtkStylePrivate::gtk_fixed_new();
763  QGtkStylePrivate::gtk_container_add((GtkContainer*)(gtkWidgetMap()->value("GtkWindow")), protoLayout);
764  }
765  Q_ASSERT(protoLayout);
766 
767  if (!widget->parent && !GTK_WIDGET_TOPLEVEL(widget))
768  QGtkStylePrivate::gtk_container_add((GtkContainer*)(protoLayout), widget);
770  }
771 }
#define Q_GTK_IS_WIDGET(widget)
Definition: qgtkstyle_p.h:75
QPointer< QWidget > widget
static Ptr_gtk_fixed_new gtk_fixed_new
Definition: qgtkstyle_p.h:407
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static Ptr_gtk_widget_realize gtk_widget_realize
Definition: qgtkstyle_p.h:364
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
static Ptr_gtk_container_add gtk_container_add
Definition: qgtkstyle_p.h:397
static WidgetMap * gtkWidgetMap()
Definition: qgtkstyle_p.h:494

Friends and Related Functions

◆ QGtkStyleUpdateScheduler

Definition at line 517 of file qgtkstyle_p.h.

Properties

◆ filter

QGtkStyleFilter QGtkStylePrivate::filter

Definition at line 321 of file qgtkstyle_p.h.

Referenced by extract_filter().

◆ gconf_client_get_bool

Ptr_gconf_client_get_bool QGtkStylePrivate::gconf_client_get_bool = 0
static

Definition at line 477 of file qgtkstyle_p.h.

Referenced by getGConfBool(), and resolveGConf().

◆ gconf_client_get_default

Ptr_gconf_client_get_default QGtkStylePrivate::gconf_client_get_default = 0
static

Definition at line 475 of file qgtkstyle_p.h.

Referenced by getGConfBool(), getGConfString(), and resolveGConf().

◆ gconf_client_get_string

Ptr_gconf_client_get_string QGtkStylePrivate::gconf_client_get_string = 0
static

Definition at line 476 of file qgtkstyle_p.h.

Referenced by getGConfString(), and resolveGConf().

◆ gdk_color_free

Ptr_gdk_color_free QGtkStylePrivate::gdk_color_free = 0
static

Definition at line 470 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_draw_rectangle

Ptr_gdk_draw_rectangle QGtkStylePrivate::gdk_draw_rectangle = 0
static

Definition at line 466 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_drawable_get_depth

Ptr_gdk_drawable_get_depth QGtkStylePrivate::gdk_drawable_get_depth = 0
static

Definition at line 469 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gdk_drawable_unref

Ptr_gdk_drawable_unref QGtkStylePrivate::gdk_drawable_unref = 0
static

Definition at line 468 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_pixbuf_get_from_drawable

Ptr_gdk_pixbuf_get_from_drawable QGtkStylePrivate::gdk_pixbuf_get_from_drawable = 0
static

Definition at line 465 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_pixbuf_get_height

Ptr_gdk_pixbuf_get_height QGtkStylePrivate::gdk_pixbuf_get_height = 0
static

Definition at line 462 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gdk_pixbuf_get_pixels

Ptr_gdk_pixbuf_get_pixels QGtkStylePrivate::gdk_pixbuf_get_pixels = 0
static

Definition at line 460 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gdk_pixbuf_get_width

Ptr_gdk_pixbuf_get_width QGtkStylePrivate::gdk_pixbuf_get_width = 0
static

Definition at line 461 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gdk_pixbuf_new

Ptr_gdk_pixbuf_new QGtkStylePrivate::gdk_pixbuf_new = 0
static

Definition at line 464 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_pixbuf_unref

Ptr_gdk_pixbuf_unref QGtkStylePrivate::gdk_pixbuf_unref = 0
static

Definition at line 467 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gdk_pixmap_new

Ptr_gdk_pixmap_new QGtkStylePrivate::gdk_pixmap_new = 0
static

Definition at line 463 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gdk_x11_drawable_get_xdisplay

Ptr_gdk_x11_drawable_get_xdisplay QGtkStylePrivate::gdk_x11_drawable_get_xdisplay = 0
static

Definition at line 473 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gdk_x11_drawable_get_xid

Ptr_gdk_x11_drawable_get_xid QGtkStylePrivate::gdk_x11_drawable_get_xid = 0
static

Definition at line 472 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gdk_x11_window_set_user_time

Ptr_gdk_x11_window_set_user_time QGtkStylePrivate::gdk_x11_window_set_user_time = 0
static

Definition at line 471 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gnome_icon_lookup_sync

Ptr_gnome_icon_lookup_sync QGtkStylePrivate::gnome_icon_lookup_sync = 0
static

Definition at line 479 of file qgtkstyle_p.h.

Referenced by getFilesystemIcon(), and resolveGtk().

◆ gnome_vfs_init

Ptr_gnome_vfs_init QGtkStylePrivate::gnome_vfs_init = 0
static

Definition at line 480 of file qgtkstyle_p.h.

Referenced by getFilesystemIcon(), and resolveGtk().

◆ gtk_adjustment_configure

Ptr_gtk_adjustment_configure QGtkStylePrivate::gtk_adjustment_configure = 0
static

Definition at line 423 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_adjustment_new

Ptr_gtk_adjustment_new QGtkStylePrivate::gtk_adjustment_new = 0
static

Definition at line 424 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_arrow_new

Ptr_gtk_arrow_new QGtkStylePrivate::gtk_arrow_new = 0
static

Definition at line 369 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_border_free

Ptr_gtk_border_free QGtkStylePrivate::gtk_border_free = 0
static

Definition at line 439 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_button_new

Ptr_gtk_button_new QGtkStylePrivate::gtk_button_new = 0
static

Definition at line 374 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_check_button_new

Ptr_gtk_check_button_new QGtkStylePrivate::gtk_check_button_new = 0
static

Definition at line 377 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_check_menu_item_new_with_label

Ptr_gtk_check_menu_item_new_with_label QGtkStylePrivate::gtk_check_menu_item_new_with_label = 0
static

Definition at line 370 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_check_version

Ptr_gtk_check_version QGtkStylePrivate::gtk_check_version = 0
static

Definition at line 438 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_combo_box_entry_new

Ptr_gtk_combo_box_entry_new QGtkStylePrivate::gtk_combo_box_entry_new = 0
static

Definition at line 395 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_combo_box_new

Ptr_gtk_combo_box_new QGtkStylePrivate::gtk_combo_box_new = 0
static

Definition at line 394 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_container_add

Ptr_gtk_container_add QGtkStylePrivate::gtk_container_add = 0
static

Definition at line 397 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkWidget().

◆ gtk_container_forall

Ptr_gtk_container_forall QGtkStylePrivate::gtk_container_forall = 0
static

Definition at line 359 of file qgtkstyle_p.h.

Referenced by addAllSubWidgets(), and resolveGtk().

◆ gtk_container_get_type

Ptr_gtk_container_get_type QGtkStylePrivate::gtk_container_get_type = 0
static

Definition at line 434 of file qgtkstyle_p.h.

Referenced by addAllSubWidgets(), and resolveGtk().

◆ gtk_dialog_run

Ptr_gtk_dialog_run QGtkStylePrivate::gtk_dialog_run = 0
static

Definition at line 457 of file qgtkstyle_p.h.

Referenced by openDirectory(), openFilename(), openFilenames(), resolveGtk(), and saveFilename().

◆ gtk_entry_new

Ptr_gtk_entry_new QGtkStylePrivate::gtk_entry_new = 0
static

Definition at line 384 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_expander_new

Ptr_gtk_expander_new QGtkStylePrivate::gtk_expander_new = 0
static

Definition at line 373 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_file_chooser_add_filter

Ptr_gtk_file_chooser_add_filter QGtkStylePrivate::gtk_file_chooser_add_filter = 0
static

Definition at line 449 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_chooser_dialog_new

Ptr_gtk_file_chooser_dialog_new QGtkStylePrivate::gtk_file_chooser_dialog_new = 0
static

Definition at line 452 of file qgtkstyle_p.h.

Referenced by openDirectory(), openFilename(), openFilenames(), resolveGtk(), and saveFilename().

◆ gtk_file_chooser_get_filename

Ptr_gtk_file_chooser_get_filename QGtkStylePrivate::gtk_file_chooser_get_filename = 0
static

Definition at line 454 of file qgtkstyle_p.h.

Referenced by openDirectory(), openFilename(), resolveGtk(), and saveFilename().

◆ gtk_file_chooser_get_filenames

Ptr_gtk_file_chooser_get_filenames QGtkStylePrivate::gtk_file_chooser_get_filenames = 0
static

Definition at line 455 of file qgtkstyle_p.h.

Referenced by openFilenames(), and resolveGtk().

◆ gtk_file_chooser_get_filter

Ptr_gtk_file_chooser_get_filter QGtkStylePrivate::gtk_file_chooser_get_filter = 0
static

Definition at line 451 of file qgtkstyle_p.h.

Referenced by openFilename(), openFilenames(), resolveGtk(), and saveFilename().

◆ gtk_file_chooser_set_current_folder

Ptr_gtk_file_chooser_set_current_folder QGtkStylePrivate::gtk_file_chooser_set_current_folder = 0
static

Definition at line 453 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_chooser_set_current_name

Ptr_gtk_file_chooser_set_current_name QGtkStylePrivate::gtk_file_chooser_set_current_name = 0
static

Definition at line 456 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_chooser_set_filename

Ptr_gtk_file_chooser_set_filename QGtkStylePrivate::gtk_file_chooser_set_filename = 0
static

Definition at line 458 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_chooser_set_filter

Ptr_gtk_file_chooser_set_filter QGtkStylePrivate::gtk_file_chooser_set_filter = 0
static

Definition at line 450 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_filter_add_pattern

Ptr_gtk_file_filter_add_pattern QGtkStylePrivate::gtk_file_filter_add_pattern = 0
static

Definition at line 448 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_filter_new

Ptr_gtk_file_filter_new QGtkStylePrivate::gtk_file_filter_new = 0
static

Definition at line 446 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_file_filter_set_name

Ptr_gtk_file_filter_set_name QGtkStylePrivate::gtk_file_filter_set_name = 0
static

Definition at line 447 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkFileChooser().

◆ gtk_fixed_new

Ptr_gtk_fixed_new QGtkStylePrivate::gtk_fixed_new = 0
static

Definition at line 407 of file qgtkstyle_p.h.

Referenced by resolveGtk(), and setupGtkWidget().

◆ gtk_frame_new

Ptr_gtk_frame_new QGtkStylePrivate::gtk_frame_new = 0
static

Definition at line 382 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_hbutton_box_new

Ptr_gtk_hbutton_box_new QGtkStylePrivate::gtk_hbutton_box_new = 0
static

Definition at line 376 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_hscale_new

Ptr_gtk_hscale_new QGtkStylePrivate::gtk_hscale_new = 0
static

Definition at line 385 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_hscrollbar_new

Ptr_gtk_hscrollbar_new QGtkStylePrivate::gtk_hscrollbar_new = 0
static

Definition at line 387 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_icon_factory_lookup_default

Ptr_gtk_icon_factory_lookup_default QGtkStylePrivate::gtk_icon_factory_lookup_default = 0
static

Definition at line 403 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gtk_icon_set_render_icon

Ptr_gtk_icon_set_render_icon QGtkStylePrivate::gtk_icon_set_render_icon = 0
static

Definition at line 406 of file qgtkstyle_p.h.

Referenced by QGtkPainter::getIcon(), and resolveGtk().

◆ gtk_icon_theme_get_default

Ptr_gtk_icon_theme_get_default QGtkStylePrivate::gtk_icon_theme_get_default = 0
static

Definition at line 404 of file qgtkstyle_p.h.

Referenced by getFilesystemIcon(), and resolveGtk().

◆ gtk_init

Ptr_gtk_init QGtkStylePrivate::gtk_init = 0
static

Definition at line 360 of file qgtkstyle_p.h.

Referenced by getIconThemeName(), initGtkWidgets(), and resolveGtk().

◆ gtk_menu_bar_new

Ptr_gtk_menu_bar_new QGtkStylePrivate::gtk_menu_bar_new = 0
static

Definition at line 371 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_menu_item_new_with_label

Ptr_gtk_menu_item_new_with_label QGtkStylePrivate::gtk_menu_item_new_with_label = 0
static

Definition at line 368 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_menu_item_set_submenu

Ptr_gtk_menu_item_set_submenu QGtkStylePrivate::gtk_menu_item_set_submenu = 0
static

Definition at line 427 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_menu_new

Ptr_gtk_menu_new QGtkStylePrivate::gtk_menu_new = 0
static

Definition at line 372 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_menu_shell_append

Ptr_gtk_menu_shell_append QGtkStylePrivate::gtk_menu_shell_append = 0
static

Definition at line 398 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_notebook_new

Ptr_gtk_notebook_new QGtkStylePrivate::gtk_notebook_new = 0
static

Definition at line 390 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_paint_arrow

Ptr_gtk_paint_arrow QGtkStylePrivate::gtk_paint_arrow = 0
static

Definition at line 420 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintArrow(), and resolveGtk().

◆ gtk_paint_box

Ptr_gtk_paint_box QGtkStylePrivate::gtk_paint_box = 0
static

Definition at line 411 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintBox(), and resolveGtk().

◆ gtk_paint_box_gap

Ptr_gtk_paint_box_gap QGtkStylePrivate::gtk_paint_box_gap = 0
static

Definition at line 412 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintBoxGap(), and resolveGtk().

◆ gtk_paint_check

Ptr_gtk_paint_check QGtkStylePrivate::gtk_paint_check = 0
static

Definition at line 410 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintCheckbox(), and resolveGtk().

◆ gtk_paint_expander

Ptr_gtk_paint_expander QGtkStylePrivate::gtk_paint_expander = 0
static

Definition at line 422 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintExpander(), and resolveGtk().

◆ gtk_paint_extension

Ptr_gtk_paint_extension QGtkStylePrivate::gtk_paint_extension = 0
static

Definition at line 415 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintExtention(), and resolveGtk().

◆ gtk_paint_flat_box

Ptr_gtk_paint_flat_box QGtkStylePrivate::gtk_paint_flat_box = 0
static

Definition at line 413 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintFlatBox(), and resolveGtk().

◆ gtk_paint_focus

Ptr_gtk_paint_focus QGtkStylePrivate::gtk_paint_focus = 0
static

Definition at line 419 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintFocus(), and resolveGtk().

◆ gtk_paint_handle

Ptr_gtk_paint_handle QGtkStylePrivate::gtk_paint_handle = 0
static

Definition at line 421 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintHandle(), and resolveGtk().

◆ gtk_paint_hline

Ptr_gtk_paint_hline QGtkStylePrivate::gtk_paint_hline = 0
static

Definition at line 426 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintHline(), and resolveGtk().

◆ gtk_paint_option

Ptr_gtk_paint_option QGtkStylePrivate::gtk_paint_option = 0
static

Definition at line 414 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintOption(), and resolveGtk().

◆ gtk_paint_resize_grip

Ptr_gtk_paint_resize_grip QGtkStylePrivate::gtk_paint_resize_grip = 0
static

Definition at line 418 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintResizeGrip(), and resolveGtk().

◆ gtk_paint_shadow

Ptr_gtk_paint_shadow QGtkStylePrivate::gtk_paint_shadow = 0
static

Definition at line 417 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintShadow(), and resolveGtk().

◆ gtk_paint_slider

Ptr_gtk_paint_slider QGtkStylePrivate::gtk_paint_slider = 0
static

Definition at line 416 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintSlider(), and resolveGtk().

◆ gtk_paint_vline

Ptr_gtk_paint_vline QGtkStylePrivate::gtk_paint_vline = 0
static

Definition at line 425 of file qgtkstyle_p.h.

Referenced by QGtkPainter::paintVline(), and resolveGtk().

◆ gtk_progress_bar_new

Ptr_gtk_progress_bar_new QGtkStylePrivate::gtk_progress_bar_new = 0
static

Definition at line 396 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_progress_configure

Ptr_gtk_progress_configure QGtkStylePrivate::gtk_progress_configure = 0
static

Definition at line 399 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_radio_button_new

Ptr_gtk_radio_button_new QGtkStylePrivate::gtk_radio_button_new = 0
static

Definition at line 378 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_range_get_adjustment

Ptr_gtk_range_get_adjustment QGtkStylePrivate::gtk_range_get_adjustment = 0
static

Definition at line 400 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_range_set_adjustment

Ptr_gtk_range_set_adjustment QGtkStylePrivate::gtk_range_set_adjustment = 0
static

Definition at line 401 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_range_set_inverted

Ptr_gtk_range_set_inverted QGtkStylePrivate::gtk_range_set_inverted = 0
static

Definition at line 402 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_rc_get_style_by_paths

Ptr_gtk_rc_get_style_by_paths QGtkStylePrivate::gtk_rc_get_style_by_paths = 0
static

Definition at line 437 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_scrolled_window_new

Ptr_gtk_scrolled_window_new QGtkStylePrivate::gtk_scrolled_window_new = 0
static

Definition at line 389 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_separator_menu_item_new

Ptr_gtk_separator_menu_item_new QGtkStylePrivate::gtk_separator_menu_item_new = 0
static

Definition at line 429 of file qgtkstyle_p.h.

Referenced by initGtkMenu(), and resolveGtk().

◆ gtk_separator_tool_item_new

Ptr_gtk_separator_tool_item_new QGtkStylePrivate::gtk_separator_tool_item_new = 0
static

Definition at line 380 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_settings_get_default

Ptr_gtk_settings_get_default QGtkStylePrivate::gtk_settings_get_default = 0
static

Definition at line 428 of file qgtkstyle_p.h.

Referenced by getIconThemeName(), and resolveGtk().

◆ gtk_spin_button_new

Ptr_gtk_spin_button_new QGtkStylePrivate::gtk_spin_button_new = 0
static

Definition at line 379 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_statusbar_new

Ptr_gtk_statusbar_new QGtkStylePrivate::gtk_statusbar_new = 0
static

Definition at line 383 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_style_attach

Ptr_gtk_style_attach QGtkStylePrivate::gtk_style_attach = 0
static

Definition at line 361 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_tool_button_new

Ptr_gtk_tool_button_new QGtkStylePrivate::gtk_tool_button_new = 0
static

Definition at line 375 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_toolbar_insert

Ptr_gtk_toolbar_insert QGtkStylePrivate::gtk_toolbar_insert = 0
static

Definition at line 381 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_toolbar_new

Ptr_gtk_toolbar_new QGtkStylePrivate::gtk_toolbar_new = 0
static

Definition at line 391 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_tree_view_append_column

Ptr_gtk_tree_view_append_column QGtkStylePrivate::gtk_tree_view_append_column = 0
static

Definition at line 409 of file qgtkstyle_p.h.

Referenced by initGtkTreeview(), and resolveGtk().

◆ gtk_tree_view_column_new

Ptr_gtk_tree_view_column_new QGtkStylePrivate::gtk_tree_view_column_new = 0
static

Definition at line 408 of file qgtkstyle_p.h.

Referenced by initGtkTreeview(), and resolveGtk().

◆ gtk_tree_view_get_column

Ptr_gtk_tree_view_get_column QGtkStylePrivate::gtk_tree_view_get_column = 0
static

Definition at line 393 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_tree_view_new

Ptr_gtk_tree_view_new QGtkStylePrivate::gtk_tree_view_new = 0
static

Definition at line 392 of file qgtkstyle_p.h.

Referenced by initGtkTreeview(), and resolveGtk().

◆ gtk_vscale_new

Ptr_gtk_vscale_new QGtkStylePrivate::gtk_vscale_new = 0
static

Definition at line 386 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_vscrollbar_new

Ptr_gtk_vscrollbar_new QGtkStylePrivate::gtk_vscrollbar_new = 0
static

Definition at line 388 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_widget_destroy

Ptr_gtk_widget_destroy QGtkStylePrivate::gtk_widget_destroy = 0
static

◆ gtk_widget_get_type

Ptr_gtk_widget_get_type QGtkStylePrivate::gtk_widget_get_type = 0
static

Definition at line 436 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_widget_modify_bg

Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_bg = 0
static

Definition at line 367 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_widget_modify_fg

Ptr_gtk_widget_modify_color QGtkStylePrivate::gtk_widget_modify_fg = 0
static

Definition at line 366 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_widget_path

Ptr_gtk_widget_path QGtkStylePrivate::gtk_widget_path = 0
static

Definition at line 433 of file qgtkstyle_p.h.

Referenced by classPath(), and resolveGtk().

◆ gtk_widget_realize

Ptr_gtk_widget_realize QGtkStylePrivate::gtk_widget_realize = 0
static

◆ gtk_widget_set_default_direction

Ptr_gtk_widget_set_default_direction QGtkStylePrivate::gtk_widget_set_default_direction = 0
static

Definition at line 365 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ gtk_widget_set_direction

Ptr_gtk_widget_set_direction QGtkStylePrivate::gtk_widget_set_direction = 0
static

◆ gtk_widget_size_allocate

Ptr_gtk_widget_size_allocate QGtkStylePrivate::gtk_widget_size_allocate = 0
static

Definition at line 430 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_widget_size_request

Ptr_gtk_widget_size_request QGtkStylePrivate::gtk_widget_size_request = 0
static

Definition at line 431 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_widget_style_get

Ptr_gtk_widget_style_get QGtkStylePrivate::gtk_widget_style_get = 0
static

Definition at line 405 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_window_get_type

Ptr_gtk_window_get_type QGtkStylePrivate::gtk_window_get_type = 0
static

Definition at line 435 of file qgtkstyle_p.h.

Referenced by resolveGtk().

◆ gtk_window_new

Ptr_gtk_window_new QGtkStylePrivate::gtk_window_new = 0
static

Definition at line 362 of file qgtkstyle_p.h.

Referenced by initGtkWidgets(), and resolveGtk().

◆ instances

QList< QGtkStylePrivate * > QGtkStylePrivate::instances
staticprivate

◆ pango_font_description_get_family

Ptr_pango_font_description_get_family QGtkStylePrivate::pango_font_description_get_family = 0
static

Definition at line 443 of file qgtkstyle_p.h.

Referenced by getThemeFont(), and resolveGtk().

◆ pango_font_description_get_size

Ptr_pango_font_description_get_size QGtkStylePrivate::pango_font_description_get_size = 0
static

Definition at line 441 of file qgtkstyle_p.h.

Referenced by getSpinboxArrowSize(), getThemeFont(), and resolveGtk().

◆ pango_font_description_get_style

Ptr_pango_font_description_get_style QGtkStylePrivate::pango_font_description_get_style = 0
static

Definition at line 444 of file qgtkstyle_p.h.

Referenced by getThemeFont(), and resolveGtk().

◆ pango_font_description_get_weight

Ptr_pango_font_description_get_weight QGtkStylePrivate::pango_font_description_get_weight = 0
static

Definition at line 442 of file qgtkstyle_p.h.

Referenced by getThemeFont(), and resolveGtk().

◆ widgetMap

QGtkStylePrivate::WidgetMap * QGtkStylePrivate::widgetMap = 0
staticprivate

Definition at line 516 of file qgtkstyle_p.h.

Referenced by cleanupGtkWidgets(), and QGtkStyleFilter::eventFilter().


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