Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
Loading...
Searching...
No Matches
compact_push_button.h
Go to the documentation of this file.
1
#ifndef COCKATRICE_COMPACT_PUSH_BUTTON_H
2
#define COCKATRICE_COMPACT_PUSH_BUTTON_H
3
4
#include <QIcon>
5
#include <QPushButton>
6
#include <QString>
7
#include <qtmetamacros.h>
8
9
class
QWidget;
10
11
class
CompactPushButton
:
public
QPushButton
12
{
13
Q_OBJECT
14
15
public
:
16
explicit
CompactPushButton
(QWidget *parent =
nullptr
);
17
18
void
setButtonText
(
const
QString &text);
19
20
void
setButtonIcon
(
const
QIcon &icon);
21
22
void
setCompact
(
bool
enabled);
23
24
int
expandedWidth
()
const
;
25
26
int
compactWidth
()
const
;
27
28
private
:
29
void
updateGeometryState
();
30
31
private
:
32
QString
fullText
;
33
bool
compact
=
false
;
34
};
35
36
#endif
// COCKATRICE_COMPACT_PUSH_BUTTON_H
CompactPushButton::fullText
QString fullText
Definition
compact_push_button.h:32
CompactPushButton::setCompact
void setCompact(bool enabled)
Definition
compact_push_button.cpp:36
CompactPushButton::setButtonIcon
void setButtonIcon(const QIcon &icon)
Definition
compact_push_button.cpp:31
CompactPushButton::setButtonText
void setButtonText(const QString &text)
Definition
compact_push_button.cpp:20
CompactPushButton::compactWidth
int compactWidth() const
Definition
compact_push_button.cpp:74
CompactPushButton::updateGeometryState
void updateGeometryState()
Definition
compact_push_button.cpp:49
CompactPushButton::compact
bool compact
Definition
compact_push_button.h:33
CompactPushButton::CompactPushButton
CompactPushButton(QWidget *parent=nullptr)
Definition
compact_push_button.cpp:7
CompactPushButton::expandedWidth
int expandedWidth() const
Definition
compact_push_button.cpp:67
cockatrice
src
interface
widgets
utility
compact_push_button.h
Generated by
1.18.0