~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to arts/builder/retrievedlg.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
    You should have received a copy of the GNU General Public License
17
17
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
19
 
20
20
    */
21
21
 
24
24
#include <qlabel.h>
25
25
#include <qlistbox.h>
26
26
#include <kbuttonbox.h>
27
 
#include <qbttngrp.h>
28
 
#include <qradiobt.h>
29
 
#include <qlined.h>
30
 
#include <kapp.h>
 
27
#include <qbuttongroup.h>
 
28
#include <qradiobutton.h>
 
29
#include <qlineedit.h>
 
30
#include <kapplication.h>
31
31
#include <kseparator.h>
 
32
#include <klocale.h>
 
33
#include <kstdguiitem.h>
32
34
#include <stdio.h>
33
35
#include <set>
34
36
#include <arts/debug.h>
 
37
#include <qpushbutton.h>
35
38
 
36
 
#ifndef KDE_USE_FINAL
37
39
static void min_size(QWidget *w) {
38
40
  w->setMinimumSize(w->sizeHint());
39
 
40
 
#endif
 
41
}
41
42
 
42
43
RetrieveDlg::RetrieveDlg(QWidget *parent) :QDialog(parent,"X", TRUE)
43
44
{
44
 
        setCaption(i18n("Retrieve structure from server"));
 
45
        setCaption(i18n("Retrieve Structure From Server"));
45
46
 
46
47
        QVBoxLayout *mainlayout = new QVBoxLayout(this);
47
48
 
80
81
                names.insert(structures[i]->Name());
81
82
 
82
83
        set<string>::iterator ni;
83
 
        for(ni=names.begin();ni!=names.end();ni++)
 
84
        for(ni=names.begin();ni!=names.end();++ni)
84
85
                listbox->insertItem((*ni).c_str());
85
86
#endif
86
87
 
103
104
        buttonlayout->addSpacing(5);
104
105
        KButtonBox *bbox = new KButtonBox(this);
105
106
 
106
 
        bbox->addButton(i18n("Help"));
 
107
        bbox->addButton(KStdGuiItem::help(), this, SLOT( help() ));
107
108
        bbox->addStretch(1);
108
109
 
109
 
        QButton *cancelbutton = bbox->addButton(i18n("Cancel"));
 
110
        QButton *cancelbutton = bbox->addButton(KStdGuiItem::cancel());
110
111
        connect( cancelbutton, SIGNAL( clicked() ), SLOT(reject() ) );
111
112
 
112
 
        QButton *okbutton = bbox->addButton(i18n("Okay"));
 
113
        QButton *okbutton = bbox->addButton(KStdGuiItem::ok());
113
114
        connect( okbutton, SIGNAL( clicked() ), SLOT(accept() ) );
114
115
 
115
116
        bbox->layout();
118
119
        buttonlayout->addSpacing(5);
119
120
 
120
121
        mainlayout->freeze();
121
 
};
 
122
}
122
123
 
123
 
const char * RetrieveDlg::result()
 
124
QString RetrieveDlg::result()
124
125
{
125
126
        if(listbox->currentItem() != -1)
126
127
        {
127
128
                return(listbox->text(listbox->currentItem()));
128
129
        }
129
 
        return(0);
 
130
        return QString::null;
 
131
}
 
132
 
 
133
void RetrieveDlg::help()
 
134
{
 
135
        KApplication::kApplication()->invokeHelp("", "karts");
130
136
}
131
137
#include "retrievedlg.moc"