/usr/include/tulip/StringsListSelectionDialog.h is in libtulip-dev 4.8.0dfsg-2build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | /*
*
* This file is part of Tulip (www.tulip-software.org)
*
* Authors: David Auber and the Tulip development Team
* from LaBRI, University of Bordeaux
*
* Tulip is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* Tulip is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
*/
///@cond DOXYGEN_HIDDEN
#ifndef STRINGSLISTSELECTIONDIALOG_H
#define STRINGSLISTSELECTIONDIALOG_H
#include <QDialog>
#include <tulip/tulipconf.h>
#include <tulip/StringsListSelectionWidget.h>
namespace Ui {
class StringsListSelectionDialog;
}
namespace tlp {
/**
* @brief Provide a dialog that allow user to select a list of strings.
*
* The easiest way to use this class is to use the static function.
* @code
* QString title;
* QWidget* parent;
* vector<string> listOfStrings; // must be initialized
* vector<string> selectedStrings;
* bool choosen = StringsListSelectionDialog::choose(title, parent, listOfStrings, selectedStrings);
* @endcode
*
*
**/
class TLP_QT_SCOPE StringsListSelectionDialog : public QDialog {
Q_OBJECT
public:
/**
* @brief Constructs a dialog with the given parent.
**/
explicit StringsListSelectionDialog(QWidget *parent = NULL);
/**
* set the look of the widget
* \param listType this parameter defines the widget's look (see class description)
*/
void setListType(const StringsListSelectionWidget::ListType listType);
/**
* sets the maximum size of the selected strings list
*/
void setMaxSelectedStringsListSize(const unsigned int maxSize);
/**
* sets the strings list and the already selected strings
*/
void setStringsList(const std::vector<std::string>& strList,
std::vector<std::string>& selList);
/**
* @brief Constructs a strings list selection dialog with the given parent.
* \param parent the widget's parent
* \param listType this parameter defines the widget's look (see class description)
* \param maxSelectedStringsListSize the maximum number of strings that can be selected (if 0, no size restriction)
**/
explicit StringsListSelectionDialog(QString title,
QWidget *parent = NULL,
const StringsListSelectionWidget::ListType listType = StringsListSelectionWidget::SIMPLE_LIST,
const unsigned int maxSelectedStringsListSize = 0);
~StringsListSelectionDialog();
/**
* @brief This is a convenience static function that create a dialog
* to select some strings in a list.
* The function creates a modal dialog with the given title and parent widget.
*
* @param title the string to display in the dialog title bar,
* @param strList the list of strings to choose,
* @param selList on input it indicates the already selected strings, then on output the user selected strings,
* @param listType the type of display for the strings to choose,
* @param maxSize the maximum number of strings to select. 0 means this number is not limited.
**/
static bool choose(QString title, const std::vector<std::string>& strList,
std::vector<std::string>& selList,
QWidget* parent=NULL,
const StringsListSelectionWidget::ListType listType =
StringsListSelectionWidget::SIMPLE_LIST,
const unsigned int maxSize = 0);
private:
Ui::StringsListSelectionDialog *ui;
};
}
#endif // STRINGSLISTSELECTIONDIALOG_H
///@endcond
|