Initial TDE conversion

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 6be98faf5b
commit 3ae9f9432e

@ -5,8 +5,8 @@ Release: %mkrel 2
License: GPL
Group: Graphical desktop/Other
URL: http://www.mandrivalinux.com/
BuildRequires: kdelibs-devel
BuildRequires: kdebase-devel >= 3.1.94-11mdk
BuildRequires: tdelibs-devel
BuildRequires: tdebase-devel >= 3.1.94-11mdk
Source0: %{name}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
@ -21,11 +21,11 @@ Group: Graphical desktop/KDE
%description kde
Mandriva theme for KDE - Widget design
%package kde-kwin
%package kde-twin
Summary: Mandriva theme for KDE - Window Decorations
Group: Graphical desktop/KDE
%description kde-kwin
%description kde-twin
Mandriva theme for KDE - Window Decorations
@ -36,10 +36,10 @@ Mandriva theme for KDE - Window Decorations
make -f admin/Makefile.common cvs
export QTDIR=%qtdir
export KDEDIR=%_prefix
export TDEDIR=%_prefix
export LD_LIBRARY_PATH=$QTDIR/%_lib:$KDEDIR/%_lib:$LD_LIBRARY_PATH
export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/%_lib:$TDEDIR/%_lib:$LD_LIBRARY_PATH
export PATH=$QTDIR/bin:$TDEDIR/bin:$PATH
%configure2_5x \
%if "%{_lib}" != "lib"
@ -57,13 +57,13 @@ rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files kde-kwin
%files kde-twin
%defattr(-,root,root,-)
%_libdir/kde3/kwin3_iaora.la
%_libdir/kde3/kwin3_iaora.so
%_libdir/kde3/kwin_iaora_config.la
%_libdir/kde3/kwin_iaora_config.so
%_datadir/apps/kwin/iaora.desktop
%_libdir/kde3/twin3_iaora.la
%_libdir/kde3/twin3_iaora.so
%_libdir/kde3/twin_iaora_config.la
%_libdir/kde3/twin_iaora_config.so
%_datadir/apps/twin/iaora.desktop

@ -1 +1 @@
SUBDIRS=widget kwin
SUBDIRS=widget twin

@ -1,19 +0,0 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = config
KDE_CXXFLAGS = -DQT_PLUGIN
INCLUDES = -I$(srcdir)/../../lib $(all_includes)
kwindir = $(kde_datadir)/kwin/
kwin_DATA = iaora.desktop
kde_module_LTLIBRARIES = kwin3_iaora.la
kwin3_iaora_la_SOURCES = iaora.cpp iaoraclient.cpp iaorabutton.cpp misc.cpp
kwin3_iaora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
kwin3_iaora_la_LIBADD = $(LIB_KDEUI) -lkdecorations $(LIB_QT) $(LIB_KDECORE) -lkdefx
kwin3_iaora_la_METASOURCES = AUTO
DISTCLEANFILES = $(kwin3_iaora_la_METASOURCES)

@ -1,14 +0,0 @@
INCLUDES = $(all_includes)
kde_module_LTLIBRARIES = kwin_iaora_config.la
kwin_iaora_config_la_SOURCES = config.cpp configdialog.ui
kwin_iaora_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
kwin_iaora_config_la_LIBADD = $(LIB_KDEUI) $(LIB_QT) $(LIB_KDECORE)
METASOURCES = AUTO
noinst_HEADERS = config.h
DISTCLEANFILES = $(METASOURCES)
lnkdir = $(kde_datadir)/kwin

@ -0,0 +1,19 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = config
KDE_CXXFLAGS = -DQT_PLUGIN
INCLUDES = -I$(srcdir)/../../lib $(all_includes)
twindir = $(kde_datadir)/twin/
twin_DATA = iaora.desktop
kde_module_LTLIBRARIES = twin3_iaora.la
twin3_iaora_la_SOURCES = iaora.cpp iaoraclient.cpp iaorabutton.cpp misc.cpp
twin3_iaora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
twin3_iaora_la_LIBADD = $(LIB_TDEUI) -ltdecorations $(LIB_QT) $(LIB_TDECORE) -ltdefx
twin3_iaora_la_METASOURCES = AUTO
DISTCLEANFILES = $(twin3_iaora_la_METASOURCES)

@ -0,0 +1,14 @@
INCLUDES = $(all_includes)
kde_module_LTLIBRARIES = twin_iaora_config.la
twin_iaora_config_la_SOURCES = config.cpp configdialog.ui
twin_iaora_config_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
twin_iaora_config_la_LIBADD = $(LIB_TDEUI) $(LIB_QT) $(LIB_TDECORE)
METASOURCES = AUTO
noinst_HEADERS = config.h
DISTCLEANFILES = $(METASOURCES)
lnkdir = $(kde_datadir)/twin

@ -29,19 +29,19 @@
#include <tqspinbox.h>
#include <tqwhatsthis.h>
#include <kconfig.h>
#include <klocale.h>
#include <kglobal.h>
#include <tdeconfig.h>
#include <tdelocale.h>
#include <tdeglobal.h>
#include "config.h"
#include "configdialog.h"
IaOraConfig::IaOraConfig(KConfig* config, TQWidget* parent)
IaOraConfig::IaOraConfig(TDEConfig* config, TQWidget* parent)
: TQObject(parent), m_config(0), m_dialog(0)
{
// create the configuration object
m_config = new KConfig("kwiniaorarc");
KGlobal::locale()->insertCatalogue("kwin_clients");
m_config = new TDEConfig("twiniaorarc");
TDEGlobal::locale()->insertCatalogue("twin_clients");
// create and show the configuration dialog
m_dialog = new ConfigDialog(parent);
@ -63,7 +63,7 @@ IaOraConfig::~IaOraConfig()
delete m_config;
}
void IaOraConfig::load(KConfig*)
void IaOraConfig::load(TDEConfig*)
{
m_config->setGroup("General");
@ -73,7 +73,7 @@ void IaOraConfig::load(KConfig*)
m_dialog->titleShadow->setChecked(titleShadow);
}
void IaOraConfig::save(KConfig*)
void IaOraConfig::save(TDEConfig*)
{
m_config->setGroup("General");
@ -94,7 +94,7 @@ void IaOraConfig::defaults()
extern "C"
{
KDE_EXPORT TQObject* allocate_config(KConfig* config, TQWidget* parent) {
KDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) {
return (new IaOraConfig(config, parent));
}
}

@ -29,26 +29,26 @@
class TQButtonGroup;
class TQGroupBox;
class KConfig;
class TDEConfig;
class ConfigDialog;
class IaOraConfig : public TQObject
{
Q_OBJECT
public:
IaOraConfig(KConfig* config, TQWidget* parent);
IaOraConfig(TDEConfig* config, TQWidget* parent);
~IaOraConfig();
signals:
void changed();
public slots:
void load(KConfig *config);
void save(KConfig *config);
void load(TDEConfig *config);
void save(TDEConfig *config);
void defaults();
private:
KConfig *m_config;
TDEConfig *m_config;
ConfigDialog *m_dialog;
};

@ -26,7 +26,7 @@
#include <tqpainter.h>
#include <tqimage.h>
#include <tqapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
@ -140,7 +140,7 @@ bool IaOraHandler::supports( Ability ability )
void IaOraHandler::readConfig()
{
// create a config object
KConfig config("kwiniaorarc");
TDEConfig config("twiniaorarc");
config.setGroup("General");
// grab settings

@ -2,4 +2,4 @@
Encoding=UTF-8
Icon=
Name=Ia ora
X-KDE-Library=kwin3_iaora
X-TDE-Library=twin3_iaora

@ -22,7 +22,7 @@
Boston, MA 02110-1301, USA.
*/
#include <klocale.h>
#include <tdelocale.h>
#include <tqbitmap.h>
#include <tqdatetime.h>

@ -6,7 +6,7 @@ INCLUDES = $(all_includes)
noinst_HEADERS = ia_ora.h bitmaps.h
kde_style_LTLIBRARIES = ia_ora.la
ia_ora_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
ia_ora_la_LIBADD = -lkdefx $(LIB_KDECORE) $(LIB_QT)
ia_ora_la_LIBADD = -ltdefx $(LIB_TDECORE) $(LIB_QT)
ia_ora_la_SOURCES = ia_ora.cpp
ia_ora_la_METASOURCES = AUTO

@ -96,7 +96,7 @@ static const int itemHMargin = 3;
static const int itemVMargin = 0;
static const int arrowHMargin = 6;
static const int rightBorder = 12;
static const char* kdeToolbarWidget = "kde toolbar widget";
static const char* kdeToolbarWidget = "tde toolbar widget";
const int smallButMaxW = 27;
const int smallButMaxH = 20;
@ -108,7 +108,7 @@ MandrivaStyle::MandrivaColorData::~MandrivaColorData()
// ---------------------------------------------------------------------------
MandrivaStyle::MandrivaStyle( )
: KStyle( AllowMenuTransparency | FilledFrameWorkaround, WindowsStyleScrollBar )
: TDEStyle( AllowMenuTransparency | FilledFrameWorkaround, WindowsStyleScrollBar )
, m_dataCache (), formMode( false ),kickerMode(false)
{
hoverWidget = 0L;
@ -381,7 +381,7 @@ void MandrivaStyle::polish(TQWidget* widget)
widget->installEventFilter(this);
widget->setBackgroundMode( TQWidget::PaletteBackground );
}
else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
else if ( widget->inherits( "TDEToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
{
widget->setBackgroundMode( TQWidget::PaletteBackground );
}
@ -391,7 +391,7 @@ void MandrivaStyle::polish(TQWidget* widget)
}
else if ( widget->parentWidget() &&
( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) )
|| widget->inherits( "KCompletionBox" ) ) )
|| widget->inherits( "TDECompletionBox" ) ) )
{
TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
@ -403,7 +403,7 @@ void MandrivaStyle::polish(TQWidget* widget)
widget->setBackgroundMode( NoBackground ); // We paint the whole background.
widget->installEventFilter(this);
}
KStyle::polish( widget );
TDEStyle::polish( widget );
}
@ -436,7 +436,7 @@ void MandrivaStyle::unPolish(TQWidget* widget)
}
else if ( widget->parentWidget() &&
( ( widget->inherits( "TQListBox" ) && widget->parentWidget()->inherits( "TQComboBox" ) )
|| widget->inherits( "KCompletionBox" ) ) )
|| widget->inherits( "TDECompletionBox" ) ) )
{
TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
@ -445,7 +445,7 @@ void MandrivaStyle::unPolish(TQWidget* widget)
widget->clearMask();
}
//For toolbar internal separators, return to button, too (can't use tqt_cast here since don't have access to the class)
else if ( widget->inherits( "KToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
else if ( widget->inherits( "TDEToolBarSeparator" ) || widget->inherits( "TQToolBarSeparator" ) )
{
widget->setBackgroundMode( TQWidget::PaletteBackground );
}
@ -455,7 +455,7 @@ void MandrivaStyle::unPolish(TQWidget* widget)
widget->removeEventFilter(this);
}
KStyle::unPolish( widget );
TDEStyle::unPolish( widget );
}
/* reimp. */
@ -798,7 +798,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
p->setPen(oldPen);
}
else
KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt);
break;
}
case PE_GroupBoxFrame:
@ -1371,7 +1371,7 @@ void MandrivaStyle::drawPrimitive( PrimitiveElement pe,
drawMandrivaArrow( a, p, r, cg, flags, opt );
}
else
KStyle::drawPrimitive( pe, p, r, cg, flags, opt );
TDEStyle::drawPrimitive( pe, p, r, cg, flags, opt );
}
} //switch
}
@ -1389,7 +1389,7 @@ void MandrivaStyle::drawMandrivaArrow( TQPointArray a, TQPainter *p,
p->setPen( oldPen ); // restore pen
}
void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
void MandrivaStyle::drawTDEStylePrimitive( TDEStylePrimitive pe,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@ -1514,7 +1514,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
}
break;
}
// copied and slightly modified from KStyle.
// copied and slightly modified from TDEStyle.
case KPE_ListViewBranch:
{
// Typical Windows style listview branch element (dotted line).
@ -1589,7 +1589,7 @@ void MandrivaStyle::drawKStylePrimitive( KStylePrimitive pe,
break;
}
default:
KStyle::drawKStylePrimitive( pe, p, widget, r, cg, flags, opt);
TDEStyle::drawTDEStylePrimitive( pe, p, widget, r, cg, flags, opt);
}
}
@ -1795,7 +1795,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
case CE_ToolButtonLabel:
{
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
TDEStyle::drawControl(element, p, widget, r, cg, flags, opt);
break;
}
@ -2307,7 +2307,7 @@ void MandrivaStyle::drawControl( ControlElement element,
}
break;
default:
KStyle::drawControl(element, p, widget, r, cg, flags, opt);
TDEStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
@ -2326,7 +2326,7 @@ void MandrivaStyle::drawControlMask( ControlElement element,
break;
}
default:
KStyle::drawControlMask(element, p, widget, r, opt);
TDEStyle::drawControlMask(element, p, widget, r, opt);
}
}
@ -2683,7 +2683,7 @@ void MandrivaStyle::drawComplexControl( ComplexControl control,
break;
}
default:
KStyle::drawComplexControl(control, p, widget,
TDEStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls, active, opt);
}
}
@ -2702,7 +2702,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
case SC_SpinWidgetButtonField:
return TQRect( widget->width() -14 , 0, 14, widget->height() );
default:
return KStyle::querySubControlMetrics( control, widget, subcontrol, opt );
return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt );
}
}
//TODO verify it.
@ -2729,7 +2729,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
return TQRect( 5, 1, widget->width() - arrow-12, widget->height() - 2);
}
default:
return KStyle::querySubControlMetrics( control, widget, subcontrol, opt );
return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt );
}
break;
}
@ -2768,7 +2768,7 @@ TQRect MandrivaStyle::querySubControlMetrics( ComplexControl control,
default:
break;
}
return KStyle::querySubControlMetrics( control, widget, subcontrol, opt );
return TDEStyle::querySubControlMetrics( control, widget, subcontrol, opt );
}
void MandrivaStyle::drawComplexControlMask( ComplexControl control,
@ -2796,10 +2796,10 @@ void MandrivaStyle::drawComplexControlMask( ComplexControl control,
}
default:
KStyle::drawComplexControlMask(control, p, widget, r, opt);
TDEStyle::drawComplexControlMask(control, p, widget, r, opt);
}
//#endif
//KStyle::drawComplexControlMask(control, p, widget, r, opt);
//TDEStyle::drawComplexControlMask(control, p, widget, r, opt);
}
@ -2841,7 +2841,7 @@ int MandrivaStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
case PM_TabBarTabShiftVertical:
return 0;
default:
return KStyle::pixelMetric(m, widget);
return TDEStyle::pixelMetric(m, widget);
}
}
@ -2876,7 +2876,7 @@ TQSize MandrivaStyle::sizeFromContents( ContentsType contents,
}
else
{
return KStyle::sizeFromContents( contents, widget, contentSize, opt );
return TDEStyle::sizeFromContents( contents, widget, contentSize, opt );
}
}
case CT_ComboBox:
@ -2981,7 +2981,7 @@ TQSize MandrivaStyle::sizeFromContents( ContentsType contents,
}
default:
return KStyle::sizeFromContents( contents, widget, contentSize, opt );
return TDEStyle::sizeFromContents( contents, widget, contentSize, opt );
}
}
@ -2991,12 +2991,12 @@ TQPixmap MandrivaStyle::stylePixmap(StylePixmap stylepixmap,
const TQWidget* widget,
const TQStyleOption& opt) const
{
return KStyle::stylePixmap(stylepixmap, widget, opt);
return TDEStyle::stylePixmap(stylepixmap, widget, opt);
}
bool MandrivaStyle::eventFilter( TQObject *object, TQEvent *event )
{
if (KStyle::eventFilter( object, event ))
if (TDEStyle::eventFilter( object, event ))
return true;
TQToolBar* toolbar;
//Hover highlight on buttons and combos
@ -3043,7 +3043,7 @@ bool MandrivaStyle::eventFilter( TQObject *object, TQEvent *event )
else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) )
{
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name.
// that have specified a "tde toolbar widget" name.
if (event->type() == TQEvent::Paint )
{
@ -3356,7 +3356,7 @@ TQRect MandrivaStyle::subRect(SubRect r, const TQWidget *widget) const
return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField );
}
default:
return KStyle::subRect( r, widget );
return TDEStyle::subRect( r, widget );
}
}
@ -3403,7 +3403,7 @@ bool MandrivaStyle::excludeColor(const TQColor &col, bool active) const
bool MandrivaStyle::isFormWidget(const TQWidget* widget) const
{
//Form widgets are in the KHTMLView, but that has 2 further inner levels
//Form widgets are in the TDEHTMLView, but that has 2 further inner levels
//of widgets - TQClipperWidget, and outside of that, TQViewportWidget
TQWidget* potentialClipPort = widget->parentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
@ -3416,7 +3416,7 @@ bool MandrivaStyle::isFormWidget(const TQWidget* widget) const
TQWidget* potentialKHTML = potentialViewPort->parentWidget();
if (!potentialKHTML || potentialKHTML->isTopLevel() ||
qstrcmp(potentialKHTML->className(), "KHTMLView") )
qstrcmp(potentialKHTML->className(), "TDEHTMLView") )
return false;

@ -37,13 +37,13 @@
#include <tqintdict.h>
#include <kdrawutil.h>
#include <kpixmap.h>
#include <kstyle.h>
#include <tdestyle.h>
#include <tqintcache.h>
class TQPopupMenu;
class MandrivaStyle : public KStyle
class MandrivaStyle : public TDEStyle
{
Q_OBJECT
@ -57,7 +57,7 @@ public:
void renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg,
const TQPopupMenu* popup ) const;
void drawKStylePrimitive( KStylePrimitive kpe,
void drawTDEStylePrimitive( TDEStylePrimitive kpe,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,

Loading…
Cancel
Save