summaryrefslogtreecommitdiffstats
path: root/src/entrywidgetsource.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-06-29 12:56:53 +0200
committerSlávek Banko <[email protected]>2013-07-04 03:11:35 +0200
commit5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch)
treec8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/entrywidgetsource.cpp
parent251c9a439759c830d34c70683d0fc9454d703010 (diff)
downloadkbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz
kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip
Initial TQt conversion
Diffstat (limited to 'src/entrywidgetsource.cpp')
-rw-r--r--src/entrywidgetsource.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/entrywidgetsource.cpp b/src/entrywidgetsource.cpp
index 27d95a6..f3f03d9 100644
--- a/src/entrywidgetsource.cpp
+++ b/src/entrywidgetsource.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qbuffer.h>
+#include <ntqlayout.h>
+#include <ntqtextedit.h>
+#include <ntqbuffer.h>
#include <kdialog.h>
#include <kpushbutton.h>
@@ -35,7 +35,7 @@
namespace KBibTeX
{
- EntryWidgetSource::EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, QWidget *parent, const char *name )
+ EntryWidgetSource::EntryWidgetSource( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name )
: EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_entry( NULL )
{
setupGUI();
@@ -53,17 +53,17 @@ namespace KBibTeX
bool EntryWidgetSource::containsValidText()
{
- BibTeX::Entry dummy( BibTeX::Entry::etArticle, "iaKWjDMVuB2vQDuYRK49Y85tyxa9" );
+ BibTeX::Entry dummy( BibTeX::Entry::etArticle, "iaKWjDMVuB2vTQDuYRK49Y85tyxa9" );
apply( &dummy );
- return dummy.id().compare( "iaKWjDMVuB2vQDuYRK49Y85tyxa9" ) != 0;
+ return dummy.id().compare( "iaKWjDMVuB2vTQDuYRK49Y85tyxa9" ) != 0;
}
- QString EntryWidgetSource::text()
+ TQString EntryWidgetSource::text()
{
return m_textEditSource->text();
}
- void EntryWidgetSource::setText( const QString& text )
+ void EntryWidgetSource::setText( const TQString& text )
{
m_textEditSource->setText( text );
}
@@ -76,12 +76,12 @@ namespace KBibTeX
void EntryWidgetSource::apply( BibTeX::Entry *entry )
{
Settings * settings = Settings::self();
- QBuffer buffer;
+ TQBuffer buffer;
BibTeX::FileImporterBibTeX importer( settings->editing_FirstNameFirst );
buffer.open( IO_WriteOnly );
- QTextStream ts( &buffer );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &buffer );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << m_textEditSource->text() << endl;
buffer.close();
@@ -113,7 +113,7 @@ namespace KBibTeX
Settings * settings = Settings::self();
- QBuffer buffer;
+ TQBuffer buffer;
BibTeX::FileExporterBibTeX exporter;
exporter.setEncoding( "latex" );
exporter.setStringDelimiter( settings->fileIO_BibtexStringOpenDelimiter, settings->fileIO_BibtexStringCloseDelimiter );
@@ -125,8 +125,8 @@ namespace KBibTeX
buffer.close();
buffer.open( IO_ReadOnly );
- QTextStream ts( &buffer );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &buffer );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
m_textEditSource->setText( ts.read() );
buffer.close();
}
@@ -136,18 +136,18 @@ namespace KBibTeX
reset( m_entry );
}
- void EntryWidgetSource::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, QListView * /*listViewWarnings*/ )
+ void EntryWidgetSource::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView * /*listViewWarnings*/ )
{
// nothing
}
void EntryWidgetSource::setupGUI()
{
- QGridLayout * gridLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
+ TQGridLayout * gridLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint(), "gridLayout" );
gridLayout->setRowStretch( 0, 5 );
gridLayout->setColStretch( 0, 5 );
- m_textEditSource = new QTextEdit( this );
+ m_textEditSource = new TQTextEdit( this );
gridLayout->addMultiCellWidget( m_textEditSource, 0, 0, 0, 1 );
m_textEditSource->setFont( KGlobalSettings::fixedFont() );
m_textEditSource->setReadOnly( m_isReadOnly );