Rename a number of classes to enhance compatibility with KDE4

master
Timothy Pearson 11 years ago
parent dd1c3a7275
commit b3fda942e3

@ -29,8 +29,8 @@ using namespace std;
namespace adept {
AcqStatus::Item::Item (KListView *parent, pkgAcquire::ItemDesc &item, bool hit)
: KListViewItem( parent )
AcqStatus::Item::Item (TDEListView *parent, pkgAcquire::ItemDesc &item, bool hit)
: TDEListViewItem( parent )
{
m_pbcol = 0;
m_prog = new ItemProgress( 0, 0 );
@ -95,7 +95,7 @@ void AcqStatus::Item::paintCell (TQPainter *p, const TQColorGroup &cg,
TQPixmap pm( width, height() );
TQPainter _p( &pm );
_cg.setColor( TQColorGroup::Text, c );
KListViewItem::paintCell( &_p, _cg, column, width, alignment );
TDEListViewItem::paintCell( &_p, _cg, column, width, alignment );
p->drawPixmap( 0, 0, pm );
}
}
@ -110,7 +110,7 @@ AcqStatus::Item *AcqStatus::findItem (pkgAcquire::ItemDesc &Itm)
}
AcqStatus::AcqStatus(TQWidget *parent, const char *name)
: KListView (parent, name), m_idOffset( 0 ), m_continue( true )
: TDEListView (parent, name), m_idOffset( 0 ), m_continue( true )
{
// m_lastItem = 0;
addColumn( i18n( "Progress" ) );
@ -135,7 +135,7 @@ void AcqStatus::Done (pkgAcquire::ItemDesc &Itm)
void AcqStatus::clear()
{
KListView::clear();
TDEListView::clear();
m_idOffset += m_items.size();
m_items.clear(); // got deleted by klistview already
}

@ -23,7 +23,7 @@ class TQGridLayout;
namespace adept {
class AcqStatus : public KListView, public aptFront::ProgressCallback
class AcqStatus : public TDEListView, public aptFront::ProgressCallback
{
Q_OBJECT
@ -54,7 +54,7 @@ protected:
std::string m_status;
int m_spin;
};
class Item : public KListViewItem {
class Item : public TDEListViewItem {
protected:
ItemProgress *m_prog;
int m_pbcol;
@ -62,7 +62,7 @@ protected:
pkgAcquire::ItemDesc m_item;
public:
Item (KListView *parent, pkgAcquire::ItemDesc &item,
Item (TDEListView *parent, pkgAcquire::ItemDesc &item,
bool hit = false);
virtual ~Item ();
@ -75,7 +75,7 @@ protected:
void setStatus( const std::string &, int = 0 );
void setup() {
KListViewItem::setup();
TDEListViewItem::setup();
setHeight( height() + 6 );
}
};

@ -12,7 +12,7 @@
#include <kprocess.h>
#include <kdialogbase.h>
class KListBox;
class TDEListBox;
namespace KParts {
class Part;
}

@ -12,7 +12,7 @@
using namespace adept;
ExtendableList::ExtendableList( TQWidget *p, const char *n )
: KListView( p, n ),
: TDEListView( p, n ),
m_toggleColumn( 0 ), m_inDtor( false ),
m_extenderUpdateScheduled( false ),
m_needSort( false ),
@ -49,10 +49,10 @@ void ExtendableList::keyPressEvent( TQKeyEvent *e ) {
return item->showExtender();
}
}
KListView::keyPressEvent( e );
TDEListView::keyPressEvent( e );
if ( e->key() == TQt::Key_Left || e->key() == TQt::Key_Right )
item->updateIcon();
} else return KListView::keyPressEvent( e );
} else return TDEListView::keyPressEvent( e );
}
void ExtendableList::openToplevel() {
@ -129,25 +129,25 @@ void ExtendableList::delayedUpdateExtenders()
void ExtendableList::clear()
{
kdDebug() << "ExtendableList::clear()" << endl;
KListView::clear();
TDEListView::clear();
kdDebug() << "end of ExtendableList::clear()" << endl;
}
void ExtendableList::show()
{
KListView::show();
TDEListView::show();
updateExtenders();
}
void ExtendableList::showEvent( TQShowEvent *e )
{
KListView::showEvent( e );
TDEListView::showEvent( e );
updateExtenders();
}
void ExtendableList::resizeEvent( TQResizeEvent *e )
{
KListView::resizeEvent( e );
TDEListView::resizeEvent( e );
updateExtenders();
// delayedUpdateExtenders();
}
@ -298,7 +298,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{
TQPixmap pm( width, height() );
TQPainter _p( &pm );
KListViewItem::paintCell( &_p, cg, column, width, alignment );
TDEListViewItem::paintCell( &_p, cg, column, width, alignment );
p->drawPixmap( 0, 0, pm );
} */

@ -17,7 +17,7 @@ class ExtendableItem;
class ExtendableList;
class ItemExtender;
class ExtendableList : public KListView {
class ExtendableList : public TDEListView {
Q_OBJECT
public:
@ -65,27 +65,27 @@ protected:
bool m_extenderHighlight:1;
};
class ExtendableItem : public KListViewItem {
class ExtendableItem : public TDEListViewItem {
public:
ExtendableItem( ExtendableList *l )
: KListViewItem( l ), m_extender( 0 ) {
: TDEListViewItem( l ), m_extender( 0 ) {
}
ExtendableItem( ExtendableList *l, ExtendableItem *prev )
: KListViewItem( l, prev ), m_extender( 0 ) {
: TDEListViewItem( l, prev ), m_extender( 0 ) {
}
ExtendableItem( ExtendableItem *p, ExtendableItem *prev )
: KListViewItem( p, prev ), m_extender( 0 ) {
: TDEListViewItem( p, prev ), m_extender( 0 ) {
}
ExtendableItem( ExtendableItem *p )
: KListViewItem( p ), m_extender( 0 ) {
: TDEListViewItem( p ), m_extender( 0 ) {
}
virtual void setup() {
KListViewItem::setup();
TDEListViewItem::setup();
updateIcon();
}
void toggleExtender();
@ -117,7 +117,7 @@ public:
virtual int compare( TQListViewItem *other, int col, bool ascending ) const;
virtual ~ExtendableItem();
virtual void setHeight( int h ) { KListViewItem::setHeight( h ); }
virtual void setHeight( int h ) { TDEListViewItem::setHeight( h ); }
protected:
ItemExtender *m_extender;
};

@ -93,7 +93,7 @@ void FilterList::drawContents( TQPainter *p, int a, int b, int c, int d ) {
m_itemsSeen = childCount();
updateHeight();
} // hmm, doesn't work... bah :p
KListView::drawContents( p, a, b, c, d );
TDEListView::drawContents( p, a, b, c, d );
}
void FilterList::plugLister( Lister *l ) {

@ -74,7 +74,7 @@ class FilterList : public ExtendableList
public:
friend class FilterItem;
typedef predicate::Predicate< entity::Entity > Predicate;
// typedef std::map< KListViewItem *, Predicate > Map;
// typedef std::map< TDEListViewItem *, Predicate > Map;
FilterList( TQWidget *parent = 0, const char *name = 0 );
typedef predicate::And< entity::Entity > And;
void appendPredicate( Predicate p );

@ -476,7 +476,7 @@ void ListerItem::paintCell ( TQPainter *p, const TQColorGroup &cg,
alignment &= ~AlignVertical_Mask;
alignment |= AlignTop;
}
KListViewItem::paintCell( &_p, _cg, column, width, alignment );
TDEListViewItem::paintCell( &_p, _cg, column, width, alignment );
p->drawPixmap( 0, 0, pm );
}
@ -487,7 +487,7 @@ void Lister::contextMenu( TQListViewItem *it, const TQPoint &pt, int /*c*/ )
m_context = dynamic_cast< ListerItem * >( it );
VectorRange sel = selection();
// entity::Package p = (dynamic_cast<ListerItem *>(it)->entity());
KPopupMenu *m = new KPopupMenu (this);
TDEPopupMenu *m = new TDEPopupMenu (this);
utils::Range< Actor > r = actor::Global< entity::Package >::list();
int id = 8;
try {

@ -32,7 +32,7 @@ PackageDetails::PackageDetails( TQWidget *w, const char *n )
m_fileListRunning( false )
{
m_toolbar->setIconSize( 22 );
m_toolbar->setIconText( KToolBar::IconTextRight );
m_toolbar->setIconText( TDEToolBar::IconTextRight );
m_toolbar->insertButton( u8( "back" ), BBack, false, i18n( "Back" ) );
m_toolbar->insertButton( u8( "forward" ), BForward, false, i18n( "Forward" ) );

@ -13,7 +13,7 @@
#ifndef EPT_PACKGEDETAILS_H
#define EPT_PACKGEDETAILS_H
class KToolBarButton;
class TDEToolBarButton;
class TQThread;
namespace adept {

@ -25,7 +25,7 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="KToolBar">
<widget class="TDEToolBar">
<property name="name">
<cstring>m_toolbar</cstring>
</property>
@ -458,7 +458,7 @@
<pixmap>image0</pixmap>
</customwidget>
<customwidget>
<class>KToolBar</class>
<class>TDEToolBar</class>
<header location="global">ktoolbar.h</header>
<sizehint>
<width>-1</width>

@ -50,7 +50,7 @@ void SourcesEditor::newAdd()
void SourcesEditor::contextMenu( TQListViewItem *, const TQPoint &pt ) {
EntryItem *s = dynamic_cast< EntryItem * >( m_list->selectedItem() );
if (!s) return;
KPopupMenu *m = new KPopupMenu (this);
TDEPopupMenu *m = new TDEPopupMenu (this);
m->insertItem( s->entry().enabled() ? i18n( "Disable" ) : i18n( "Enable" ), 0 );
m->insertItem( i18n( "Clone" ), 1 );
m->insertItem( i18n( "Remove" ), 2 );
@ -146,7 +146,7 @@ void EntryItem::setText( int c, const TQString &_s )
if (c == 2) e.setDistribution( s );
if (c == 3) e.setComponents( s );
setEntry( e );
KListViewItem::setText( c, _s ); // stop qlistview from looping infinitely
TDEListViewItem::setText( c, _s ); // stop qlistview from looping infinitely
}
void EntryItem::paintCell (TQPainter *p, const TQColorGroup &cg,
@ -159,7 +159,7 @@ void EntryItem::paintCell (TQPainter *p, const TQColorGroup &cg,
if (!entry().enabled())
c = TQt::gray;
_cg.setColor( TQColorGroup::Text, c );
KListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
TDEListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
p->drawPixmap( 0, 0, pm );
}

@ -32,7 +32,7 @@ protected:
std::string m_filename;
};
class EntryItem : public KListViewItem {
class EntryItem : public TDEListViewItem {
public:
Sources::Entry entry() const {
return m_entry;
@ -40,12 +40,12 @@ public:
void setEntry( const Sources::Entry &e ) {
m_entry = e;
}
EntryItem( Sources::Entry e, KListView *v, EntryItem *prev )
: KListViewItem( v, prev ), m_entry( e ) {
EntryItem( Sources::Entry e, TDEListView *v, EntryItem *prev )
: TDEListViewItem( v, prev ), m_entry( e ) {
init();
}
EntryItem( Sources::Entry e, KListView *v )
: KListViewItem( v ), m_entry( e ) {
EntryItem( Sources::Entry e, TDEListView *v )
: TDEListViewItem( v ), m_entry( e ) {
init();
}
void init() {

@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KListView">
<widget class="TDEListView">
<column>
<property name="text">
<string>Type</string>

@ -11,7 +11,7 @@
using namespace adept;
FacetItem::FacetItem( TagChooser *t )
: KListViewItem( t )
: TDEListViewItem( t )
{
}
@ -25,12 +25,12 @@ void FacetItem::removeTag( TagItem::Tag t ) {
}
TagItem::TagItem( FacetItem *p )
: KListViewItem( p ), m_toplevel( false )
: TDEListViewItem( p ), m_toplevel( false )
{
}
TagItem::TagItem( TagChooser *l )
: KListViewItem( l ), m_toplevel( true )
: TDEListViewItem( l ), m_toplevel( true )
{
}
@ -41,7 +41,7 @@ TQString TagItem::text( int c ) const
}
TagChooser::TagChooser( TQWidget *p, const char *n )
: KListView( p, n )
: TDEListView( p, n )
{
observeComponent< cache::component::PackageTags >();
// addColumn( " ", 20 );

@ -22,7 +22,7 @@ class FacetItem;
class FacetExtender;
class TagChooser;
class TagItem : public KListViewItem {
class TagItem : public TDEListViewItem {
public:
typedef ept::debtags::Tag Tag;
virtual TQString text( int ) const;
@ -35,7 +35,7 @@ protected:
Tag m_tag;
};
class FacetItem : public KListViewItem
class FacetItem : public TDEListViewItem
{
public:
typedef ept::debtags::Facet Facet;
@ -47,7 +47,7 @@ protected:
Facet m_facet;
};
class TagChooser : public KListView, public cache::Observer // ExtendableList
class TagChooser : public TDEListView, public cache::Observer // ExtendableList
{
Q_OBJECT

@ -18,7 +18,7 @@
class TQVBox;
class TQWidgetStack;
class TQSplitter;
class KAction;
class TDEAction;
class KPushButton;
namespace adept {
class AcqProgressWidget;
@ -27,7 +27,7 @@ class AcqProgressWidget;
using namespace aptFront;
using namespace adept;
class App : public KMainWindow, Application {
class App : public TDEMainWindow, Application {
Q_OBJECT
public:

@ -272,7 +272,7 @@ void App::setupActions()
KStdAction::quit( TQT_TQOBJECT(kapp), TQT_SLOT( quit() ), actionCollection() );
m_undo = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT( undo() ), actionCollection() );
m_redo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT( redo() ), actionCollection() );
m_previewAction = new KToggleAction(
m_previewAction = new TDEToggleAction(
i18n( "Review Changes" ), u8( "adept_preview" ),
0, TQT_TQOBJECT(this), TQT_SLOT( togglePreview() ), actionCollection(),
"review" );

@ -17,7 +17,7 @@
class TQVBox;
class TQWidgetStack;
class TQSplitter;
class KAction;
class TDEAction;
class KPushButton;
class TDEProcess;
namespace adept {
@ -35,7 +35,7 @@ struct IconPolicy : GroupedDesktopSelector::IconPolicy {
virtual TQString iconForGroup( TQString );
};
class App : public KMainWindow, Application {
class App : public TDEMainWindow, Application {
Q_OBJECT
public:
@ -97,10 +97,10 @@ protected:
adept::Browser *m_preview;
// other stuff
std::vector<KAction *> m_actions;
std::vector<TDEAction *> m_actions;
TQMap< TQString, TQString > m_icons;
KAction *m_undo, *m_redo;
KToggleAction *m_previewAction;
TDEAction *m_undo, *m_redo;
TDEToggleAction *m_previewAction;
State m_state, m_lastState;
typedef std::list< component::State::Request > RequestList;

@ -29,8 +29,8 @@ using namespace std;
namespace adept {
AcqStatus::Item::Item (KListView *parent, pkgAcquire::ItemDesc &item, bool hit)
: KListViewItem( parent )
AcqStatus::Item::Item (TDEListView *parent, pkgAcquire::ItemDesc &item, bool hit)
: TDEListViewItem( parent )
{
m_pbcol = 0;
m_prog = new ItemProgress( 0, 0 );
@ -95,7 +95,7 @@ void AcqStatus::Item::paintCell (TQPainter *p, const TQColorGroup &cg,
TQPixmap pm( width, height() );
TQPainter _p( &pm );
_cg.setColor( TQColorGroup::Text, c );
KListViewItem::paintCell( &_p, _cg, column, width, alignment );
TDEListViewItem::paintCell( &_p, _cg, column, width, alignment );
p->drawPixmap( 0, 0, pm );
}
}
@ -110,7 +110,7 @@ AcqStatus::Item *AcqStatus::findItem (pkgAcquire::ItemDesc &Itm)
}
AcqStatus::AcqStatus(TQWidget *parent, const char *name)
: KListView (parent, name), m_idOffset( 0 ), m_continue( true )
: TDEListView (parent, name), m_idOffset( 0 ), m_continue( true )
{
// m_lastItem = 0;
addColumn( i18n( "Progress" ) );
@ -135,7 +135,7 @@ void AcqStatus::Done (pkgAcquire::ItemDesc &Itm)
void AcqStatus::clear()
{
KListView::clear();
TDEListView::clear();
m_idOffset += m_items.size();
m_items.clear(); // got deleted by klistview already
}

@ -23,7 +23,7 @@ class TQGridLayout;
namespace adept {
class AcqStatus : public KListView, public aptFront::ProgressCallback
class AcqStatus : public TDEListView, public aptFront::ProgressCallback
{
Q_OBJECT
@ -54,7 +54,7 @@ protected:
std::string m_status;
int m_spin;
};
class Item : public KListViewItem {
class Item : public TDEListViewItem {
protected:
ItemProgress *m_prog;
int m_pbcol;
@ -62,7 +62,7 @@ protected:
pkgAcquire::ItemDesc m_item;
public:
Item (KListView *parent, pkgAcquire::ItemDesc &item,
Item (TDEListView *parent, pkgAcquire::ItemDesc &item,
bool hit = false);
virtual ~Item ();
@ -75,7 +75,7 @@ protected:
void setStatus( const std::string &, int = 0 );
void setup() {
KListViewItem::setup();
TDEListViewItem::setup();
setHeight( height() + 6 );
}
};

@ -12,7 +12,7 @@
#include <kprocess.h>
#include <kdialogbase.h>
class KListBox;
class TDEListBox;
namespace KParts {
class Part;
}

@ -12,7 +12,7 @@
using namespace adept;
ExtendableList::ExtendableList( TQWidget *p, const char *n )
: KListView( p, n ),
: TDEListView( p, n ),
m_toggleColumn( 0 ), m_inDtor( false ),
m_extenderUpdateScheduled( false ),
m_needSort( false ),
@ -48,7 +48,7 @@ void ExtendableList::keyPressEvent( TQKeyEvent *e ) {
return item->showExtender();
}
}
return KListView::keyPressEvent( e );
return TDEListView::keyPressEvent( e );
}
void ExtendableList::openToplevel() {
@ -125,25 +125,25 @@ void ExtendableList::delayedUpdateExtenders()
void ExtendableList::clear()
{
kdDebug() << "ExtendableList::clear()" << endl;
KListView::clear();
TDEListView::clear();
kdDebug() << "end of ExtendableList::clear()" << endl;
}
void ExtendableList::show()
{
KListView::show();
TDEListView::show();
updateExtenders();
}
void ExtendableList::showEvent( TQShowEvent *e )
{
KListView::showEvent( e );
TDEListView::showEvent( e );
updateExtenders();
}
void ExtendableList::resizeEvent( TQResizeEvent *e )
{
KListView::resizeEvent( e );
TDEListView::resizeEvent( e );
updateExtenders();
// delayedUpdateExtenders();
}
@ -291,7 +291,7 @@ void ExtendableItem::paintBranches( TQPainter *p,
{
TQPixmap pm( width, height() );
TQPainter _p( &pm );
KListViewItem::paintCell( &_p, cg, column, width, alignment );
TDEListViewItem::paintCell( &_p, cg, column, width, alignment );
p->drawPixmap( 0, 0, pm );
} */

@ -17,7 +17,7 @@ class ExtendableItem;
class ExtendableList;
class ItemExtender;
class ExtendableList : public KListView {
class ExtendableList : public TDEListView {
Q_OBJECT
public:
@ -65,27 +65,27 @@ protected:
bool m_extenderHighlight:1;
};
class ExtendableItem : public KListViewItem {
class ExtendableItem : public TDEListViewItem {
public:
ExtendableItem( ExtendableList *l )
: KListViewItem( l ), m_extender( 0 ) {
: TDEListViewItem( l ), m_extender( 0 ) {
}
ExtendableItem( ExtendableList *l, ExtendableItem *prev )
: KListViewItem( l, prev ), m_extender( 0 ) {
: TDEListViewItem( l, prev ), m_extender( 0 ) {
}
ExtendableItem( ExtendableItem *p, ExtendableItem *prev )
: KListViewItem( p, prev ), m_extender( 0 ) {
: TDEListViewItem( p, prev ), m_extender( 0 ) {
}
ExtendableItem( ExtendableItem *p )
: KListViewItem( p ), m_extender( 0 ) {
: TDEListViewItem( p ), m_extender( 0 ) {
}
virtual void setup() {
KListViewItem::setup();
TDEListViewItem::setup();
updateIcon();
}
void toggleExtender();
@ -116,7 +116,7 @@ public:
virtual int compare( TQListViewItem *other, int col, bool ascending ) const;
virtual ~ExtendableItem();
virtual void setHeight( int h ) { KListViewItem::setHeight( h ); }
virtual void setHeight( int h ) { TDEListViewItem::setHeight( h ); }
protected:
ItemExtender *m_extender;
};

@ -92,7 +92,7 @@ void FilterList::drawContents( TQPainter *p, int a, int b, int c, int d ) {
m_itemsSeen = childCount();
updateHeight();
} // hmm, doesn't work... bah :p
KListView::drawContents( p, a, b, c, d );
TDEListView::drawContents( p, a, b, c, d );
}
void FilterList::plugLister( Lister *l ) {

@ -67,7 +67,7 @@ class FilterList : public ExtendableList
public:
friend class FilterItem;
typedef predicate::Predicate< entity::Entity > Predicate;
// typedef std::map< KListViewItem *, Predicate > Map;
// typedef std::map< TDEListViewItem *, Predicate > Map;
FilterList( TQWidget *parent = 0, const char *name = 0 );
typedef predicate::And< entity::Entity > And;
void appendPredicate( Predicate p );

@ -406,7 +406,7 @@ void ListerItem::paintCell (TQPainter *p, const TQColorGroup &cg,
c = actionColor( p );
}
_cg.setColor( TQColorGroup::Text, c );
KListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
TDEListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
p->drawPixmap( 0, 0, pm );
}
@ -417,7 +417,7 @@ void Lister::contextMenu( TQListViewItem *it, const TQPoint &pt, int /*c*/ )
m_context = dynamic_cast< ListerItem * >( it );
VectorRange sel = selection();
// entity::Package p = (dynamic_cast<ListerItem *>(it)->entity());
KPopupMenu *m = new KPopupMenu (this);
TDEPopupMenu *m = new TDEPopupMenu (this);
utils::Range< Actor > r = actor::Global< entity::Package >::list();
int id = 8;
try {

@ -29,7 +29,7 @@ PackageDetails::PackageDetails( TQWidget *w, const char *n )
m_fileListRunning( false )
{
m_toolbar->setIconSize( 22 );
m_toolbar->setIconText( KToolBar::IconTextRight );
m_toolbar->setIconText( TDEToolBar::IconTextRight );
m_toolbar->insertButton( u8( "back" ), BBack, false, i18n( "Back" ) );
m_toolbar->insertButton( u8( "forward" ), BForward, false, i18n( "Forward" ) );

@ -11,7 +11,7 @@
#ifndef EPT_PACKGEDETAILS_H
#define EPT_PACKGEDETAILS_H
class KToolBarButton;
class TDEToolBarButton;
class TQThread;
namespace adept {

@ -25,7 +25,7 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="KToolBar">
<widget class="TDEToolBar">
<property name="name">
<cstring>m_toolbar</cstring>
</property>
@ -416,7 +416,7 @@
<pixmap>image0</pixmap>
</customwidget>
<customwidget>
<class>KToolBar</class>
<class>TDEToolBar</class>
<header location="global">ktoolbar.h</header>
<sizehint>
<width>-1</width>

@ -50,7 +50,7 @@ void SourcesEditor::newAdd()
void SourcesEditor::contextMenu( TQListViewItem *, const TQPoint &pt ) {
EntryItem *s = dynamic_cast< EntryItem * >( m_list->selectedItem() );
if (!s) return;
KPopupMenu *m = new KPopupMenu (this);
TDEPopupMenu *m = new TDEPopupMenu (this);
m->insertItem( s->entry().enabled() ? i18n( "Disable" ) : i18n( "Enable" ), 0 );
m->insertItem( i18n( "Clone" ), 1 );
m->insertItem( i18n( "Remove" ), 2 );
@ -146,7 +146,7 @@ void EntryItem::setText( int c, const TQString &_s )
if (c == 2) e.setDistribution( s );
if (c == 3) e.setComponents( s );
setEntry( e );
KListViewItem::setText( c, _s ); // stop qlistview from looping infinitely
TDEListViewItem::setText( c, _s ); // stop qlistview from looping infinitely
}
void EntryItem::paintCell (TQPainter *p, const TQColorGroup &cg,
@ -159,7 +159,7 @@ void EntryItem::paintCell (TQPainter *p, const TQColorGroup &cg,
if (!entry().enabled())
c = TQt::gray;
_cg.setColor( TQColorGroup::Text, c );
KListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
TDEListViewItem::paintCell( &_p, _cg, column, width, AlignTop );
p->drawPixmap( 0, 0, pm );
}

@ -31,7 +31,7 @@ protected:
std::string m_filename;
};
class EntryItem : public KListViewItem {
class EntryItem : public TDEListViewItem {
public:
Sources::Entry entry() const {
return m_entry;
@ -39,12 +39,12 @@ public:
void setEntry( const Sources::Entry &e ) {
m_entry = e;
}
EntryItem( Sources::Entry e, KListView *v, EntryItem *prev )
: KListViewItem( v, prev ), m_entry( e ) {
EntryItem( Sources::Entry e, TDEListView *v, EntryItem *prev )
: TDEListViewItem( v, prev ), m_entry( e ) {
init();
}
EntryItem( Sources::Entry e, KListView *v )
: KListViewItem( v ), m_entry( e ) {
EntryItem( Sources::Entry e, TDEListView *v )
: TDEListViewItem( v ), m_entry( e ) {
init();
}
void init() {

@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KListView">
<widget class="TDEListView">
<column>
<property name="text">
<string>Type</string>

@ -10,7 +10,7 @@
using namespace adept;
FacetItem::FacetItem( TagChooser *t )
: KListViewItem( t )
: TDEListViewItem( t )
{
}
@ -24,12 +24,12 @@ void FacetItem::removeTag( TagItem::Tag t ) {
}
TagItem::TagItem( FacetItem *p )
: KListViewItem( p ), m_toplevel( false )
: TDEListViewItem( p ), m_toplevel( false )
{
}
TagItem::TagItem( TagChooser *l )
: KListViewItem( l ), m_toplevel( true )
: TDEListViewItem( l ), m_toplevel( true )
{
}
@ -40,7 +40,7 @@ TQString TagItem::text( int c ) const
}
TagChooser::TagChooser( TQWidget *p, const char *n )
: KListView( p, n )
: TDEListView( p, n )
{
observeComponent< cache::component::PackageTags >();
// addColumn( " ", 20 );

@ -21,7 +21,7 @@ class FacetItem;
class FacetExtender;
class TagChooser;
class TagItem : public KListViewItem {
class TagItem : public TDEListViewItem {
public:
typedef cache::entity::Tag Tag;
virtual TQString text( int ) const;
@ -34,7 +34,7 @@ protected:
Tag m_tag;
};
class FacetItem : public KListViewItem
class FacetItem : public TDEListViewItem
{
public:
typedef cache::entity::Facet Facet;
@ -46,7 +46,7 @@ protected:
Facet m_facet;
};
class TagChooser : public KListView, public cache::Observer // ExtendableList
class TagChooser : public TDEListView, public cache::Observer // ExtendableList
{
Q_OBJECT

@ -107,49 +107,49 @@ void TestApp::delayed() {
void TestApp::setupActions()
{
(new KAction(
(new TDEAction(
i18n( "Fetch Updates" ), u8( "adept_update" ),
0, TQT_TQOBJECT(this), TQT_SLOT( update() ), actionCollection(),
"update" ))->setEnabled( false );
(new KAction(
(new TDEAction(
i18n( "Reload Cache" ), u8( "adept_reload" ),
0, TQT_TQOBJECT(this), TQT_SLOT( reload() ), actionCollection(),
"reload" ))->setEnabled( false );
m_upgrade = new KAction(
m_upgrade = new TDEAction(
i18n( "Safe Upgrade" ), u8( "adept_upgrade" ),
0, TQT_TQOBJECT(this), TQT_SLOT( upgrade() ), actionCollection(),
"upgrade" );
m_distUpgrade = new KAction(
m_distUpgrade = new TDEAction(
i18n( "Full Upgrade" ), u8( "adept_distupgrade" ),
0, TQT_TQOBJECT(this), TQT_SLOT( distUpgrade() ), actionCollection(),
"dist-upgrade" );
m_commit = new KAction(
m_commit = new TDEAction(
i18n( "Apply Changes" ), u8( "adept_commit" ),
0, TQT_TQOBJECT(this), TQT_SLOT( commit() ), actionCollection(),
"commit" );
m_sourcesAction = new KToggleAction(
m_sourcesAction = new TDEToggleAction(
i18n( "Manage Repositories" ), u8( "adept_sourceseditor" ),
0, TQT_TQOBJECT(this), TQT_SLOT( toggleSources() ), actionCollection(),
"sourceseditor" );
m_previewAction = new KToggleAction(
m_previewAction = new TDEToggleAction(
i18n( "Preview Changes" ), u8( "adept_preview" ),
0, TQT_TQOBJECT(this), TQT_SLOT( togglePreview() ), actionCollection(),
"preview" );
m_progressAction = new KToggleAction(
m_progressAction = new TDEToggleAction(
i18n( "Show Last Download" ), u8( "adept_download_out" ),
0, TQT_TQOBJECT(this), TQT_SLOT( toggleDownload() ), actionCollection(),
"download_out" );
m_commitProgressAction = new KToggleAction(
m_commitProgressAction = new TDEToggleAction(
i18n( "Show Last DPkg Run" ), u8( "adept_commit_out" ),
0, TQT_TQOBJECT(this), TQT_SLOT( toggleCommit() ), actionCollection(),
"commit_out" );
m_listAction = new KToggleAction(
m_listAction = new TDEToggleAction(
i18n( "Show Package List" ), u8( "adept_packagelist" ),
0, TQT_TQOBJECT(this), TQT_SLOT( closeModes() ), actionCollection(),
"packagelist" );
@ -196,9 +196,9 @@ void TestApp::updateActionState()
bool e = m_actionsEnabled;
bool w = cache::Global::get().writeable();
component::State &s = cache::Global::get().state();
KActionPtrList a = actionCollection()->actions();
TDEActionPtrList a = actionCollection()->actions();
/* View menus seem to be BROKEN HERE?! */
for (KActionPtrList::iterator i = a.begin(); i != a.end(); ++i) {
for (TDEActionPtrList::iterator i = a.begin(); i != a.end(); ++i) {
if ( u8( (*i)->name() ) == u8( "update" ) ) {
(*i)->setEnabled( e && w );
} else if ( u8( (*i)->name() ) == u8( "preview" ) ) {
@ -215,7 +215,7 @@ void TestApp::updateActionState()
template< typename T, typename In >
void TestApp::aptAction( In b, In e ) {
const KAction *a = dynamic_cast<const KAction *>( sender() ); // HACK
const TDEAction *a = dynamic_cast<const TDEAction *>( sender() ); // HACK
typename T::Vector v = T::list();
for (typename T::Vector::iterator i = v.begin(); i != v.end(); ++i) {
if( a->name() == i->name() ) {

@ -16,7 +16,7 @@
class TQVBox;
class TQWidgetStack;
class TQSplitter;
class KAction;
class TDEAction;
namespace adept {
class AcqProgressWidget;
}
@ -24,7 +24,7 @@ class AcqProgressWidget;
using namespace aptFront;
using namespace adept;
class TestApp : public KMainWindow, Application {
class TestApp : public TDEMainWindow, Application {
Q_OBJECT
public:
@ -88,13 +88,13 @@ protected slots:
protected:
void updateActionState();
void guardLister( adept::Lister * );
void addMode( Mode m, KToggleAction *a, TQWidget *w ) {
void addMode( Mode m, TDEToggleAction *a, TQWidget *w ) {
m_modeActionMap[ m ] = a;
m_modeWidgetMap[ m ] = w;
a->setChecked( false );
}
KToggleAction *modeAction( Mode m ) {
TDEToggleAction *modeAction( Mode m ) {
return m_modeActionMap[ m ];
}
@ -122,19 +122,19 @@ protected:
adept::CommitProgress *m_commitProgress;
// other stuff
std::vector<KAction *> m_actions;
std::vector<TDEAction *> m_actions;
TQMap< TQString, TQString > m_icons;
KAction *m_undo, *m_redo;
TDEAction *m_undo, *m_redo;
int m_rebuilds;
bool m_actionsEnabled;
KAction *m_commit, *m_upgrade, *m_distUpgrade;
KToggleAction *m_sourcesAction, *m_commitProgressAction, *m_listAction,
TDEAction *m_commit, *m_upgrade, *m_distUpgrade;
TDEToggleAction *m_sourcesAction, *m_commitProgressAction, *m_listAction,
*m_previewAction, *m_progressAction;
std::map< Mode, KToggleAction * > m_modeActionMap;
std::map< Mode, TDEToggleAction * > m_modeActionMap;
std::map< Mode, TQWidget * > m_modeWidgetMap;
KToggleAction *m_modesClosed;
TDEToggleAction *m_modesClosed;
private:
template<typename T> void plugAptActions();
// template<typename T, typename In> void updateAptActions( In b, In e );

@ -43,7 +43,7 @@ TrayWindow::TrayWindow(TQWidget *parent, const char *name)
// setPixmap( loadIcon( u8( "adept_notifier_warning" ) ) );
}
void TrayWindow::contextMenuAboutToShow( KPopupMenu *r ) {
void TrayWindow::contextMenuAboutToShow( TDEPopupMenu *r ) {
kdDebug() << "TrayWindow::contextMenu()" << endl;
r->clear();
m_about->plug( r );

@ -8,7 +8,7 @@
#include <kprocess.h>
class TQWidget;
class KAction;
class TDEAction;
// class TDEGlobalAccel;
// the status indicator in system tray
@ -20,7 +20,7 @@ public:
TrayWindow(TQWidget *parent=0, const char *name=0);
void setAvailableUpdates( int n );
int updates() { return m_updates; }
void contextMenuAboutToShow ( KPopupMenu * );
void contextMenuAboutToShow ( TDEPopupMenu * );
signals:
void clicked();
void aboutSelected();
@ -28,7 +28,7 @@ protected:
void mouseReleaseEvent( TQMouseEvent * );
void resizeEvent( TQResizeEvent * );
int m_updates;
KAction *m_quit, *m_about;
TDEAction *m_quit, *m_about;
};
// the apport indicator in system tray

@ -15,7 +15,7 @@
class TQVBox;
class TQWidgetStack;
class TQSplitter;
class KAction;
class TDEAction;
class KPushButton;
namespace adept {
class AcqProgressWidget;
@ -24,7 +24,7 @@ class AcqProgressWidget;
using namespace aptFront;
using namespace adept;
class TestApp : public KMainWindow, Application {
class TestApp : public TDEMainWindow, Application {
Q_OBJECT
public:
@ -68,9 +68,9 @@ protected:
adept::Browser *m_list;
// other stuff
std::vector<KAction *> m_actions;
std::vector<TDEAction *> m_actions;
TQMap< TQString, TQString > m_icons;
KAction *m_undo, *m_redo;
TDEAction *m_undo, *m_redo;
cache::component::History< cache::component::State > *m_history;
};

Loading…
Cancel
Save