OpenMS GUI
3.7.0-pre-nightly-2026-11-12
TOPPView, TOPPAS, INIFileEditor and the OpenMS_GUI library
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
InputFileList.h
Go to the documentation of this file.
1
// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2
// SPDX-License-Identifier: BSD-3-Clause
3
//
4
// --------------------------------------------------------------------------
5
// $Maintainer: Chris Bielow $
6
// $Authors: Chris Bielow $
7
// --------------------------------------------------------------------------
8
9
#pragma once
10
11
#include <OpenMS/DATASTRUCTURES/ListUtils.h>
12
#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13
14
#include <QWidget>
15
16
namespace
Ui
17
{
18
class
InputFileList
;
19
}
20
21
namespace
OpenMS
22
{
23
namespace
Internal
24
{
30
class
InputFileList
:
public
QWidget
31
{
32
Q_OBJECT
33
34
public
:
36
explicit
InputFileList
(
QWidget
* parent =
nullptr
);
37
~InputFileList
();
39
void
dragEnterEvent
(QDragEnterEvent* e)
override
;
41
void
dropEvent
(QDropEvent* e)
override
;
42
void
dragMoveEvent
(QDragMoveEvent* pEvent)
override
;
43
45
void
getFilenames
(QStringList& files)
const
;
47
StringList
getFilenames
()
const
;
49
void
setFilenames
(
const
QStringList& files);
50
52
const
QString&
getCWD
()
const
;
54
void
setCWD
(
const
QString& cwd,
bool
force =
false
);
55
57
void
keyPressEvent
(QKeyEvent* e)
override
;
58
59
public
slots:
60
62
void
showFileDialog
();
64
void
removeSelected
();
66
void
removeAll
();
68
void
editCurrentItem
();
69
70
signals:
72
void
updatedCWD
(QString new_cwd);
73
74
protected
:
76
void
addFiles_
(
const
QStringList& files);
77
79
void
updateCWD_
();
80
81
82
QString
cwd_
;
83
84
private
:
85
Ui::InputFileList *
ui_
;
86
};
87
}
// ns Internal
88
}
// ns OpenMS
89
90
// this is required to allow parent widgets (auto UIC'd from .ui) to have a InputFileList member
91
using
InputFileList
=
OpenMS::Internal::InputFileList
;
OpenMS::Internal::InputFileList
A widget shows a list of input files (i.e. existing files on a mounted drive), which allows adding/re...
Definition
InputFileList.h:31
OpenMS::Internal::InputFileList::getCWD
const QString & getCWD() const
get the CWD (according to most recently added file)
OpenMS::Internal::InputFileList::dropEvent
void dropEvent(QDropEvent *e) override
support drag'n'drop of files from OS window manager
OpenMS::Internal::InputFileList::editCurrentItem
void editCurrentItem()
Shows a TOPPASInputFileDialog which edits the current item.
OpenMS::Internal::InputFileList::getFilenames
void getFilenames(QStringList &files) const
Stores the list of all filenames in the list widget in files.
OpenMS::Internal::InputFileList::~InputFileList
~InputFileList()
OpenMS::Internal::InputFileList::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *e) override
support drag'n'drop of files from OS window manager
OpenMS::Internal::InputFileList::keyPressEvent
void keyPressEvent(QKeyEvent *e) override
support Ctrl+C to copy currently selected items to clipboard
OpenMS::Internal::InputFileList::setFilenames
void setFilenames(const QStringList &files)
Set the list of all filenames in the list widget.
OpenMS::Internal::InputFileList::InputFileList
InputFileList(QWidget *parent=nullptr)
C'tor.
OpenMS::Internal::InputFileList::updateCWD_
void updateCWD_()
updates the CWD, based on the last file in the current list
OpenMS::Internal::InputFileList::addFiles_
void addFiles_(const QStringList &files)
add files to the list, and update 'cwd_' by using the path of the last filename
OpenMS::Internal::InputFileList::updatedCWD
void updatedCWD(QString new_cwd)
emitted when a new file is added (by drag'n'drop or 'Add..' button)
OpenMS::Internal::InputFileList::removeAll
void removeAll()
Removes all files from the list.
OpenMS::Internal::InputFileList::showFileDialog
void showFileDialog()
Lets the user select files via a file dialog.
OpenMS::Internal::InputFileList::cwd_
QString cwd_
current working dir, i.e. the last position a file was added from
Definition
InputFileList.h:82
OpenMS::Internal::InputFileList::getFilenames
StringList getFilenames() const
Stores the list of all filenames in the list widget in files.
OpenMS::Internal::InputFileList::setCWD
void setCWD(const QString &cwd, bool force=false)
set the current working directory (for opening files), but only if the current input list is not alre...
OpenMS::Internal::InputFileList::ui_
Ui::InputFileList * ui_
Definition
InputFileList.h:85
OpenMS::Internal::InputFileList::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *pEvent) override
OpenMS::Internal::InputFileList::removeSelected
void removeSelected()
Removes all currently selected files from the list.
QWidget
OpenMS
Definition
Annotation1DCaret.h:23
Ui
Definition
DataFilterDialog.h:20
OpenMS
VISUAL
InputFileList.h
Generated by
1.9.8