diff options
Diffstat (limited to 'kugar/kudesigner_lib/structurewidget.cpp')
-rw-r--r-- | kugar/kudesigner_lib/structurewidget.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kugar/kudesigner_lib/structurewidget.cpp b/kugar/kudesigner_lib/structurewidget.cpp index 7f986ffb..e629beca 100644 --- a/kugar/kudesigner_lib/structurewidget.cpp +++ b/kugar/kudesigner_lib/structurewidget.cpp @@ -20,8 +20,8 @@ ***************************************************************************/ #include "structurewidget.h" -#include <qpainter.h> -#include <qcanvas.h> +#include <tqpainter.h> +#include <tqcanvas.h> #include <koproperty/property.h> @@ -45,11 +45,11 @@ using namespace KoProperty; class StructureItem: public KListViewItem { public: - StructureItem( KListView *parent, const QString &name ) - : KListViewItem( parent, name ), m_bold( false ) + StructureItem( KListView *tqparent, const TQString &name ) + : KListViewItem( tqparent, name ), m_bold( false ) {} - StructureItem( KListViewItem *parent, const QString &name ) - : KListViewItem( parent, name ), m_bold( false ) + StructureItem( KListViewItem *tqparent, const TQString &name ) + : KListViewItem( tqparent, name ), m_bold( false ) {} void setBold( bool b ) { @@ -60,11 +60,11 @@ public: return m_bold; } - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { if ( m_bold ) { - QFont f = p->font(); + TQFont f = p->font(); f.setWeight( 75 ); p->setFont( f ); } @@ -75,13 +75,13 @@ private: bool m_bold; }; -StructureWidget::StructureWidget( QWidget* parent, const char* name ) - : KListView( parent, name ) +StructureWidget::StructureWidget( TQWidget* tqparent, const char* name ) + : KListView( tqparent, name ) { setFullWidth( true ); addColumn( tr( "Report Structure" ) ); setSorting( -1 ); - connect( this, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) ); + connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ), this, TQT_SLOT( selectItem( TQListViewItem* ) ) ); } void StructureWidget::refresh() @@ -116,33 +116,33 @@ void StructureWidget::refreshSection( Kudesigner::Band *section, StructureItem * { if ( !section ) return ; - QString name; + TQString name; switch ( section->rtti() ) { case Kudesigner::Rtti_ReportHeader: - name = tr( "Report Header" ); + name = tqtr( "Report Header" ); break; case Kudesigner::Rtti_ReportFooter: - name = tr( "Report Footer" ); + name = tqtr( "Report Footer" ); break; case Kudesigner::Rtti_PageFooter: - name = tr( "Page Footer" ); + name = tqtr( "Page Footer" ); break; case Kudesigner::Rtti_PageHeader: - name = tr( "Page Header" ); + name = tqtr( "Page Header" ); break; case Kudesigner::Rtti_Detail: - name = tr( "Detail" ); + name = tqtr( "Detail" ); break; case Kudesigner::Rtti_DetailHeader: - name = tr( "Detail Header" ); + name = tqtr( "Detail Header" ); break; case Kudesigner::Rtti_DetailFooter: - name = tr( "Detail Footer" ); + name = tqtr( "Detail Footer" ); break; } if ( level > 0 ) - name += tr( " (level %1)" ).arg( level ); + name += tqtr( " (level %1)" ).tqarg( level ); StructureItem *item = new StructureItem( root, name ); m_items[ section ] = item; @@ -154,32 +154,32 @@ void StructureWidget::refreshSectionContents( Kudesigner::Band *section, Structu if ( !section ) return ; - for ( QCanvasItemList::iterator it = section->items.begin(); it != section->items.end(); ++it ) + for ( TQCanvasItemList::iterator it = section->items.begin(); it != section->items.end(); ++it ) { Kudesigner::Box *box = static_cast<Kudesigner::Box*>( *it ); if ( !box ) continue; - QString name = tr( "<unknown>" ); + TQString name = tr( "<unknown>" ); int idx; switch ( box->rtti() ) { case Kudesigner::Rtti_Label: - name = tr( "Label: %1" ).arg( box->props[ "Text" ].value().toString() ); + name = tqtr( "Label: %1" ).tqarg( box->props[ "Text" ].value().toString() ); break; case Kudesigner::Rtti_Field: - name = tr( "Field: %1" ).arg( box->props[ "Field" ].value().toString() ); + name = tqtr( "Field: %1" ).tqarg( box->props[ "Field" ].value().toString() ); break; case Kudesigner::Rtti_Calculated: - name = tr( "Calculated Field: %1" ).arg( box->props[ "Field" ].value().toString() ); + name = tqtr( "Calculated Field: %1" ).tqarg( box->props[ "Field" ].value().toString() ); break; case Kudesigner::Rtti_Special: - idx = box->props[ "Type" ].listData()->keys.findIndex( + idx = box->props[ "Type" ].listData()->keys.tqfindIndex( box->props[ "Type" ].value().toInt() ); - name = tr( "Special Field: %1" ).arg( box->props[ "Type" ].listData()->keys[ idx ].toString() ); + name = tqtr( "Special Field: %1" ).tqarg( box->props[ "Type" ].listData()->keys[ idx ].toString() ); break; case Kudesigner::Rtti_Line: - name = tr( "Line" ); + name = tqtr( "Line" ); break; } @@ -194,11 +194,11 @@ void StructureWidget::selectionMade() BoxList sel = m_doc->selected; for ( BoxList::iterator it = sel.begin(); it != sel.end(); ++it ) { - if ( m_items.contains( *it ) ) + if ( m_items.tqcontains( *it ) ) { StructureItem * item = static_cast<StructureItem*>( m_items[ *it ] ); item->setBold( true ); - item->repaint(); + item->tqrepaint(); m_selected.append( item ); } } @@ -206,21 +206,21 @@ void StructureWidget::selectionMade() void StructureWidget::selectionClear() { - for ( QValueList<StructureItem*>::iterator it = m_selected.begin(); it != m_selected.end(); ++it ) + for ( TQValueList<StructureItem*>::iterator it = m_selected.begin(); it != m_selected.end(); ++it ) { if ( ( *it ) == 0 ) continue; ( *it ) ->setBold( false ); - ( *it ) ->repaint(); + ( *it ) ->tqrepaint(); } m_selected.clear(); } -void StructureWidget::selectItem( QListViewItem *item ) +void StructureWidget::selectItem( TQListViewItem *item ) { if ( !item ) return ; - int idx = m_items.values().findIndex( static_cast<StructureItem*>( item ) ); + int idx = m_items.values().tqfindIndex( static_cast<StructureItem*>( item ) ); if ( idx == -1 ) return ; Kudesigner::Box *box = m_items.keys() [ idx ]; |