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

KDEPrint

cupsaddsmb2.h

Go to the documentation of this file.
00001 /*
00002  *  This file is part of the KDE libraries
00003  *  Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License version 2 as published by the Free Software Foundation.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  **/
00019 
00020 #ifndef CUPSADDSMB_H
00021 #define CUPSADDSMB_H
00022 
00023 #include <QtCore/QObject>
00024 #include <QtCore/QStringList>
00025 #include <kprocess.h>
00026 #include <kdialog.h>
00027 
00028 class QProgressBar;
00029 class SidePixmap;
00030 class QPushButton;
00031 class QLabel;
00032 class KLineEdit;
00033 
00034 #ifdef __GNUC__
00035 #warning rename class or remove from global namespace
00036 #endif
00037 class CupsAddSmb : public KDialog
00038 {
00039     Q_OBJECT
00040 
00041 public:
00042     enum State { None, Start, MkDir, Copy, AddDriver, AddPrinter };
00043     explicit CupsAddSmb(QWidget *parent = 0, const char *name = 0);
00044     ~CupsAddSmb();
00045 
00046     static bool exportDest(const QString& dest, const QString& datadir);
00047 
00048 protected Q_SLOTS:
00049     void slotReceived();
00050     void doNextAction();
00051     void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
00052     void slotActionClicked();
00053 
00054 protected:
00055     void checkActionStatus();
00056     void nextAction();
00057     bool startProcess();
00058     bool doExport();
00059     bool doInstall();
00060     void showError(const QString& msg);
00061 
00062 private:
00063     KProcess m_proc;
00064     QString  m_procname;
00065     QStringList m_buffer;
00066     int  m_state;
00067     QStringList m_actions;
00068     int  m_actionindex;
00069     bool  m_status;
00070     QProgressBar *m_bar;
00071     QString  m_dest;
00072     SidePixmap *m_side;
00073     QPushButton *m_doit, *m_cancel;
00074     QLabel *m_text;
00075     QLabel *m_textinfo;
00076     KLineEdit *m_logined, *m_passwded, *m_servered;
00077     QString m_datadir;
00078 };
00079 
00080 #endif

KDEPrint

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

API Reference

Skip menu "API Reference"
  •   KDEPrint
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