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

kio/kio

  • kio
  • kio
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 <klocale.h>
24 
25 #include <tqlayout.h>
26 #include <tqlabel.h>
27 #include <tqcombobox.h>
28 #include <tqapplication.h>
29 #include <tqclipboard.h>
30 
31 KIO::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, TQT_SIGNAL( textChanged( const TQString & ) ),
57  // TQT_SLOT( slotEditTextChanged( const TQString & ) ) );
58  //connect( this, TQT_SIGNAL( user1Clicked() ), m_lineEdit, TQT_SLOT( clear() ) );
59 
60  //slotEditTextChanged( value );
61  setMinimumWidth( 350 );
62 
63  m_clipboardChanged = false;
64  if ( clipboard )
65  connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
66  this, TQT_SLOT( slotClipboardDataChanged() ) );
67 }
68 
69 void KIO::PasteDialog::slotClipboardDataChanged()
70 {
71  m_clipboardChanged = true;
72 }
73 
74 TQString KIO::PasteDialog::lineEditText() const
75 {
76  return m_lineEdit->text();
77 }
78 
79 int KIO::PasteDialog::comboItem() const
80 {
81  return m_comboBox->currentItem();
82 }
83 
84 #include "pastedialog.moc"

kio/kio

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

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |