• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
pastedialog.cpp
1 /* This file is part of the KDE libraries
2  Copyright (C) 2005 David Faure <faure@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "pastedialog.h"
20 
21 #include <klineedit.h>
22 #include <kmimetype.h>
23 #include <tdelocale.h>
24 
25 #include <tqlayout.h>
26 #include <tqlabel.h>
27 #include <tqcombobox.h>
28 #include <tqapplication.h>
29 #include <tqclipboard.h>
30 
31 TDEIO::PasteDialog::PasteDialog( const TQString &caption, const TQString &label,
32  const TQString &value, const TQStringList& items,
33  TQWidget *parent,
34  bool clipboard )
35  : KDialogBase( parent, 0 /*name*/, true, caption, Ok|Cancel, Ok, true )
36 {
37  TQFrame *frame = makeMainWidget();
38  TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
39 
40  m_label = new TQLabel( label, frame );
41  layout->addWidget( m_label );
42 
43  m_lineEdit = new KLineEdit( value, frame );
44  layout->addWidget( m_lineEdit );
45 
46  m_lineEdit->setFocus();
47  m_label->setBuddy( m_lineEdit );
48 
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 );
53 
54  layout->addStretch();
55 
56  //connect( m_lineEdit, TQ_SIGNAL( textChanged( const TQString & ) ),
57  // TQ_SLOT( slotEditTextChanged( const TQString & ) ) );
58  //connect( this, TQ_SIGNAL( user1Clicked() ), m_lineEdit, TQ_SLOT( clear() ) );
59 
60  //slotEditTextChanged( value );
61  setMinimumWidth( 350 );
62 
63  m_clipboardChanged = false;
64  if ( clipboard )
65  connect( TQApplication::clipboard(), TQ_SIGNAL( dataChanged() ),
66  this, TQ_SLOT( slotClipboardDataChanged() ) );
67 }
68 
69 void TDEIO::PasteDialog::slotClipboardDataChanged()
70 {
71  m_clipboardChanged = true;
72 }
73 
74 TQString TDEIO::PasteDialog::lineEditText() const
75 {
76  return m_lineEdit->text();
77 }
78 
79 int TDEIO::PasteDialog::comboItem() const
80 {
81  return m_comboBox->currentItem();
82 }
83 
84 #include "pastedialog.moc"

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.