add a remove all jobs button
authorwhiting <whiting@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Mon, 9 Feb 2009 17:52:52 +0000 (9 17:52 +0000)
committerwhiting <whiting@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>
Mon, 9 Feb 2009 17:52:52 +0000 (9 17:52 +0000)
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility@923904 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

kttsd/kttsjobmgr/kttsjobmgr.cpp
kttsd/kttsjobmgr/kttsjobmgr.h
kttsd/kttsjobmgr/kttsjobmgr.ui

index fa33d61..295435d 100644 (file)
@@ -3,8 +3,8 @@
   advance, change Talker, etc.
   -------------------
   Copyright : (C) 2004,2005 by Gary Cramblitt <[email protected]>
+  Copyright : (C) 2009 by Jeremy Whiting <[email protected]>
   -------------------
-  Current Maintainer: Gary Cramblitt <[email protected]>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -98,6 +98,7 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parentWidget, QObject *parent, const QSt
     m_jobButtons << m_ui->job_resume;
     m_jobButtons << m_ui->job_restart;
     m_jobButtons << m_ui->job_remove;
+    m_jobButtons << m_ui->job_removeall;
     m_jobButtons << m_ui->job_later;
     m_jobButtons << m_ui->job_prevsentence;
     m_jobButtons << m_ui->job_nextsentence;
@@ -111,6 +112,8 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parentWidget, QObject *parent, const QSt
     connect (m_ui->job_restart, SIGNAL(clicked()), this, SLOT(slot_job_restart()));
     m_ui->job_remove->setIcon(KIcon("user-trash"));
     connect (m_ui->job_remove, SIGNAL(clicked()), this, SLOT(slot_job_remove()));
+    m_ui->job_removeall->setIcon(KIcon("user-trash"));
+    connect (m_ui->job_removeall, SIGNAL(clicked()), this, SLOT(slot_job_remove_all()));
     m_ui->job_later->setIcon(KIcon("go-down"));
     connect (m_ui->job_later, SIGNAL(clicked()), this, SLOT(slot_job_move()));
 
@@ -242,6 +245,12 @@ void KttsJobMgrPart::slot_job_remove()
     }
 }
 
+void KttsJobMgrPart::slot_job_remove_all()
+{
+    m_kspeech->removeAllJobs();
+    m_ui->m_currentSentence->clear();
+}
+
 void KttsJobMgrPart::slot_job_move()
 {
     int jobNum = getCurrentJobNum();
index 5d2d089..608b901 100644 (file)
@@ -3,8 +3,8 @@
   advance, change Talker, etc. 
   -------------------
   Copyright : (C) 2004 by Gary Cramblitt <[email protected]>
+  Copyright : (C) 2009 by Jeremy Whiting <[email protected]>
   -------------------
-  Current Maintainer: Gary Cramblitt <[email protected]>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -102,6 +102,7 @@ private slots:
     void slot_job_resume();
     void slot_job_restart();
     void slot_job_remove();
+    void slot_job_remove_all();
     void slot_job_move();
     void slot_job_change_talker();
     void slot_speak_clipboard();
index c3524b5..9ce7346 100644 (file)
@@ -5,7 +5,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>490</width>
+    <width>538</width>
     <height>448</height>
    </rect>
   </property>
@@ -35,7 +35,7 @@
        <bool>false</bool>
       </property>
      </widget>
-     <widget class="QWidget" name="" >
+     <widget class="QWidget" name="layoutWidget" >
       <layout class="QVBoxLayout" name="verticalLayout" >
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout" >
           </widget>
          </item>
          <item>
+          <widget class="KPushButton" name="job_removeall" >
+           <property name="text" >
+            <string>Remove &amp;All</string>
+           </property>
+          </widget>
+         </item>
+         <item>
           <widget class="KPushButton" name="job_later" >
            <property name="whatsThis" >
             <string>&lt;p>Moves a job downward in the list so that it will be spoken later.  If the job is currently speaking, its state changes to Paused.&lt;/p></string>