[Qt-interest] how to stop slideshow.
Avishek_Sharma
Avishek_Sharma at satyam.com
Fri Feb 13 10:36:52 CET 2009
Hi again,
attaching the code for the 'next_pic()' slot in case it helps in some way
********************************************
pic_dis::next_pic()
{
int res;
pic_display->setPixmap(QPixmap("/root/Desktop/new1/buttons/black_button.png")); //pic_display is the Label on which i am
//displaying the pic.
QStringList::Iterator it1 = name_of_files.begin();
while( it1 != name_of_files.end())
{
res= QString::compare(QString(*it1),file); //'file'is the name of the pic which you have currently
//selected for display.Checking if the file pointed to by it1 is
// the same as the file I am currently displaying
if(res!=0) //if not the selected file
{
++it1;
}
if(res==0) //if displayed file is pointed to by it1.
{
it1++;
if(it1 == name_of_files.end()) //if it1 points to the last picture file in the gallery
{
it1=name_of_files.begin();
}
QPixmap pm;
pm=picture_resize(pic_path_temp+"/"+QString(*it1),750,510); //picture_resize is a function for chanign picture size
pic_display->setPaletteBackgroundPixmap(pm);
file=QString(*it1);
break;
}
}
}
Thanks in advance.
Avi
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
More information about the Qt-interest-old
mailing list