Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/doc/src/snippets/code/doc_src_layout.qdoc

    r2 r561  
     1
     2
     3
     4
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
    142//! [0]
    243#ifndef CARD_H
    344#define CARD_H
    445
    5 #include <QLayout>
     46#include <Q>
    647#include <QList>
    748
     
    950{
    1051public:
    11     CardLayout(QWidget *parent, int dist)
    12         : QLayout(parent, 0, dist) {}
    13     CardLayout(QLayout *parent, int dist)
    14         : QLayout(parent, dist) {}
    15     CardLayout(int dist)
    16         : QLayout(dist) {}
     52    CardLayout(QWidget *parent, int dist): QLayout(parent, 0, dist) {}
     53    CardLayout(QLayout *parent, int dist): QLayout(parent, dist) {}
     54    CardLayout(int dist): QLayout(dist) {}
    1755    ~CardLayout();
    1856
     
    2058    QSize sizeHint() const;
    2159    QSize minimumSize() const;
     60
    2261    QLayoutItem *itemAt(int) const;
    2362    QLayoutItem *takeAt(int);
     
    3271
    3372//! [1]
    34 #include "card.h"
     73#include "card.h"
    3574//! [1]
    3675
     76
     77
     78
     79
     80
     81
     82
    3783
    38 //! [2]
     84//! []
    3985QLayoutItem *CardLayout::itemAt(int idx) const
    4086{
     
    4995    return idx >= 0 && idx < list.size() ? list.takeAt(idx) : 0;
    5096}
    51 //! [2]
    52 
    53 
    54 //! [3]
    55 void CardLayout::addItem(QLayoutItem *item)
    56 {
    57     list.append(item);
    58 }
    5997//! [3]
    6098
    6199
    62100//! [4]
    63 CardLayout::~CardLayout()
     101)
    64102{
    65     deleteAllItems();
     103    );
    66104}
    67105//! [4]
     
    69107
    70108//! [5]
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
    71119void CardLayout::setGeometry(const QRect &r)
    72120{
     
    86134    }
    87135}
    88 //! [5]
     136//! []
    89137
    90138
    91 //! [6]
     139//! []
    92140QSize CardLayout::sizeHint() const
    93141{
     
    117165    return s + n*QSize(spacing(), spacing());
    118166}
    119 //! [6]
     167//! []
Note: See TracChangeset for help on using the changeset viewer.