• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

ZModemDialog.cpp

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries
00002  *  Copyright 2002 Waldo Bastian <bastian@kde.org>
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License version 2 as published by the Free Software Foundation;
00007  *
00008  *  This library is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  *  Library General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU Library General Public License
00014  *  along with this library; see the file COPYING.LIB.  If not, write to
00015  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  *  Boston, MA 02110-1301, USA.
00017  **/
00018 
00019 // Own 
00020 #include "ZModemDialog.h"
00021 
00022 // KDE
00023 #include <KLocale>
00024 #include <KTextEdit>
00025 
00026 using namespace Konsole;
00027 
00028 ZModemDialog::ZModemDialog(QWidget *parent, bool modal, const QString &caption)
00029  : KDialog( parent )
00030 {
00031   setObjectName( "zmodem_progress" );
00032   setModal( modal );
00033   setCaption( caption );
00034   setButtons( User1|Close );
00035   setButtonGuiItem( User1, KGuiItem(i18n("&Stop")) );
00036 
00037   setDefaultButton( User1 );
00038   setEscapeButton(User1);
00039 
00040   showButtonSeparator( true );
00041   enableButton(Close, false);
00042   _textEdit = new KTextEdit(this);
00043   _textEdit->setMinimumSize(400, 100);
00044   _textEdit->setReadOnly(true);
00045   setMainWidget(_textEdit);
00046   connect(this, SIGNAL(user1Clicked()), this, SLOT(slotClose()));
00047   connect(this,SIGNAL(closeClicked()),this,SLOT(slotClose()));
00048 }
00049 
00050 void ZModemDialog::addProgressText(const QString &txt)
00051 {
00052   QTextCursor cursor = _textEdit->textCursor();
00053 
00054   cursor.insertBlock();
00055   cursor.insertText(txt);
00056 }
00057 
00058 void ZModemDialog::transferDone()
00059 {
00060   enableButton(Close, true);
00061   enableButton(User1, false);
00062 }
00063 
00064 void ZModemDialog::slotClose()
00065 {
00066   delayedDestruct();
00067   accept();
00068 }
00069 
00070 #include "ZModemDialog.moc"

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal