TDE frontend for streamripper
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

addnewstreamimpl.cpp 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /***************************************************************************
  2. * Copyright (C) 2003-2005 by Michael Goettsche *
  3. * mail@tuxipuxi.org *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write to the *
  17. * Free Software Foundation, Inc., *
  18. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. #include <tdemessagebox.h>
  21. #include <tqpushbutton.h>
  22. #include <tqlineedit.h>
  23. #include "addnewstreamimpl.h"
  24. AddNewStreamImpl::AddNewStreamImpl( TQWidget* parent, const char* name )
  25. : AddNewStream( parent,name, true )
  26. {
  27. connect( d_okButton, TQT_SIGNAL( clicked()), this, TQT_SLOT( okButtonClicked()) );
  28. connect( d_cancelButton, TQT_SIGNAL( clicked()), this, TQT_SLOT( cancelButtonClicked()) );
  29. }
  30. AddNewStreamImpl::~AddNewStreamImpl()
  31. {
  32. }
  33. //SLOTS
  34. void AddNewStreamImpl::okButtonClicked()
  35. {
  36. if( d_nameEdit->text() != "" && d_urlEdit->text() != "")
  37. {
  38. emit finished( this );
  39. this->close();
  40. }
  41. else
  42. {
  43. KMessageBox::error( this, "You forgot to fill out one or more fields, please do it now.",
  44. "Missing Information" );
  45. }
  46. }
  47. void AddNewStreamImpl::cancelButtonClicked()
  48. {
  49. this->close();
  50. }
  51. #include "addnewstreamimpl.moc"