summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 1c5ced3..2bd7cbe 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -75,49 +75,48 @@
#include "resource.h"
#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
#include "qutfcodec.h"
#endif
#include "config.h"
#include "network.h"
#ifdef QWS
#include "fontmanager.h"
#include "fontdatabase.h"
#endif
#include "alarmserver.h"
#include "applnk.h"
#include "qpemenubar.h"
#include "textcodecinterface.h"
#include "imagecodecinterface.h"
#include <qtopia/qpeglobal.h>
#include <unistd.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#ifndef QT_NO_SOUND
#include <sys/soundcard.h>
#endif
-#include "qt_override_p.h"
#include <backend/rohfeedback.h>
static bool useBigPixmaps = 0;
class HackWidget : public QWidget
{
public:
bool needsOk()
{ return (getWState() & WState_Reserved1 ); }
QRect normalGeometry()
{ return topData()->normalGeometry; };
};
class QPEApplicationData
{
public:
QPEApplicationData ( ) :
presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ),
notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
keep_running( true ), qcopQok( false ),
fontFamily( "Vera" ), fontSize( 10 ), smallIconSize( 14 ),
@@ -1331,130 +1330,91 @@ void QPEApplication::setCurrentMode( int x, int y, int depth )
void QPEApplication::reset() {
// Reconnect to the screen
qt_screen->disconnect();
qt_screen->connect( QString::null );
// Redraw everything
applyStyle();
}
#if (QT_VERSION < 238) && defined Q_OS_MACX
bool qt_left_hand_scrollbars = false;
#else
extern bool qt_left_hand_scrollbars QPE_WEAK_SYMBOL;
#endif
/*!
\internal
*/
void QPEApplication::applyStyle()
{
Config config( "qpe" );
config.setGroup( "Appearance" );
#if QT_VERSION > 233
-#if !defined(OPIE_NO_OVERRIDE_QT)
- // don't block ourselves ...
- Opie::force_appearance = 0;
-
- static QString appname = Opie::binaryName ( );
-
- QStringList ex = config. readListEntry ( "NoStyle", ';' );
- int nostyle = 0;
- for ( QStringList::Iterator it = ex. begin ( ); it != ex. end ( ); ++it ) {
- if ( QRegExp (( *it ). mid ( 1 ), false, true ). find ( appname, 0 ) >= 0 ) {
- nostyle = ( *it ). left ( 1 ). toInt ( 0, 32 );
- break;
- }
- }
-#else
- int nostyle = 0;
-#endif
-
// Widget style
QString style = config.readEntry( "Style", "FlatStyle" );
- // don't set a custom style
- if ( nostyle & Opie::Force_Style )
- style = "FlatStyle";
-
internalSetStyle ( style );
// Colors - from /etc/colors/Liquid.scheme
QColor bgcolor( config.readEntry( "Background", "#E0E0E0" ) );
QColor btncolor( config.readEntry( "Button", "#96c8fa" ) );
QPalette pal( btncolor, bgcolor );
QString color = config.readEntry( "Highlight", "#73adef" );
pal.setColor( QColorGroup::Highlight, QColor( color ) );
color = config.readEntry( "HighlightedText", "#FFFFFF" );
pal.setColor( QColorGroup::HighlightedText, QColor( color ) );
color = config.readEntry( "Text", "#000000" );
pal.setColor( QColorGroup::Text, QColor( color ) );
color = config.readEntry( "ButtonText", "#000000" );
pal.setColor( QPalette::Active, QColorGroup::ButtonText, QColor( color ) );
color = config.readEntry( "Base", "#FFFFFF" );
pal.setColor( QColorGroup::Base, QColor( color ) );
pal.setColor( QPalette::Disabled, QColorGroup::Text,
pal.color( QPalette::Active, QColorGroup::Background ).dark() );
setPalette( pal, TRUE );
// Set the ScrollBar on the 'right' side but only if the weak symbol is present
if (&qt_left_hand_scrollbars )
qt_left_hand_scrollbars = config.readBoolEntry( "LeftHand", false );
// Window Decoration
QString dec = config.readEntry( "Decoration", "Flat" );
- // don't set a custom deco
- if ( nostyle & Opie::Force_Decoration )
- dec = "";
-
-
if ( dec != d->decorationName ) {
qwsSetDecoration( new QPEDecoration( dec ) );
d->decorationName = dec;
}
// Font
QString ff = config.readEntry( "FontFamily", font().family() );
int fs = config.readNumEntry( "FontSize", font().pointSize() );
- // don't set a custom font
- if ( nostyle & Opie::Force_Font ) {
- ff = "Vera";
- fs = 10;
- }
-
setFont ( QFont ( ff, fs ), true );
-
-#if !defined(OPIE_NO_OVERRIDE_QT)
- // revert to global blocking policy ...
- Opie::force_appearance = config. readBoolEntry ( "ForceStyle", false ) ? Opie::Force_All : Opie::Force_None;
- Opie::force_appearance &= ~nostyle;
-#endif
#endif
}
void QPEApplication::systemMessage( const QCString& msg, const QByteArray& data )
{
#ifdef Q_WS_QWS
QDataStream stream( data, IO_ReadOnly );
if ( msg == "applyStyle()" ) {
applyStyle();
}
else if ( msg == "toggleApplicationMenu()" ) {
QWidget *active = activeWindow ( );
if ( active ) {
QPEMenuToolFocusManager *man = QPEMenuToolFocusManager::manager ( );
bool oldactive = man-> isActive ( );
man-> setActive( !man-> isActive() );
if ( !oldactive && !man-> isActive ( )) { // no menubar to toggle -> try O-Menu
QCopEnvelope e ( "QPE/TaskBar", "toggleStartMenu()" );
}
}
}