Link Label

Qt Components

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 58.0%
Description:

Class is a thin wraper above QLabel
Class can be used in mail clients, in QStakedWidget where many pages or content can take place.
Class has one interfase - ISetMaxLinkNumber(int) where you can define maximal number of pages in your link list.
And class emits signal linkPressed(int) with numerical page number.
Last changelog:

8 years ago

1. Interface become changed: ISetMaxLinkDiapazon(int min, int max) now you must set minimimum number and maximum number for link range
2. You can specify negative range of link label, for example:
linkLabel->ISetMaxLinkDiapazon(-100, 101);
Range will be from -100 to 101

daimonKor

8 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

C

bloodshadow

8 years ago

Thank you, fixed
range can be negative now

Report

daimonKor

8 years ago

maybe there are negative number pages))))

Report

daimonKor

8 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

daimonKor

8 years ago

QVBoxLayout *mainLayout = new QVBoxLayout;


QStackedWidget * stack = new QStackedWidget(&widget);

stack->addWidget(new QLabel("0"));
stack->addWidget(new QLabel("1"));
stack->addWidget(new QLabel("2"));
stack->addWidget(new QLabel("3"));

mainLayout->addWidget(stack);
mainLayout->addWidget(linkLabel);

QObject::connect(linkLabel,SIGNAL(linkPressed(int)),stack,SLOT(setCurrentIndex ( int )));

widget.setLayout(mainLayout);

i can not open a stackWidget index 0

Report

daimonKor

8 years ago

add emit signal, when the page is clicked

Report

daimonKor

8 years ago

sorry - found

Report

8 years ago

1. Interface become changed: ISetMaxLinkDiapazon(int min, int max) now you must set minimimum number and maximum number for link range
2. You can specify negative range of link label, for example:
linkLabel->ISetMaxLinkDiapazon(-100, 101);
Range will be from -100 to 101

12345678910
1
product-maker daimonKor Jun 11 2011 9 excellent
product-maker Count: 4 Rating: 5.0
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
1.0
updated Jun 12 2011
added Jun 06 2011
downloads today
0
page views today 1
System Tags