summaryrefslogtreecommitdiffstats
path: root/src/entrywidgetexternal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entrywidgetexternal.cpp')
-rw-r--r--src/entrywidgetexternal.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/entrywidgetexternal.cpp b/src/entrywidgetexternal.cpp
index a672e25..f316c82 100644
--- a/src/entrywidgetexternal.cpp
+++ b/src/entrywidgetexternal.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqtooltip.h>
#include <kpushbutton.h>
#include <kdialog.h>
@@ -39,9 +39,9 @@ namespace KBibTeX
const int EntryWidgetExternal::m_menuIdCurrentDirectory = 8192;
const int EntryWidgetExternal::m_menuIdPreviousDirectory = 8191;
- QString EntryWidgetExternal::m_previousDirectory = QString::null;
+ TQString EntryWidgetExternal::m_previousDirectory = TQString::null;
- EntryWidgetExternal::EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetExternal::EntryWidgetExternal( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name )
{
setupGUI();
@@ -110,7 +110,7 @@ namespace KBibTeX
connect( m_fieldLineEditLocalFile, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
}
- void EntryWidgetExternal::updateWarnings( BibTeX::Entry::EntryType entryType, QListView *listViewWarnings )
+ void EntryWidgetExternal::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings )
{
addMissingWarning( entryType, BibTeX::EntryField::ftURL, m_fieldLineEditURL->caption(), !m_fieldLineEditURL->isEmpty(), m_fieldLineEditURL, listViewWarnings );
@@ -135,7 +135,7 @@ namespace KBibTeX
m_pushButtonOpenURL->setEnabled( FALSE );
}
- void EntryWidgetExternal::openURL( const QString &url )
+ void EntryWidgetExternal::openURL( const TQString &url )
{
Settings::openUrl( KURL( url ), this );
}
@@ -163,14 +163,14 @@ namespace KBibTeX
void EntryWidgetExternal::browseLocalFile( int id )
{
Settings * settings = Settings::self();
- QString startDir = QString::null;
- if ( id == m_menuIdPreviousDirectory && m_previousDirectory != QString::null )
+ TQString startDir = TQString::null;
+ if ( id == m_menuIdPreviousDirectory && m_previousDirectory != TQString::null )
startDir = m_previousDirectory;
else if ( settings->editing_DocumentSearchPaths.size() > ( unsigned int )id )
startDir = *settings->editing_DocumentSearchPaths.at( id );
else
- startDir = QDir::currentDirPath();
- QString filename = KFileDialog::getOpenFileName( startDir );
+ startDir = TQDir::currentDirPath();
+ TQString filename = KFileDialog::getOpenFileName( startDir );
if ( !filename.isEmpty() )
{
@@ -191,12 +191,12 @@ namespace KBibTeX
value->items.append( new BibTeX::PlainText( filename ) );
m_fieldLineEditLocalFile->setValue( value );
- if ( m_previousDirectory == QString::null )
+ if ( m_previousDirectory == TQString::null )
{
- QPopupMenu *menu = m_pushButtonBrowseLocalFile->popup();
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory, 2 );
+ TQPopupMenu *menu = m_pushButtonBrowseLocalFile->popup();
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory, 2 );
}
- QFileInfo fileInfo( filename );
+ TQFileInfo fileInfo( filename );
m_previousDirectory = fileInfo.dirPath( true );
}
}
@@ -217,10 +217,10 @@ namespace KBibTeX
{
Settings * settings = Settings::self();
- QGridLayout * gridLayout = new QGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 5, 3, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 4, 10 );
- QLabel *label = new QLabel( QString( "%1:" ).arg( i18n( "URL" ) ), this );
+ TQLabel *label = new TQLabel( TQString( "%1:" ).arg( i18n( "URL" ) ), this );
gridLayout->addWidget( label, 0, 0 );
m_fieldLineEditURL = new KBibTeX::FieldLineEdit( i18n( "URL" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditURL" );
m_fieldLineEditURL->setFieldType( BibTeX::EntryField::ftURL );
@@ -230,30 +230,30 @@ namespace KBibTeX
m_pushButtonOpenURL = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenURL, 0, 2 );
- m_pushButtonOpenURL->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenURL->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenURL, QString( i18n( "Open %1" ) ).arg( i18n( "URL" ) ) );
+ m_pushButtonOpenURL->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenURL->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenURL, TQString( i18n( "Open %1" ) ).arg( i18n( "URL" ) ) );
connect( m_pushButtonOpenURL, SIGNAL( clicked() ), this, SLOT( openURL() ) );
- KURLLabel *urllabel = new KURLLabel( "http://www.doi.org/", QString( "%1:" ).arg( i18n( "DOI" ) ), this );
- QToolTip::add( urllabel, i18n( "Digital Object Identifier" ) );
- urllabel->setFocusPolicy( QWidget::NoFocus );
+ KURLLabel *urllabel = new KURLLabel( "http://www.doi.org/", TQString( "%1:" ).arg( i18n( "DOI" ) ), this );
+ TQToolTip::add( urllabel, i18n( "Digital Object Identifier" ) );
+ urllabel->setFocusPolicy( TQWidget::NoFocus );
gridLayout->addWidget( urllabel, 1, 0 );
m_fieldLineEditDoi = new KBibTeX::FieldLineEdit( i18n( "DOI" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditDoi" );
m_fieldLineEditDoi->setFieldType( BibTeX::EntryField::ftDoi );
gridLayout->addWidget( m_fieldLineEditDoi, 1, 1 );
urllabel->setBuddy( m_fieldLineEditDoi );
connect( m_fieldLineEditDoi, SIGNAL( textChanged() ), this, SLOT( updateGUI() ) );
- connect( urllabel, SIGNAL( leftClickedURL( const QString& ) ), this, SLOT( openURL( const QString& ) ) );
+ connect( urllabel, SIGNAL( leftClickedURL( const TQString& ) ), this, SLOT( openURL( const TQString& ) ) );
m_pushButtonOpenDoi = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenDoi, 1, 2 );
- m_pushButtonOpenDoi->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenDoi->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenDoi, i18n( "Open DOI" ) );
+ m_pushButtonOpenDoi->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenDoi->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenDoi, i18n( "Open DOI" ) );
connect( m_pushButtonOpenDoi, SIGNAL( clicked() ), this, SLOT( openDoi() ) );
- label = new QLabel( QString( "%1:" ).arg( i18n( "Local File" ) ), this );
+ label = new TQLabel( TQString( "%1:" ).arg( i18n( "Local File" ) ), this );
gridLayout->addWidget( label, 2, 0 );
m_fieldLineEditLocalFile = new KBibTeX::FieldLineEdit( i18n( "Local File" ), KBibTeX::FieldLineEdit::itSingleLine, m_isReadOnly, this, "m_fieldLineEditLocalFile" );
m_fieldLineEditLocalFile->setFieldType( BibTeX::EntryField::ftLocalFile );
@@ -263,32 +263,32 @@ namespace KBibTeX
m_pushButtonOpenLocalFile = new KPushButton( this );
gridLayout->addWidget( m_pushButtonOpenLocalFile, 2, 2 );
- m_pushButtonOpenLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
- m_pushButtonOpenLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
- QToolTip::add( m_pushButtonOpenLocalFile, QString( i18n( "Open %1" ) ).arg( i18n( "Local File" ) ) );
+ m_pushButtonOpenLocalFile->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonOpenLocalFile->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonOpenLocalFile, TQString( i18n( "Open %1" ) ).arg( i18n( "Local File" ) ) );
connect( m_pushButtonOpenLocalFile, SIGNAL( clicked() ), this, SLOT( openLocalFile() ) );
- QWidget *container = new QWidget( this );
- QHBoxLayout *containerLayout = new QHBoxLayout( container );
+ TQWidget *container = new TQWidget( this );
+ TQHBoxLayout *containerLayout = new TQHBoxLayout( container );
gridLayout->addWidget( container, 3, 1 );
m_pushButtonBrowseLocalFile = new KPushButton( i18n( "&Browse..." ), container );
- QToolTip::add( m_pushButtonBrowseLocalFile, i18n( "Browse for a local file" ) );
- m_pushButtonBrowseLocalFile->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
+ TQToolTip::add( m_pushButtonBrowseLocalFile, i18n( "Browse for a local file" ) );
+ m_pushButtonBrowseLocalFile->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
containerLayout->addWidget( m_pushButtonBrowseLocalFile );
containerLayout->addStretch( 10 );
- m_pushButtonBrowseLocalFile->setIconSet( QIconSet( SmallIcon( "fileopen" ) ) );
+ m_pushButtonBrowseLocalFile->setIconSet( TQIconSet( SmallIcon( "fileopen" ) ) );
KPopupMenu *menu = new KPopupMenu( m_pushButtonBrowseLocalFile );
menu->insertTitle( i18n( "Select base directory" ) );
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Current directory" ), m_menuIdCurrentDirectory );
- if ( m_previousDirectory != QString::null )
- menu->insertItem( QIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory );
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Current directory" ), m_menuIdCurrentDirectory );
+ if ( m_previousDirectory != TQString::null )
+ menu->insertItem( TQIconSet( SmallIcon( "favorite" ) ), i18n( "Previously used directory" ), m_menuIdPreviousDirectory );
if ( !settings->editing_DocumentSearchPaths.isEmpty() )
{
menu->insertSeparator();
int i = 0;
- for ( QStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it, ++i )
- menu->insertItem( QIconSet( SmallIcon( "folder" ) ), *it, i );
+ for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it, ++i )
+ menu->insertItem( TQIconSet( SmallIcon( "folder" ) ), *it, i );
}
m_pushButtonBrowseLocalFile->setPopup( menu );
connect( menu, SIGNAL( activated( int ) ), this, SLOT( browseLocalFile( int ) ) );