• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Buildtool Widgets Library
 

KDevelop Buildtool Widgets Library

  • buildtools
  • lib
  • widgets
addfilesdialog.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2003 Alexander Dymo <cloudtemple@mksat.net>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#include <tdelocale.h>
20#include <tdeapplication.h>
21
22#include <tqcombobox.h>
23
24#include "addfilesdialog.h"
25#include "addfilesdialog.moc"
26
27AddFilesDialog::AddFilesDialog(const TQString& startDir, const TQString& filter,
28 TQWidget *parent, const char *name, bool modal):
29 KFileDialog(startDir, filter, parent, name, modal)
30{
31 TDEConfig *config = kapp->config();
32 config->setGroup("Add Files Dialog");
33
34 m_extraWidget = new TQComboBox(false, this);
35 m_extraWidget->insertItem(i18n("Copy File(s)"), 0);
36 m_extraWidget->insertItem(i18n("Create Symbolic Link(s)"), 1);
37 m_extraWidget->insertItem(i18n("Add Relative Path(s)"), 2);
38 m_extraWidget->setCurrentItem(config->readNumEntry("Mode"));
39 connect(m_extraWidget, TQ_SIGNAL(activated(int)), this, TQ_SLOT(storePreferred(int)));
40
41 setPreviewWidget(m_extraWidget);
42
43 setOperationMode(Opening);
44}
45
46
47AddFilesDialog::AddFilesDialog(const TQString& startDir, const TQString& filter,
48 TQWidget *parent, const char *name, bool modal, TQComboBox *extraWidget):
49 KFileDialog(startDir, filter, parent, name, modal, extraWidget), m_extraWidget(extraWidget)
50{
51 TDEConfig *config = kapp->config();
52 config->setGroup("Add Files Dialog");
53
54 m_extraWidget->insertItem(i18n("Copy File(s)"), 0);
55 m_extraWidget->insertItem(i18n("Create Symbolic Link(s)"), 1);
56 m_extraWidget->insertItem(i18n("Add Relative Path(s)"), 2);
57 m_extraWidget->setCurrentItem(config->readNumEntry("Mode"));
58 connect(m_extraWidget, TQ_SIGNAL(activated(int)), this, TQ_SLOT(storePreferred(int)));
59
60 setOperationMode(Opening);
61}
62
63
64AddFilesDialog::~AddFilesDialog()
65{
66}
67
68AddFilesDialog::Mode AddFilesDialog::mode( )
69{
70 return (AddFilesDialog::Mode)m_extraWidget->currentItem();
71}
72
73void AddFilesDialog::storePreferred( int index )
74{
75 TDEConfig *config = kapp->config();
76 config->setGroup("Add Files Dialog");
77 config->writeEntry("Mode", index);
78}

KDevelop Buildtool Widgets Library

Skip menu "KDevelop Buildtool Widgets Library"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDevelop Buildtool Widgets Library

Skip menu "KDevelop Buildtool Widgets Library"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Buildtool Widgets Library by doxygen 1.9.8
This website is maintained by Timothy Pearson.