#include "Qtx.h"
#include <QDir>
-#include <QFileInfo>
#include <QMenu>
+#include <QRegExp>
#include <QBitmap>
#include <QWidget>
#include <QLayout>
#include <QPainter>
+#include <QDirModel>
+#include <QFileInfo>
+#include <QCompleter>
#include <QApplication>
#include <QDesktopWidget>
return QDir().rename( QString( temp ), absName );
}
+QCompleter* Qtx::pathCompleter( const PathType type, const QString& filter )
+{
+ QStringList extList;
+ QStringList filterList = filter.split( ";;" );
+ for ( QStringList::const_iterator it = filterList.begin(); it != filterList.end(); ++it )
+ {
+ QRegExp rx( "[\\s\\w,;]*\\(?\\*\\.([\\w]+)\\)?[\\d\\s\\w]*" );
+ int index = 0;
+ while ( ( index = rx.indexIn( *it, index ) ) != -1 )
+ {
+ extList.append( QString( "*.%1" ).arg( rx.cap( 1 ) ) );
+ index += rx.matchedLength();
+ }
+ }
+
+ QDir::Filters filters = 0;
+ switch ( type )
+ {
+ case PT_OpenFile:
+ case PT_SaveFile:
+ filters = QDir::AllEntries | QDir::AllDirs | QDir::NoDotAndDotDot;
+ break;
+ case PT_Directory:
+ filters = QDir::Drives | QDir::Dirs | QDir::NoDotAndDotDot;
+ break;
+ }
+
+ QDirModel* dm = new QDirModel( extList, filters, QDir::Unsorted );
+ QCompleter* cmp = new QCompleter( dm, 0 );
+ dm->setParent( cmp );
+
+ return cmp;
+}
+
/*!
\brief Pack the specified color into integer RGB set.
\param c unpacked color
class QObject;
class QWidget;
+class QCompleter;
typedef QList<int> QIntList; //!< list of int values
typedef QList<short> QShortList; //!< list of short int values
{
public:
//! Widget alignment flags
- enum AlignmentFlags
+ typedef enum
{
AlignLeft = Qt::AlignLeft, //!< align left side of one widget to the left side of another widget
AlignLeading = Qt::AlignLeading, //!< synonim for AlignLeft
AlignOutRight = AlignOutLeft << 2, //!< align left side of one widget to the right side of another widget
AlignOutTop = AlignOutRight << 2, //!< align bottom side of one widget to the top side of another widget
AlignOutBottom = AlignOutTop << 2 //!< align top side of one widget to the bottom side of another widget
- };
+ } AlignmentFlags;
- static QString toQString( const char*, const int = -1 );
- static QString toQString( const short*, const int = -1 );
- static QString toQString( const unsigned char*, const int = -1 );
- static QString toQString( const unsigned short*, const int = -1 );
+ typedef enum { PT_OpenFile, PT_SaveFile, PT_Directory } PathType;
- static void setTabOrder( QWidget*, ... );
- static void setTabOrder( const QWidgetList& );
- static void alignWidget( QWidget*, const QWidget*, const int );
+ static QString toQString( const char*, const int = -1 );
+ static QString toQString( const short*, const int = -1 );
+ static QString toQString( const unsigned char*, const int = -1 );
+ static QString toQString( const unsigned short*, const int = -1 );
- static void simplifySeparators( QWidget*, const bool = true );
+ static void setTabOrder( QWidget*, ... );
+ static void setTabOrder( const QWidgetList& );
+ static void alignWidget( QWidget*, const QWidget*, const int );
- static bool isParent( QObject*, QObject* );
+ static void simplifySeparators( QWidget*, const bool = true );
- static QString dir( const QString&, const bool = true );
- static QString file( const QString&, const bool = true );
- static QString extension( const QString&, const bool = false );
+ static bool isParent( QObject*, QObject* );
- static QString library( const QString& );
+ static QString dir( const QString&, const bool = true );
+ static QString file( const QString&, const bool = true );
+ static QString extension( const QString&, const bool = false );
- static QString tmpDir();
- static bool mkDir( const QString& );
- static bool rmDir( const QString& );
- static bool dos2unix( const QString& );
- static QString addSlash( const QString& );
+ static QString library( const QString& );
- static int rgbSet( const QColor& );
- static int rgbSet( const int, const int, const int );
+ static QString tmpDir();
+ static bool mkDir( const QString& );
+ static bool rmDir( const QString& );
+ static bool dos2unix( const QString& );
+ static QString addSlash( const QString& );
- static QColor rgbSet( const int );
- static void rgbSet( const int, int&, int&, int& );
+ static QCompleter* pathCompleter( const PathType, const QString& = QString() );
- static QColor scaleColor( const int, const int, const int );
- static void scaleColors( const int, QColorList& );
+ static int rgbSet( const QColor& );
+ static int rgbSet( const int, const int, const int );
- static QImage grayscale( const QImage& );
- static QPixmap grayscale( const QPixmap& );
- static QImage transparentImage( const int, const int, const int = -1 );
- static QPixmap transparentPixmap( const int, const int, const int = -1 );
- static QPixmap composite( const QPixmap&, const int, const int, const QPixmap& = QPixmap() );
+ static QColor rgbSet( const int );
+ static void rgbSet( const int, int&, int&, int& );
+
+ static QColor scaleColor( const int, const int, const int );
+ static void scaleColors( const int, QColorList& );
+
+ static QImage grayscale( const QImage& );
+ static QPixmap grayscale( const QPixmap& );
+ static QImage transparentImage( const int, const int, const int = -1 );
+ static QPixmap transparentPixmap( const int, const int, const int = -1 );
+ static QPixmap composite( const QPixmap&, const int, const int, const QPixmap& = QPixmap() );
};
#endif
\class QtxPagePrefPathItem
GUI implementation of resources path item.
*/
-QtxPagePrefPathItem::QtxPagePrefPathItem( const int mode, const QString& title,
+QtxPagePrefPathItem::QtxPagePrefPathItem( const Qtx::PathType type, const QString& title,
QtxPreferenceItem* parent, const QString& sect, const QString& param )
: QtxPageNamedPrefItem( title, parent, sect, param )
{
- setControl( myPath = new QtxPathEdit( mode ) );
+ setControl( myPath = new QtxPathEdit( type ) );
}
QtxPagePrefPathItem::QtxPagePrefPathItem( const QString& title, QtxPreferenceItem* parent,
{
}
-int QtxPagePrefPathItem::mode() const
+Qtx::PathType QtxPagePrefPathItem::pathType() const
{
- return myPath->mode();
+ return myPath->pathType();
}
-void QtxPagePrefPathItem::setMode( const int mode )
+void QtxPagePrefPathItem::setPathType( const Qtx::PathType type )
{
- myPath->setMode( mode );
+ myPath->setPathType( type );
}
-QString QtxPagePrefPathItem::filter() const
+QString QtxPagePrefPathItem::pathFilter() const
{
- return myPath->filter();
+ return myPath->pathFilter();
}
-void QtxPagePrefPathItem::setFilter( const QString& f )
+void QtxPagePrefPathItem::setPathFilter( const QString& f )
{
- myPath->setFilter( f );
+ myPath->setPathFilter( f );
}
void QtxPagePrefPathItem::store()
QVariant QtxPagePrefPathItem::optionValue( const QString& name ) const
{
- if ( name == "mode" )
- return mode();
- else if ( name == "filter" )
- return filter();
+ if ( name == "path_type" )
+ return pathType();
+ else if ( name == "path_filter" )
+ return pathFilter();
else
return QtxPageNamedPrefItem::optionValue( name );
}
void QtxPagePrefPathItem::setOptionValue( const QString& name, const QVariant& val )
{
- if ( name == "mode" )
+ if ( name == "path_type" )
{
if ( val.canConvert( QVariant::Int ) )
- setMode( val.toInt() );
+ setPathType( (Qtx::PathType)val.toInt() );
}
- else if ( name == "filter" )
+ else if ( name == "path_filter" )
{
if ( val.canConvert( QVariant::String ) )
- setFilter( val.toString() );
+ setPathFilter( val.toString() );
}
else
QtxPageNamedPrefItem::setOptionValue( name, val );
setControl( myPaths = new QtxPathListEdit() );
}
-QtxPagePrefPathsItem::QtxPagePrefPathsItem( const int mode, const QString& title, QtxPreferenceItem* parent,
- const QString& sect, const QString& param )
+QtxPagePrefPathsItem::QtxPagePrefPathsItem( const Qtx::PathType type, const QString& title,
+ QtxPreferenceItem* parent, const QString& sect, const QString& param )
: QtxPageNamedPrefItem( title, parent, sect, param )
{
- setControl( myPaths = new QtxPathListEdit( mode ) );
+ setControl( myPaths = new QtxPathListEdit( type ) );
}
QtxPagePrefPathsItem::QtxPagePrefPathsItem( const QString& title, QtxPreferenceItem* parent,
{
}
-int QtxPagePrefPathsItem::mode() const
+Qtx::PathType QtxPagePrefPathsItem::pathType() const
{
- return myPaths->mode();
+ return myPaths->pathType();
}
-void QtxPagePrefPathsItem::setMode( const int mode )
+void QtxPagePrefPathsItem::setPathType( const Qtx::PathType type )
{
- myPaths->setMode( mode );
+ myPaths->setPathType( type );
}
void QtxPagePrefPathsItem::store()
QVariant QtxPagePrefPathsItem::optionValue( const QString& name ) const
{
- if ( name == "mode" )
- return mode();
+ if ( name == "path_type" )
+ return pathType();
else
return QtxPageNamedPrefItem::optionValue( name );
}
void QtxPagePrefPathsItem::setOptionValue( const QString& name, const QVariant& val )
{
- if ( name == "mode" )
+ if ( name == "path_type" )
{
if ( val.canConvert( QVariant::Int ) )
- setMode( val.toInt() );
+ setPathType( (Qtx::PathType)val.toInt() );
}
else
QtxPageNamedPrefItem::setOptionValue( name, val );
class QTX_EXPORT QtxPagePrefPathItem : public QtxPageNamedPrefItem
{
public:
- typedef enum { OpenFile = QtxPathEdit::OpenFile,
- SaveFile = QtxPathEdit::SaveFile,
- Directory = QtxPathEdit::Directory } Mode;
-
-public:
- QtxPagePrefPathItem( const int, const QString&, QtxPreferenceItem* = 0,
+ QtxPagePrefPathItem( const Qtx::PathType, const QString&, QtxPreferenceItem* = 0,
const QString& = QString(), const QString& = QString() );
QtxPagePrefPathItem( const QString&, QtxPreferenceItem* = 0,
const QString& = QString(), const QString& = QString() );
virtual ~QtxPagePrefPathItem();
- int mode() const;
- void setMode( const int );
+ Qtx::PathType pathType() const;
+ void setPathType( const Qtx::PathType );
- QString filter() const;
- void setFilter( const QString& );
+ QString pathFilter() const;
+ void setPathFilter( const QString& );
virtual void store();
virtual void retrieve();
*/
class QTX_EXPORT QtxPagePrefPathsItem : public QtxPageNamedPrefItem
{
-public:
- typedef enum { File = QtxPathListEdit::File,
- Directory = QtxPathListEdit::Directory } Mode;
-
public:
QtxPagePrefPathsItem( QtxPreferenceItem* = 0,
const QString& = QString(), const QString& = QString() );
QtxPagePrefPathsItem( const QString&, QtxPreferenceItem* = 0,
const QString& = QString(), const QString& = QString() );
- QtxPagePrefPathsItem( const int, const QString&, QtxPreferenceItem* = 0,
+ QtxPagePrefPathsItem( const Qtx::PathType, const QString&, QtxPreferenceItem* = 0,
const QString& = QString(), const QString& = QString() );
virtual ~QtxPagePrefPathsItem();
- int mode() const;
- void setMode( const int );
+ Qtx::PathType pathType() const;
+ void setPathType( const Qtx::PathType );
virtual void store();
virtual void retrieve();
#include <QDir>
#include <QLabel>
#include <QPixmap>
-#include <QVBoxLayout>
+#include <QLayout>
#include <QLineEdit>
#include <QObjectList>
#include <QStringList>
\return created file entry ID
*/
int QtxPathDialog::createFileEntry( const QString& lab, const int mode,
- const QString& filter, const int id )
+ const QString& filter, const int id )
{
int num = id;
if ( num == -1 )
new QLabel( lab, myEntriesFrame );
entry.edit = new QLineEdit( myEntriesFrame );
+
entry.btn = new QPushButton( myEntriesFrame );
entry.btn->setAutoDefault( false );
entry.btn->setIcon( QPixmap( open_icon ) );
-
+
+ Qtx::PathType type = Qtx::PT_OpenFile;
+ switch ( mode )
+ {
+ case OpenFile:
+ type = Qtx::PT_OpenFile;
+ break;
+ case SaveFile:
+ type = Qtx::PT_SaveFile;
+ break;
+ case OpenDir:
+ case SaveDir:
+ case NewDir:
+ type = Qtx::PT_Directory;
+ break;
+ }
+ entry.edit->setCompleter( Qtx::pathCompleter( type, filter ) );
+
connect( entry.btn, SIGNAL( clicked() ), this, SLOT( onBrowse() ) );
connect( entry.edit, SIGNAL( returnPressed() ), this, SLOT( onReturnPressed() ) );
connect( entry.edit, SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) );
#include <QFileDialog>
#include <QRegExpValidator>
-QtxPathEdit::QtxPathEdit( const int mode, QWidget* parent )
+static const char* browse_icon[] = {
+"16 16 5 1",
+" c none",
+". c #ffff00",
+"# c #848200",
+"a c #ffffff",
+"b c #000000",
+" ",
+" bbb ",
+" b b b",
+" bb",
+" bbb bbb",
+" ba.abbbbbbb ",
+" b.a.a.a.a.b ",
+" ba.a.a.a.ab ",
+" b.a.abbbbbbbbbb",
+" ba.ab#########b",
+" b.ab#########b ",
+" bab#########b ",
+" bb#########b ",
+" bbbbbbbbbbb ",
+" ",
+" "
+};
+
+QtxPathEdit::QtxPathEdit( const Qtx::PathType type, QWidget* parent )
: QFrame( parent ),
-myMode( mode )
+myType( type )
{
initialize();
}
QtxPathEdit::QtxPathEdit( QWidget* parent )
: QFrame( parent ),
-myMode( OpenFile )
+myType( Qtx::PT_OpenFile )
{
initialize();
}
{
}
-int QtxPathEdit::mode() const
+Qtx::PathType QtxPathEdit::pathType() const
{
- return myMode;
+ return myType;
}
-void QtxPathEdit::setMode( const int mode )
+void QtxPathEdit::setPathType( const Qtx::PathType type )
{
- if ( myMode == mode )
+ if ( myType == type )
return;
- myMode = mode;
+ myType = type;
updateState();
}
myPath->setText( txt );
}
-QString QtxPathEdit::filter() const
+QString QtxPathEdit::pathFilter() const
{
return myFilter;
}
-void QtxPathEdit::setFilter( const QString& f )
+void QtxPathEdit::setPathFilter( const QString& f )
{
if ( myFilter == f )
return;
{
QString path;
QString initial = QFileInfo( myPath->text() ).path();
- switch ( mode() )
+ switch ( pathType() )
{
- case OpenFile:
- path = QFileDialog::getOpenFileName( myPath, QString(), initial, filter() );
+ case Qtx::PT_OpenFile:
+ path = QFileDialog::getOpenFileName( myPath, QString(), initial, pathFilter() );
break;
- case SaveFile:
- path = QFileDialog::getSaveFileName( myPath, QString(), initial, filter() );
+ case Qtx::PT_SaveFile:
+ path = QFileDialog::getSaveFileName( myPath, QString(), initial, pathFilter() );
break;
- case Directory:
+ case Qtx::PT_Directory:
path = QFileDialog::getExistingDirectory( myPath, QString(), initial );
break;
}
myPath->setValidator( new QRegExpValidator( QRegExp( "^([\\w/]{2}|[A-Z]:)[^:;\\*\\?]*[\\w\\\\/\\.]$" ), myPath ) );
QToolButton* browse = new QToolButton( this );
- browse->setText( "..." );
+ browse->setIcon( QPixmap( browse_icon ) );
base->addWidget( browse );
connect( browse, SIGNAL( clicked( bool ) ), this, SLOT( onBrowse( bool ) ) );
void QtxPathEdit::updateState()
{
- QStringList extList;
- QStringList filterList = filter().split( ";;" );
- for ( QStringList::const_iterator it = filterList.begin(); it != filterList.end(); ++it )
- {
- QRegExp rx( "[\\s\\w,;]*\\(?\\*\\.([\\w]+)\\)?[\\d\\s\\w]*" );
- int index = 0;
- while ( ( index = rx.indexIn( *it, index ) ) != -1 )
- {
- extList.append( QString( "*.%1" ).arg( rx.cap( 1 ) ) );
- index += rx.matchedLength();
- }
- }
-
- QDir::Filters filters = 0;
- switch ( mode() )
- {
- case OpenFile:
- case SaveFile:
- filters = QDir::AllEntries | QDir::AllDirs | QDir::NoDotAndDotDot;
- break;
- case Directory:
- filters = QDir::Drives | QDir::Dirs | QDir::NoDotAndDotDot;
- break;
- }
-
- QDirModel* dm = new QDirModel( extList, filters, QDir::Unsorted );
- QCompleter* cmp = new QCompleter( dm, myPath );
- dm->setParent( cmp );
-
- myPath->setCompleter( cmp );
+ myPath->setCompleter( Qtx::pathCompleter( pathType(), pathFilter() ) );
}
Q_OBJECT
public:
- typedef enum { OpenFile, SaveFile, Directory } Mode;
-
-public:
- QtxPathEdit( const int, QWidget* = 0 );
+ QtxPathEdit( const Qtx::PathType, QWidget* = 0 );
QtxPathEdit( QWidget* = 0 );
virtual ~QtxPathEdit();
- int mode() const;
- void setMode( const int );
+ QString path() const;
+ void setPath( const QString& );
- QString path() const;
- void setPath( const QString& );
+ Qtx::PathType pathType() const;
+ void setPathType( const Qtx::PathType );
- QString filter() const;
- void setFilter( const QString& );
+ QString pathFilter() const;
+ void setPathFilter( const QString& );
private slots:
- void onBrowse( bool = false );
+ void onBrowse( bool = false );
protected:
- QLineEdit* lineEdit() const;
+ QLineEdit* lineEdit() const;
private:
- void initialize();
- void updateState();
+ void initialize();
+ void updateState();
private:
- int myMode;
- QLineEdit* myPath;
- QString myFilter;
+ QLineEdit* myPath;
+ Qtx::PathType myType;
+ QString myFilter;
};
#endif
/*!
\class QtxPathListEdit
*/
-QtxPathListEdit::QtxPathListEdit( const int mode, QWidget* parent )
+QtxPathListEdit::QtxPathListEdit( const Qtx::PathType type, QWidget* parent )
: QFrame( parent ),
myCompleter( 0 ),
-myMode( mode )
+myType( type ),
+myDuplicate( false )
{
initialize();
}
QtxPathListEdit::QtxPathListEdit( QWidget* parent )
: QFrame( parent ),
myCompleter( 0 ),
-myMode( File )
+myType( Qtx::PT_OpenFile ),
+myDuplicate( false )
{
initialize();
}
{
}
-int QtxPathListEdit::mode() const
+Qtx::PathType QtxPathListEdit::pathType() const
{
- return myMode;
+ return myType;
}
-void QtxPathListEdit::setMode( const int m )
+void QtxPathListEdit::setPathType( const Qtx::PathType t )
{
- if ( myMode == m )
+ if ( myType == t )
return;
- myMode = m;
+ myType = t;
+
delete myCompleter;
myCompleter = 0;
}
myModel->setStringList( lst );
}
+bool QtxPathListEdit::isDuplicateEnabled() const
+{
+ return myDuplicate;
+}
+
+void QtxPathListEdit::setDuplicateEnabled( const bool on )
+{
+ myDuplicate = on;
+}
+
int QtxPathListEdit::count() const
{
return myModel->rowCount();
void QtxPathListEdit::onInsert( bool )
{
- myModel->insertRows( myModel->rowCount(), 1 );
- QModelIndex idx = myModel->index( myModel->rowCount() - 1, 0 );
+ int empty = -1;
+ QStringList lst = myModel->stringList();
+ for ( int r = 0; r < lst.count() && empty == -1; r++ )
+ {
+ if ( lst.at( r ).isEmpty() )
+ empty = r;
+ }
+
+ if ( empty == -1 )
+ myModel->insertRows( empty = myModel->rowCount(), 1 );
+
+ QModelIndex idx = myModel->index( empty, 0 );
myList->setCurrentIndex( idx );
myList->edit( idx );
}
myList->setSelectionMode( QListView::SingleSelection );
myList->setSelectionBehavior( QListView::SelectRows );
myList->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
+ myList->setEditTriggers( QListView::DoubleClicked );
myList->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
myList->installEventFilter( this );
QWidget* QtxPathListEdit::createEditor( QWidget* parent )
{
QtxPathEdit* edit = new Editor( parent );
- switch ( mode() )
- {
- case File:
- edit->setMode( QtxPathEdit::OpenFile );
- break;
- case Directory:
- edit->setMode( QtxPathEdit::Directory );
- break;
- }
-
+ edit->setPathType( pathType() );
return edit;
}
if ( !edit )
return;
- myModel->setData( index, edit->path(), Qt::EditRole );
+ QString path = edit->path().trimmed();
+
+ if ( !isDuplicateEnabled() && !checkDuplicate( path, index.row() ) )
+ return;
+
+ if ( !checkExistance( path ) )
+ return;
+
+ myModel->setData( index, path, Qt::EditRole );
}
void QtxPathListEdit::setEditorData( QWidget* editor, const QModelIndex& index )
QVariant v = myModel->data( index, Qt::EditRole );
edit->setPath( v.toString() );
}
+
+bool QtxPathListEdit::checkExistance( const QString& str, const bool msg )
+{
+ if ( pathType() == Qtx::PT_SaveFile )
+ return true;
+
+ bool ok = QFileInfo( str ).exists();
+ if ( !ok && msg )
+ ok = QMessageBox::question( this, tr( "Warning" ), tr( "Path \"%1\" doesn't exist. Add it to list anyway?" ).arg( str ),
+ QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes;
+
+ if ( ok && QFileInfo( str ).exists() )
+ {
+ switch ( pathType() )
+ {
+ case Qtx::PT_OpenFile:
+ ok = QFileInfo( str ).isFile();
+ if ( !ok && msg )
+ QMessageBox::warning( this, tr( "Error" ), tr( "Location \"%1\" doesn't point to file" ).arg( str ) );
+ break;
+ case Qtx::PT_Directory:
+ ok = QFileInfo( str ).isDir();
+ if ( !ok && msg )
+ QMessageBox::warning( this, tr( "Error" ), tr( "Location \"%1\" doesn't point to directory" ).arg( str ) );
+ break;
+ }
+ }
+
+ return ok;
+}
+
+bool QtxPathListEdit::checkDuplicate( const QString& str, const int row, const bool msg )
+{
+ int cur = -1;
+ QStringList lst = myModel->stringList();
+ for ( int r = 0; r < lst.count() && cur == -1; r++ )
+ {
+ if ( r != row && lst.at( r ) == str )
+ cur = r;
+ }
+
+ if ( cur != -1 && msg )
+ QMessageBox::warning( this, tr( "Error" ), tr( "Path \"%1\" already exist in the list" ).arg( str ) );
+
+ return cur == -1;
+}
class Delegate;
public:
- typedef enum { File, Directory } PathMode;
-
-public:
- QtxPathListEdit( const int, QWidget* = 0 );
+ QtxPathListEdit( const Qtx::PathType, QWidget* = 0 );
QtxPathListEdit( QWidget* = 0 );
virtual ~QtxPathListEdit();
- int mode() const;
- void setMode( const int );
+ Qtx::PathType pathType() const;
+ void setPathType( const Qtx::PathType );
QStringList pathList() const;
void setPathList( const QStringList& );
+ bool isDuplicateEnabled() const;
+ void setDuplicateEnabled( const bool );
+
int count() const;
bool contains( const QString& ) const;
void setModelData( QWidget*, const QModelIndex& );
void setEditorData( QWidget*, const QModelIndex& );
+ bool checkExistance( const QString&, const bool = true );
+ bool checkDuplicate( const QString&, const int, const bool = true );
+
private:
- int myMode;
QListView* myList;
+ Qtx::PathType myType;
QStringListModel* myModel;
QCompleter* myCompleter;
+ bool myDuplicate;
friend class QtxPathListEdit::Delegate;
};
-#endif // QTXPATHLISTEDIT_H
+#endif
item = new QtxPagePrefFontItem( title, parent, sect, param );
break;
case File:
- item = new QtxPagePrefPathItem( QtxPagePrefPathItem::OpenFile, title, parent, sect, param );
+ item = new QtxPagePrefPathItem( Qtx::PT_OpenFile, title, parent, sect, param );
break;
case DirList:
- item = new QtxPagePrefPathsItem( QtxPagePrefPathsItem::Directory, title, parent, sect, param );
+ item = new QtxPagePrefPathsItem( Qtx::PT_Directory, title, parent, sect, param );
break;
}