File indexing completed on 2025-01-19 04:25:16

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "GuiLabel.h"
0020 
0021 using namespace QtBindings::Gui;
0022 
0023 Label::Label(QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f)
0024 {
0025 }
0026 
0027 Label::Label(const Label &other) : QLabel (other.text())
0028 {
0029     *this=other;
0030 }
0031 
0032 Label::Label(const QString &text, QWidget *parent,
0033                               Qt::WindowFlags f) : QLabel(text, parent, f)
0034 {
0035 }
0036 
0037 Label::~Label()
0038 {
0039 }
0040 
0041 Qt::Alignment Label::alignment() const
0042 {
0043     return QLabel::alignment();
0044 }
0045 
0046 QWidget *Label::buddy() const
0047 {
0048     return QLabel::buddy();
0049 }
0050 
0051 void Label::clear()
0052 {
0053     QLabel::clear();
0054 }
0055 
0056 bool Label::hasScaledContents() const
0057 {
0058     return QLabel::hasScaledContents();
0059 }
0060 
0061 bool Label::hasSelectedText() const
0062 {
0063     return QLabel::hasSelectedText();
0064 }
0065 
0066 int Label::indent() const
0067 {
0068     return QLabel::indent();
0069 }
0070 
0071 int Label::margin() const
0072 {
0073     return QLabel::margin();
0074 }
0075 
0076 QMovie *Label::movie() const
0077 {
0078     return QLabel::movie();
0079 }
0080 
0081 bool Label::openExternalLinks() const
0082 {
0083     return QLabel::openExternalLinks();
0084 }
0085 
0086 const QPicture *Label::picture() const
0087 {
0088     return QLabel::picture();
0089 }
0090 
0091 const QPixmap *Label::pixmap() const
0092 {
0093     return QLabel::pixmap();
0094 }
0095 
0096 QString Label::selectedText() const
0097 {
0098     return QLabel::selectedText();
0099 }
0100 
0101 int Label::selectionStart() const
0102 {
0103     return QLabel::selectionStart();
0104 }
0105 
0106 void Label::setAlignment(Qt::Alignment alignment)
0107 {
0108     QLabel::setAlignment(alignment);
0109 }
0110 
0111 void Label::setBuddy(QWidget *buddy)
0112 {
0113     QLabel::setBuddy(buddy);
0114 }
0115 
0116 void Label::setIndent(int indent)
0117 {
0118     QLabel::setIndent(indent);
0119 }
0120 
0121 void Label::setMargin(int margin)
0122 {
0123     QLabel::setMargin(margin);
0124 }
0125 
0126 void Label::setMovie(QMovie *movie)
0127 {
0128     QLabel::setMovie(movie);
0129 }
0130 
0131 void Label::setNum(double num)
0132 {
0133     QLabel::setNum(num);
0134 }
0135 
0136 void Label::setNum(int num)
0137 {
0138     QLabel::setNum(num);
0139 }
0140 
0141 void Label::setOpenExternalLinks(bool open)
0142 {
0143     QLabel::setOpenExternalLinks(open);
0144 }
0145 
0146 void Label::setPicture(const QPicture &picture)
0147 {
0148     QLabel::setPicture(picture);
0149 }
0150 
0151 void Label::setPixmap(const QPixmap &pixMap)
0152 {
0153     QLabel::setPixmap(pixMap);
0154 }
0155 
0156 void Label::setScaledContents(bool y)
0157 {
0158     QLabel::setScaledContents(y);
0159 }
0160 
0161 void Label::setSelection(int start, int length)
0162 {
0163     QLabel::setSelection(start, length);
0164 }
0165 
0166 void Label::setText(const QString &text)
0167 {
0168     QLabel::setText(text);
0169 }
0170 
0171 void Label::setTextFormat(Qt::TextFormat textFormat)
0172 {
0173     QLabel::setTextFormat(textFormat);
0174 }
0175 
0176 void Label::setTextInteractionFlags(Qt::TextInteractionFlags flags)
0177 {
0178     QLabel::setTextInteractionFlags(flags);
0179 }
0180 
0181 void Label::setWordWrap(bool on)
0182 {
0183     QLabel::setWordWrap(on);
0184 }
0185 
0186 QString Label::text() const
0187 {
0188     return QLabel::text();
0189 }
0190 
0191 Qt::TextFormat Label::textFormat() const
0192 {
0193     return QLabel::textFormat();
0194 }
0195 
0196 Qt::TextInteractionFlags Label::textInteractionFlags() const
0197 {
0198     return QLabel::textInteractionFlags();
0199 }
0200 
0201 bool Label::wordWrap() const
0202 {
0203     return QLabel::wordWrap();
0204 }
0205 
0206 bool Label::close()
0207 {
0208     return QWidget::close();
0209 }
0210 
0211 void Label::hide()
0212 {
0213     QWidget::hide();
0214 }
0215 
0216 void Label::lower()
0217 {
0218     QWidget::lower();
0219 }
0220 
0221 void Label::raise()
0222 {
0223     QWidget::raise();
0224 }
0225 
0226 void Label::repaint()
0227 {
0228     QWidget::repaint();
0229 }
0230 
0231 void Label::setDisabled(bool disable)
0232 {
0233     QWidget::setDisabled(disable);
0234 }
0235 
0236 void Label::setEnabled(bool enabled)
0237 {
0238     QWidget::setEnabled(enabled);
0239 }
0240 
0241 void Label::setFocus()
0242 {
0243     QWidget::setFocus();
0244 }
0245 
0246 void Label::setHidden(bool hidden)
0247 {
0248     QWidget::setHidden(hidden);
0249 }
0250 
0251 void Label::setStyleSheet(const QString &styleSheet)
0252 {
0253     QWidget::setStyleSheet(styleSheet);
0254 }
0255 
0256 void Label::setVisible(bool visible)
0257 {
0258     QWidget::setVisible(visible);
0259 }
0260 
0261 void Label::setWindowModified(bool windowModified)
0262 {
0263     QWidget::setWindowModified(windowModified);
0264 }
0265 
0266 void Label::setWindowTitle(const QString &title)
0267 {
0268     QWidget::setWindowTitle(title);
0269 }
0270 
0271 void Label::show()
0272 {
0273     QWidget::show();
0274 }
0275 
0276 void Label::showFullScreen()
0277 {
0278     QWidget::showFullScreen();
0279 }
0280 
0281 void Label::showMaximized()
0282 {
0283     QWidget::showMaximized();
0284 }
0285 
0286 void Label::showMinimized()
0287 {
0288     QWidget::showMinimized();
0289 }
0290 
0291 void Label::showNormal()
0292 {
0293     QWidget::showNormal();
0294 }
0295 
0296 void Label::update()
0297 {
0298     QWidget::update();
0299 }
0300 
0301 Label &Label::operator=(const Label &other)
0302 {
0303     if (this != &other) {
0304         this->setEnabled( other.isEnabled() ) ;
0305         this->setBuddy( other.buddy() );
0306         this->setIndent( other.indent() );
0307         this->setMargin( other.margin() );
0308         this->setMovie( other.movie() );
0309         this->setOpenExternalLinks( other.openExternalLinks() );
0310         this->setPicture( *other.picture() ) ;
0311         this->setPixmap( *other.pixmap() );
0312         this->setScaledContents( other.hasScaledContents() );
0313         this->setSelection( other.selectionStart(), other.selectedText().length() );
0314         this->setText( other.text() );
0315         this->setTextFormat( other.textFormat() );
0316         this->setTextInteractionFlags( other.textInteractionFlags() );
0317         this->setWordWrap( other.wordWrap() );
0318     }
0319     return *this;
0320 }
0321