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
InputFile.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
// OpenMS_GUI config
12
#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13
14
#include <QWidget>
15
16
namespace
Ui
17
{
18
class
InputFileTemplate;
19
}
20
21
namespace
OpenMS
22
{
29
class
OPENMS_GUI_DLLAPI
InputFile
:
30
public
QWidget
31
{
32
Q_OBJECT
33
public
:
35
InputFile
(
QWidget
* parent);
37
~InputFile
();
38
40
void
dragEnterEvent
(QDragEnterEvent* e)
override
;
42
void
dropEvent
(QDropEvent* e)
override
;
43
void
dragMoveEvent
(QDragMoveEvent* pEvent)
override
;
44
46
void
setFilename
(
const
QString& filename);
47
49
QString
getFilename
()
const
;
50
52
void
setFileFormatFilter
(
const
QString& fff);
53
55
const
QString&
getCWD
()
const
;
57
void
setCWD
(
const
QString& cwd,
bool
force =
false
);
58
59
signals:
61
void
updatedCWD
(QString new_cwd);
63
void
updatedFile
(QString new_path);
64
65
public
slots:
66
68
void
showFileDialog
();
69
70
71
protected
:
73
QString
file_format_filter_
;
75
QString
cwd_
;
76
77
private
:
78
Ui::InputFileTemplate*
ui_
;
79
};
80
81
}
OpenMS::InputFile
A simple widget with a line-edit and a browse button to choose filenames.
Definition
InputFile.h:31
OpenMS::InputFile::InputFile
InputFile(QWidget *parent)
Constructor.
OpenMS::InputFile::getCWD
const QString & getCWD() const
get the CWD (according to most recently added file)
OpenMS::InputFile::dropEvent
void dropEvent(QDropEvent *e) override
support drag'n'drop of files from OS window manager
OpenMS::InputFile::ui_
Ui::InputFileTemplate * ui_
Definition
InputFile.h:78
OpenMS::InputFile::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *e) override
support drag'n'drop of files from OS window manager
OpenMS::InputFile::setFileFormatFilter
void setFileFormatFilter(const QString &fff)
Users can only choose certain filetypes, e.g. "Transition sqLite file (*.pqp)".
OpenMS::InputFile::file_format_filter_
QString file_format_filter_
optional filter during file browsing
Definition
InputFile.h:73
OpenMS::InputFile::updatedCWD
void updatedCWD(QString new_cwd)
emitted when a new file is added (by drag'n'drop or 'Browse' button)
OpenMS::InputFile::showFileDialog
void showFileDialog()
Lets the user select the file via a file dialog.
OpenMS::InputFile::cwd_
QString cwd_
the current working directory according to the last file added
Definition
InputFile.h:75
OpenMS::InputFile::~InputFile
~InputFile()
Destructor.
OpenMS::InputFile::setFilename
void setFilename(const QString &filename)
Sets the text in the line-edit.
OpenMS::InputFile::updatedFile
void updatedFile(QString new_path)
emitted when a new file is added (by drag'n'drop or 'Browse' button)
OpenMS::InputFile::setCWD
void setCWD(const QString &cwd, bool force=false)
set the current working directory (for opening files). If the input is not empty, the cwd will not be...
OpenMS::InputFile::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *pEvent) override
OpenMS::InputFile::getFilename
QString getFilename() const
Returns the filename currently set in the line-edit.
QWidget
OpenMS
Definition
Annotation1DCaret.h:23
Ui
Definition
DataFilterDialog.h:20
OpenMS
VISUAL
InputFile.h
Generated by
1.9.8