• Skip to content
  • Skip to link menu
KDE 4.1 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 // Qt
00023 #include <QtGui/QTextEdit>
00024 
00025 // KDE
00026 #include <KLocale>
00027 
00028 using namespace Konsole;
00029 
00030 ZModemDialog::ZModemDialog(QWidget *parent, bool modal, const QString &caption)
00031  : KDialog( parent )
00032 {
00033   setObjectName( "zmodem_progress" );
00034   setModal( modal );
00035   setCaption( caption );
00036   setButtons( User1|Close );
00037   setButtonGuiItem( User1, KGuiItem(i18n("&Stop")) );
00038 
00039   setDefaultButton( User1 );
00040   setEscapeButton(User1);
00041 
00042   showButtonSeparator( true );
00043   enableButton(Close, false);
00044   _textEdit = new QTextEdit(this);
00045   _textEdit->setMinimumSize(400, 100);
00046   _textEdit->setReadOnly(true);
00047   setMainWidget(_textEdit);
00048   connect(this, SIGNAL(user1Clicked()), this, SLOT(slotClose()));
00049   connect(this,SIGNAL(closeClicked()),this,SLOT(slotClose()));
00050 }
00051 
00052 void ZModemDialog::addProgressText(const QString &txt)
00053 {
00054   QTextCursor cursor = _textEdit->textCursor();
00055 
00056   cursor.insertBlock();
00057   cursor.insertText(txt);
00058 }
00059 
00060 void ZModemDialog::transferDone()
00061 {
00062   enableButton(Close, true);
00063   enableButton(User1, false);
00064 }
00065 
00066 void ZModemDialog::slotClose()
00067 {
00068   delayedDestruct();
00069   accept();
00070 }
00071 
00072 #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.4
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