summaryrefslogtreecommitdiffstats
path: root/src/entrywidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entrywidget.cpp')
-rw-r--r--src/entrywidget.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/entrywidget.cpp b/src/entrywidget.cpp
index c1af4b3..607caab 100644
--- a/src/entrywidget.cpp
+++ b/src/entrywidget.cpp
@@ -62,7 +62,7 @@ namespace KBibTeX
{
TQDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQWidget *parent, const char *name )
{
- EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, TRUE, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel );
+ EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, true, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel );
EntryWidget *entryWidget = new EntryWidget( entry, bibtexfile, isReadOnly, isNew, dlg, "entryWidget" );
dlg->setMainWidget( entryWidget );
@@ -77,7 +77,7 @@ namespace KBibTeX
EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name )
: TQWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) )
{
- setupGUI( parent, FALSE );
+ setupGUI( parent, false );
Settings * settings = Settings::self();
m_checkBoxEnableAll->setChecked( settings->editing_EnableAllFields );
@@ -85,8 +85,8 @@ namespace KBibTeX
m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
m_pushButtonIdSuggestions->setEnabled( !m_isReadOnly );
- connect( m_wqa, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
- connect( m_wqa, SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endExternalSearch( WebQuery::Status ) ) );
+ connect( m_wqa, TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
+ connect( m_wqa, TQ_SIGNAL( endSearch( WebQuery::Status ) ), this, TQ_SLOT( endExternalSearch( WebQuery::Status ) ) );
}
EntryWidget::EntryWidget( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name )
@@ -102,8 +102,8 @@ namespace KBibTeX
reset();
- connect( m_wqa, SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
- connect( m_wqa, SIGNAL( endSearch( WebQuery::Status ) ), this, SLOT( endExternalSearch( WebQuery::Status ) ) );
+ connect( m_wqa, TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( useExternalEntry( BibTeX::Entry*, bool ) ) );
+ connect( m_wqa, TQ_SIGNAL( endSearch( WebQuery::Status ) ), this, TQ_SLOT( endExternalSearch( WebQuery::Status ) ) );
}
EntryWidget::~EntryWidget()
@@ -113,7 +113,7 @@ namespace KBibTeX
delete m_wqa;
- TDEConfig * config = kapp->config();
+ TDEConfig * config = tdeApp->config();
config->setGroup( "EntryWidget" );
saveWindowSize( config );
}
@@ -125,7 +125,7 @@ namespace KBibTeX
if ( ewt != NULL )
ewt->m_fieldLineEditTitle->setFocus();
- TDEConfig * config = kapp->config();
+ TDEConfig * config = tdeApp->config();
config->setGroup( "EntryWidget" );
restoreWindowSize( config );
}
@@ -199,12 +199,12 @@ namespace KBibTeX
m_pushButtonForceDefaultIdSuggestion->setOn( m_defaultIdSuggestionAvailable && settings->idSuggestions_forceDefault && m_isNew );
m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
- bool foundEntryType = FALSE;
+ bool foundEntryType = false;
for ( int i = 0; !foundEntryType && i < m_comboBoxEntryType->count(); i++ )
if (( BibTeX::Entry::EntryType ) i + BibTeX::Entry::etArticle == entry->entryType() )
{
m_comboBoxEntryType->setCurrentItem( i );
- foundEntryType = TRUE;
+ foundEntryType = true;
}
if ( !foundEntryType )
m_comboBoxEntryType->setCurrentText( entry->entryTypeString() );
@@ -217,7 +217,7 @@ namespace KBibTeX
void EntryWidget::slotForceDefaultIdSuggestion()
{
- m_isNew = FALSE;
+ m_isNew = false;
m_lineEditID->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() );
m_pushButtonIdSuggestions->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() && !m_isReadOnly );
updateWarnings();
@@ -241,10 +241,10 @@ namespace KBibTeX
( *it ) ->apply( &temporaryEntry );
m_sourcePage->reset( &temporaryEntry );
- m_comboBoxEntryType->setEnabled( FALSE );
- m_lineEditID->setEnabled( FALSE );
- m_pushButtonIdSuggestions->setEnabled( FALSE );
- m_pushButtonForceDefaultIdSuggestion->setEnabled( FALSE );
+ m_comboBoxEntryType->setEnabled( false );
+ m_lineEditID->setEnabled( false );
+ m_pushButtonIdSuggestions->setEnabled( false );
+ m_pushButtonForceDefaultIdSuggestion->setEnabled( false );
}
else if ( m_lastPage == m_sourcePage )
{
@@ -276,7 +276,7 @@ namespace KBibTeX
updateWarnings();
}
- m_comboBoxEntryType->setEnabled( TRUE );
+ m_comboBoxEntryType->setEnabled( true );
m_lineEditID->setEnabled( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() );
m_pushButtonIdSuggestions->setEnabled(( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ) && !m_isReadOnly );
m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable );
@@ -313,7 +313,7 @@ namespace KBibTeX
// in the top row on the left, put an entry type label and combobox
TQLabel *label = new TQLabel( i18n( "E&ntry Type:" ), this );
layout->addWidget( label, 0, 0 );
- m_comboBoxEntryType = new TQComboBox( TRUE, this, "m_comboBoxEntryType" );
+ m_comboBoxEntryType = new TQComboBox( true, this, "m_comboBoxEntryType" );
label->setBuddy( m_comboBoxEntryType );
m_comboBoxEntryType->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed );
m_comboBoxEntryType->setEnabled( !m_isReadOnly );
@@ -331,12 +331,12 @@ namespace KBibTeX
m_pushButtonIdSuggestions = new TQPushButton( TQIconSet( BarIcon( "wizard" ) ), "", this, "m_pushButtonIdSuggestions" );
m_menuIdSuggestions = new TQPopupMenu( m_pushButtonIdSuggestions );
- connect( m_menuIdSuggestions, SIGNAL( activated( int ) ), this, SLOT( insertIdSuggestion( int ) ) );
+ connect( m_menuIdSuggestions, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( insertIdSuggestion( int ) ) );
m_pushButtonIdSuggestions->setPopup( m_menuIdSuggestions );
layout->addWidget( m_pushButtonIdSuggestions, 0, 4 );
m_pushButtonForceDefaultIdSuggestion = new TQPushButton( TQIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" );
- m_pushButtonForceDefaultIdSuggestion->setToggleButton( TRUE );
+ m_pushButtonForceDefaultIdSuggestion->setToggleButton( true );
layout->addWidget( m_pushButtonForceDefaultIdSuggestion, 0, 5 );
TQToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) );
TQWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) );
@@ -352,7 +352,7 @@ namespace KBibTeX
m_pushButtonRefetch = new TQPushButton( TDEGlobal::iconLoader() ->loadIconSet( "reload", TDEIcon::Small ), i18n( "Refetch" ), this );
layout->addWidget( m_pushButtonRefetch, 2, 5 );
- connect( m_pushButtonRefetch, SIGNAL( clicked() ), this, SLOT( refreshFromURL() ) );
+ connect( m_pushButtonRefetch, TQ_SIGNAL( clicked() ), this, TQ_SLOT( refreshFromURL() ) );
if ( showWarnings )
{
@@ -361,21 +361,21 @@ namespace KBibTeX
m_listViewWarnings->addColumn( i18n( "Message" ) );
m_listViewWarnings->setAllColumnsShowFocus( true );
layout->addMultiCellWidget( m_listViewWarnings, 3, 3, 0, 5 );
- connect( m_listViewWarnings, SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), this, SLOT( warningsExecute( TQListViewItem* ) ) );
+ connect( m_listViewWarnings, TQ_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), this, TQ_SLOT( warningsExecute( TQListViewItem* ) ) );
}
else
m_listViewWarnings = NULL;
- connect( m_checkBoxEnableAll, SIGNAL( toggled( bool ) ), this, SLOT( slotEnableAllFields( ) ) );
- connect( m_comboBoxEntryType, SIGNAL( activated( int ) ), this, SLOT( slotEntryTypeChanged( ) ) );
- connect( m_pushButtonForceDefaultIdSuggestion, SIGNAL( toggled( bool ) ), this, SLOT( slotForceDefaultIdSuggestion() ) );
- connect( m_comboBoxEntryType, SIGNAL( textChanged( const TQString & ) ), this, SLOT( slotEntryTypeChanged() ) );
- connect( m_tabWidget, SIGNAL( currentChanged( TQWidget* ) ), this, SLOT( slotCurrentPageChanged( TQWidget* ) ) );
- connect( parent, SIGNAL( okClicked() ), this, SLOT( apply() ) );
- connect( m_menuIdSuggestions, SIGNAL( aboutToShow() ), this, SLOT( updateIdSuggestionsMenu() ) );
+ connect( m_checkBoxEnableAll, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotEnableAllFields( ) ) );
+ connect( m_comboBoxEntryType, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( slotEntryTypeChanged( ) ) );
+ connect( m_pushButtonForceDefaultIdSuggestion, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotForceDefaultIdSuggestion() ) );
+ connect( m_comboBoxEntryType, TQ_SIGNAL( textChanged( const TQString & ) ), this, TQ_SLOT( slotEntryTypeChanged() ) );
+ connect( m_tabWidget, TQ_SIGNAL( currentChanged( TQWidget* ) ), this, TQ_SLOT( slotCurrentPageChanged( TQWidget* ) ) );
+ connect( parent, TQ_SIGNAL( okClicked() ), this, TQ_SLOT( apply() ) );
+ connect( m_menuIdSuggestions, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( updateIdSuggestionsMenu() ) );
m_updateWarningsTimer = new TQTimer( this );
- connect( m_updateWarningsTimer, SIGNAL( timeout() ), this, SLOT( updateWarnings() ) );
+ connect( m_updateWarningsTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( updateWarnings() ) );
if ( !m_isReadOnly )
m_updateWarningsTimer->start( 500 );
}
@@ -534,7 +534,7 @@ namespace KBibTeX
m_idToSuggestion.insert( m_menuIdSuggestions->insertItem( *it ), *it );
if ( m_idToSuggestion.count() == 0 )
- m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), FALSE );
+ m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), false );
}
void EntryWidget::insertIdSuggestion( int id )
@@ -548,7 +548,7 @@ namespace KBibTeX
int scnum = TQApplication::desktop()->screenNumber( parentWidget() );
TQRect desk = TQApplication::desktop()->screenGeometry( scnum );
int w, h;
-#if defined Q_WS_X11
+#if defined TQ_WS_X11
// save maximalization as desktop size + 1 in that direction
KWin::WindowInfo info = KWin::windowInfo( m_dlgParent->winId(), NET::WMState );
w = info.state() & NET::MaxHoriz ? desk.width() + 1 : m_dlgParent->width();
@@ -600,7 +600,7 @@ namespace KBibTeX
}
if ( !size.isEmpty() )
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
int state = ( size.width() > desk.width() ? NET::MaxHoriz : 0 )
| ( size.height() > desk.height() ? NET::MaxVert : 0 );
if (( state & NET::Max ) == NET::Max )