Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3457 → Rev 3458

/branches/Version13x/Scribus/scribus/sccombobox.cpp
0,0 → 1,42
/*
* sccombobox.h
* ScribusCVS
*
* Created by Andreas Vox on 01.10.05.
* Copyright 2005 under GPL2. All rights reserved.
*
*/
 
#include <qlistbox.h>
#include "sccombobox.h"
 
#ifdef QT_MAC
 
#include <qmacstyle_mac.h>
 
/// use listbox instead of popupmenu for combo boxes
class ScMacStyle : public QMacStyle {
virtual int ScMacStyle::styleHint(StyleHint sh, const QWidget * w,
const QStyleOption & so,
QStyleHintReturn * r) const
{
return sh != QStyle::SH_ComboBox_Popup && QMacStyle::styleHint(sh, w, so, r);
}
};
#endif
 
ScComboBox::ScComboBox( QWidget* parent, const char* name ) : QComboBox(false, parent, name)
{
#ifdef QT_MAC
setStyle( new ScMacStyle );
#endif
setListBox( new QListBox( this, "in-combo", WType_Popup ) );
}
 
ScComboBox::ScComboBox( bool rw, QWidget* parent, const char* name ) :QComboBox(rw, parent, name)
{
#ifdef QT_MAC
setStyle( new ScMacStyle );
#endif
setListBox( new QListBox( this, "in-combo", WType_Popup ) );
}
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: branches/Version13x/Scribus/scribus/sccombobox.h
===================================================================
--- branches/Version13x/Scribus/scribus/sccombobox.h (nonexistent)
+++ branches/Version13x/Scribus/scribus/sccombobox.h (revision 3458)
@@ -0,0 +1,23 @@
+/*
+ * sccombobox.h
+ * ScribusCVS
+ *
+ * Created by Andreas Vox on 01.10.05.
+ * Copyright 2005 under GPL2. All rights reserved.
+ *
+ */
+#include <qcombobox.h>
+
+
+/*!
+ \class ScComboBox sccombobox.h
+ \brief The ScComboBox widget always uses a listbox instead of a popup,
+ independent of any QStyle.
+*/
+class ScComboBox : public QComboBox {
+
+public:
+ ScComboBox( QWidget* parent=0, const char* name=0 );
+ ScComboBox( bool rw, QWidget* parent=0, const char* name=0 );
+};
+
/branches/Version13x/Scribus/scribus/sccombobox.h
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property