コレクション
FlipView フリップビュー
ページのコレクションを 1 ページずつめくって表示できます。
サンプル
プロパティプレビューを読み込めませんでした。もう一度「プロパティプレビュー」を選択して再試行してください。

使い方
FlipView フォトギャラリー
addPage() でページを追加し、setShowPageIndicator(true) でページインジケーターのドットを表示します。ホバーすると移動可能な方向の矢印が表示され、スワイプやキーボード操作でもページを切り替えられます。
#include <FluentQt/Collections.h>
using namespace fluent::collections;
auto* flipView = new FlipView(this);
flipView->addPage(sunrisePhoto);
flipView->addPage(oceanPhoto);
flipView->addPage(forestPhoto);
flipView->setShowPageIndicator(true);import fluentqt
flip_view = fluentqt.FlipView()
flip_view.addOwnedPage(sunrise_photo)
flip_view.addOwnedPage(ocean_photo)
flip_view.addOwnedPage(forest_photo)
flip_view.setShowPageIndicator(True)API
宣言を表示一致する API メンバーはありません。
fluent::collections::FlipView
継承元 QWidget · FluentElement · QMLPlus
一度に 1 つの QWidget ページを表示するカルーセルコンテナーです。ナビゲーションボタン、水平/垂直スライド遷移、ホイール/トラックパッドジェスチャ、ページドットに対応しています。
コンストラクタ
デストラクタ
メソッド
bool addPage(QWidget* page, WidgetOwnership ownership)WidgetOwnership による破棄モードを明示してページウィジェットを末尾に追加します。
bool insertPage(int index, QWidget* page, WidgetOwnership ownership)明示的な WidgetOwnership 破棄モードを指定して、index の位置にページウィジェットを挿入します。
void removePage(int index)互換用の削除メソッドです。ページを削除せずに切り離します。
bool releasePage(int index)index のページを削除し、その WidgetOwnership モードに従って破棄または返却します。
QWidget* takePage(int index)index のページを破棄せずに削除して返します。
WidgetOwnership pageOwnershipAt(int index) constindex のページに設定されている破棄モードを返します。
int currentIndex() const現在表示されているページのインデックス(空の場合は -1)。
void setCurrentIndex(int index)現在表示されているページのインデックス(空の場合は -1)。
Qt::Orientation orientation() constナビゲーションおよびスライド方向(Horizontal または Vertical)。
void setOrientation(Qt::Orientation orientation)ナビゲーションおよびスライド方向(Horizontal または Vertical)。
bool showPageIndicator() constページインジケーターのドットが表示されるかどうか。
void setShowPageIndicator(bool show)ページインジケーターのドットが表示されるかどうか。
qreal slideOffset() const現在のスライドトランジションのオフセット(ピクセル単位)。
void setSlideOffset(qreal offset)現在のスライドトランジションのオフセット(ピクセル単位)。
プロパティ
int currentIndex現在表示されているページのインデックス(空の場合は -1)。
読み取りcurrentIndex()書き込みsetCurrentIndex()通知シグナルcurrentIndexChanged()Qt::Orientation orientationナビゲーションおよびスライド方向(Horizontal または Vertical)。
読み取りorientation()書き込みsetOrientation()通知シグナルorientationChanged()bool showPageIndicatorページインジケーターのドットが表示されるかどうか。
読み取りshowPageIndicator()書き込みsetShowPageIndicator()通知シグナルshowPageIndicatorChanged()qreal slideOffset現在のスライドトランジションのオフセット(ピクセル単位)。
読み取りslideOffset()書き込みsetSlideOffset()
シグナル
void currentIndexChanged(int index)現在表示されているページのインデックス(空の場合は -1)。
void orientationChanged()ナビゲーションおよびスライド方向(Horizontal または Vertical)。
void showPageIndicatorChanged()ページインジケーターのドットが表示されるかどうか。
PySide6 拡張
addOwnedPage(page)FlipView の末尾にページを追加します。取り外すとページは削除されます。
addBorrowedPage(page)FlipView の末尾にページを追加します。取り外したページは親を持ちません。
addReparentedPage(page)末尾にページを追加します。取り外すと追加前の親 QWidget に戻ります。
insertOwnedPage(index, page)FlipView にページを挿入します。取り外すとページは削除されます。
insertBorrowedPage(index, page)FlipView にページを挿入します。取り外したページは親を持ちません。
insertReparentedPage(index, page)ページを挿入します。取り外すと挿入前の親 QWidget に戻ります。
protected メンバー
メソッド
fluent::FluentElement から継承
列挙型
enum Themeデザイントークン解決時に使用されるグローバルな視覚テーマ。
Light = 0Dark = 1HighContrast = 2
メソッド
static void setTheme(Theme theme)グローバルテーマを更新し、アクティブな FluentElement インスタンスに通知します。
static void setThemeDeferred(Theme theme)現在の操作をブロックせずに、可視要素を優先したバッチ処理でテーマの更新をスケジュールします。
static Theme currentTheme()現在有効なグローバルテーマを返します。
static bool themeUsesDarkAppearance(Theme theme)テーマがダークベースのクロームおよびマテリアルトークンを使用するかどうかを返します。
static void refreshTheme()デザイントークンの変更後に再描画するため、現在のテーマを再ブロードキャストします。
static int themeGeneration()テーマ変更ごとに加算される単調増加カウンターです。鮮度チェックに使用されます。
Theme effectiveTheme() const継承された QWidget の上書きを尊重し、この要素が使用するテーマを解決します。
bool effectiveThemeUsesDarkAppearance() constこの要素の有効なテーマがダークベースのクロームを使用するかどうかを返します。
bool setThemeOverrides(const QJsonObject& overrides)この要素のスパースな色、角丸半径、フォントトークンの上書きを置き換えます。
QJsonObject themeOverrides() constこの要素に設定されたオーバーライドを返します。
void clearThemeOverrides()すべてのトークンフィールドをグローバルテーマの既定値に復元します。
const Colors& themeColorsRef() const描画のホットパス向けにアクティブなカラーセットへ非コピーでアクセスします。
Material::AcrylicToken themeAcrylic() constマテリアル、エレベーション、およびアダプティブレイアウトのトークン。
QColor themeBackdrop(bool active) const指定されたアクティブ状態に対するウィンドウ chrome の背景色。
virtual void onThemeUpdated()グローバルテーマの変更後に呼び出されます。
型とエイリアス
struct Colorsコンポーネントに返されるデザイントークンのスナップショット。
fluent::QMLPlus から継承
メソッド
AnchorLayout::Anchors* anchors()QWidget ホストの変更可能なアンカーを返します。
void setState(const QString& name)登録済みの状態を名前で適用するか、@p name が空の場合はデフォルト状態を復元します。未知の名前は無視され、その状態を離れると既存のバインディングが再開されます。
void addState(const QMLState& state)名前付き状態定義を登録または置換します。アクティブな状態を置換した場合は即座に適用されます。
void evaluateStates()登録順に状態条件を再評価し、最初に一致した状態(一致しない場合はデフォルト状態)をアクティブにします。依存プロパティの変更通知時にも自動実行され、extend を使用する派生状態は、循環や欠損がない限り祖先の変更を継承します。
QMLPlusRuntime* runtime()このホストが所有し、遅延生成される状態オブザーバーを返します。
void setAnchors(const AnchorLayout::Anchors& anchors)すべてのホストアンカーを置き換え、親レイアウトを無効化します。
void resetAnchors()ホストのすべてのアンカーをクリアし、親レイアウトを無効化します。
void bind(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction dir = PropertyBinder::OneWay)PropertyBinder::bind() を介して、@p source の @p sourceProp をこの QWidget ホストの @p targetProp にバインドします。
BindingHandle bindManaged(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction direction = PropertyBinder::OneWay, BindingOptions options = {})この QWidget ホストに管理された直接バインディングを設定します。
BindingHandle bindComputed(const char* targetProp, const QVector<BindingDependency>& dependencies, std::function<QVariant()> evaluate, BindingOptions options = {})この QWidget ホストに明示的依存関係を持つ C++ 式を設定します。
void addTransition(const StateTransition& transition)優先順位順に状態遷移を登録します。
void setBehavior(const char* propertyName, const PropertyAnimation& animation)writeProperty() またはバインディング経由で @p propertyName が書き込まれた際に使用されるデフォルトアニメーションを設定します。明示的な StateTransition ルールが優先され、C++ のセッターを直接呼び出した場合はアニメーションしません。
void clearBehavior(const char* propertyName)今後のマネージド書き込みに使用するデフォルトアニメーションを削除します。
bool writeProperty(const char* propertyName, const QVariant& value)バインディングを削除せずに Behavior 経由でホストプロパティに書き込みます。
Qt 基底クラスドキュメント:QWidget