20#include <tdeversion.h>
23#include <tqpushbutton.h>
25#include "KoEditPath.h"
26#include <keditlistbox.h>
27#include <tdefiledialog.h>
28#include <kurlrequester.h>
32#include <tqcheckbox.h>
35KoEditPathDia::KoEditPathDia( const TQString & _path, TQWidget *parent, const char *name )
38 setCaption( i18n( "Edit Path") );
39 TQWidget *page = new TQWidget( this );
43 urlReq = new KURLRequester();
44 urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly);
49 tmp,page, "list_editor" , false, KEditListBox::Add|KEditListBox::Remove );
51 grid->addMultiCellWidget(m_listpath, 0, 4, 0, 0);
52 m_listpath->listBox()->insertStringList(TQStringList::split(TQString( ";"), _path));
57TQString KoEditPathDia::newPath() const
60 for ( int i = 0; i <(int)m_listpath->listBox()->count(); i++)
64 tmp += m_listpath->listBox()->text( i );
70KoChangePathDia::KoChangePathDia( const TQString & _path, TQWidget *parent, const char *name )
73 setCaption( i18n( "Edit Path") );
75 TQVBox *page =makeVBoxMainWidget();
76 new TQLabel( i18n( "Location:"), page);
77 m_urlReq = new KURLRequester(page);
78 m_urlReq->setMinimumWidth( m_urlReq->sizeHint().width() * 3 );
80 m_urlReq->lineEdit()->setText( _path );
81 m_urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly);
82 m_defaultPath = new TQCheckBox( i18n( "Default path"), page );
83 connect( m_defaultPath, TQ_SIGNAL(toggled ( bool )), this, TQ_SLOT( slotChangeDefaultValue( bool )));
84 slotChangeDefaultValue( _path.isEmpty() );
85 m_defaultPath->setChecked( _path.isEmpty() );
88TQString KoChangePathDia::newPath() const
90 return m_defaultPath->isChecked() ? TQString() : m_urlReq->lineEdit()->text();
93void KoChangePathDia::slotChangeDefaultValue( bool _b)
95 m_urlReq->setEnabled( !_b);
98#include "KoEditPath.moc"
const char * name(StdAction id)
|