mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-10-23 23:55:42 +00:00
20 lines
591 B
C++
20 lines
591 B
C++
#pragma once
|
|
#include <QtCore/QString>
|
|
#include <initializer_list>
|
|
#include <optional>
|
|
|
|
class QTableView;
|
|
|
|
namespace QtUtils {
|
|
|
|
/// Resizes columns of the table view to at the specified widths. A width of -1 will stretch the column to use the
|
|
/// remaining space.
|
|
void ResizeColumnsForTableView(QTableView* view, const std::initializer_list<int>& widths);
|
|
|
|
/// Returns a string identifier for a Qt key ID.
|
|
QString GetKeyIdentifier(int key);
|
|
|
|
/// Returns the integer Qt key ID for an identifier.
|
|
std::optional<int> GetKeyIdForIdentifier(const QString& key_identifier);
|
|
|
|
} // namespace QtUtils
|