19 #include "pastedialog.h"
21 #include <klineedit.h>
22 #include <kmimetype.h>
23 #include <tdelocale.h>
27 #include <tqcombobox.h>
28 #include <tqapplication.h>
29 #include <tqclipboard.h>
31 TDEIO::PasteDialog::PasteDialog(
const TQString &caption,
const TQString &label,
32 const TQString &value,
const TQStringList& items,
35 : KDialogBase( parent, 0 , true, caption, Ok|Cancel, Ok, true )
37 TQFrame *frame = makeMainWidget();
38 TQVBoxLayout *layout =
new TQVBoxLayout( frame, 0, spacingHint() );
40 m_label =
new TQLabel( label, frame );
41 layout->addWidget( m_label );
43 m_lineEdit =
new KLineEdit( value, frame );
44 layout->addWidget( m_lineEdit );
46 m_lineEdit->setFocus();
47 m_label->setBuddy( m_lineEdit );
49 layout->addWidget(
new TQLabel( i18n(
"Data format:" ), frame ) );
50 m_comboBox =
new TQComboBox( frame );
51 m_comboBox->insertStringList( items );
52 layout->addWidget( m_comboBox );
61 setMinimumWidth( 350 );
63 m_clipboardChanged =
false;
65 connect( TQApplication::clipboard(), TQ_SIGNAL( dataChanged() ),
66 this, TQ_SLOT( slotClipboardDataChanged() ) );
69 void TDEIO::PasteDialog::slotClipboardDataChanged()
71 m_clipboardChanged =
true;
74 TQString TDEIO::PasteDialog::lineEditText()
const
76 return m_lineEdit->text();
79 int TDEIO::PasteDialog::comboItem()
const
81 return m_comboBox->currentItem();
84 #include "pastedialog.moc"