24#ifndef koTemplateChooseDia_h
25#define koTemplateChooseDia_h
27#include <kdialogbase.h>
28#include <kicondialog.h>
30#include <koffice_export.h>
34class KoTCDIconViewItem;
49 : TDEIconCanvas( parent, name ) {}
51 bool isCurrentValid() { return currentItem(); }
52 TQIconViewItem * load(KoTemplateGroup *group, const TQString& name, TDEInstance* instance);
55 virtual void keyPressEvent( TQKeyEvent *e ) {
56 if ( e->key() == Key_Return || e->key() == Key_Enter )
59 TDEIconCanvas::keyPressEvent( e );
67 KoTCDIconViewItem(TQIconView *parent=0)
71 KoTCDIconViewItem(TQIconView *parent=0, const TQString &text=0, const TQPixmap &icon=0,
72 const TQString &descr=0, const TQString &fullname=0)
79 TQString getDescr() const { return m_descr; }
80 TQString getFName() const { return m_full; }
88#include <tdefileiconview.h>
100 KFileIconView( parent, name ), toolTip(0)
102 connect( this, TQ_SIGNAL( onItem( TQIconViewItem * ) ),
103 TQ_SLOT( showToolTip( TQIconViewItem * ) ) );
104 connect( this, TQ_SIGNAL( onViewport() ),
105 TQ_SLOT( removeToolTip() ) );
115 void showToolTip( TQIconViewItem* );
116 void removeToolTip();
122class KoTemplateChooseDiaPrivate;
174 static ReturnType choose(TDEInstance* instance, TQString &file,
175 const DialogType &dialogType,
176 const TQCString& templateType,
181 static ReturnType choose(TDEInstance* instance, TQString &file,
182 const TQCString &format,
183 const TQString &nativeName,
184 const TQStringList& extraNativeMimeTypes,
185 const DialogType &dialogType=Everything,
186 const TQCString& templateType= "",
187 TQWidget* parent = 0);
193 TQString getTemplate() const;
197 TQString getFullTemplate() const;
201 ReturnType getReturnType() const;
205 DialogType getDialogType() const;
228 const TQCString &format,
229 const TQString &nativeName,
230 const TQStringList &extraNativeMimeTypes,
231 const DialogType &dialogType=Everything,
232 const TQCString& templateType= "");
235 KoTemplateChooseDiaPrivate *d;
237 TQString descriptionText( const TQString &name, const TQString &description);
239 void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * layout);
240 void setupFileDialog(TQWidget * widgetbase, TQGridLayout * layout);
241 void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * layout);
243 bool noStartupDlg() const;
247 void chosen(TQIconViewItem *);
248 void currentChanged( TQIconViewItem * );
249 void recentSelected( TQIconViewItem * );
Our reimplementation of TDEIconCanvas used within the template-chooser dialog.
Our reimplementation of KFileIconView used as the "recent files" view within the template-chooser dia...
virtual void hideEvent(TQHideEvent *) Reimplemented to remove an eventual tooltip.
This class is used to show the template dialog on startup.
ReturnType The Dialog returns one of these values depending on the input of the user.
DialogType To configure the dialog you have to use this enum.
|