summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 4ee252f..3efbb53 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -556,275 +556,282 @@ void PMainWindow::setupActions()
556 m_gListViewMode = new QActionGroup(this,"Select listmode",true); 556 m_gListViewMode = new QActionGroup(this,"Select listmode",true);
557 connect(m_gListViewMode,SIGNAL(selected(QAction*)),this,SLOT(listviewselected(QAction*))); 557 connect(m_gListViewMode,SIGNAL(selected(QAction*)),this,SLOT(listviewselected(QAction*)));
558 558
559 m_aDirLong = new QAction( tr( "Thumbnail and Imageinfo" ),Resource::loadIconSet("opie-eye/opie-eye-thumb"), 0, 0, this, 0, true ); 559 m_aDirLong = new QAction( tr( "Thumbnail and Imageinfo" ),Resource::loadIconSet("opie-eye/opie-eye-thumb"), 0, 0, this, 0, true );
560 m_aDirLong->setToggleAction(true); 560 m_aDirLong->setToggleAction(true);
561 m_aDirShort = new QAction( tr( "Thumbnail and name" ),Resource::loadIconSet("opie-eye/opie-eye-thumbonly"), 0, 0, this, 0, true ); 561 m_aDirShort = new QAction( tr( "Thumbnail and name" ),Resource::loadIconSet("opie-eye/opie-eye-thumbonly"), 0, 0, this, 0, true );
562 m_aDirShort->setToggleAction(true); 562 m_aDirShort->setToggleAction(true);
563 m_aDirName = new QAction( tr( "Name only" ), Resource::loadIconSet("opie-eye/opie-eye-textview"),0, 0, this, 0, true ); 563 m_aDirName = new QAction( tr( "Name only" ), Resource::loadIconSet("opie-eye/opie-eye-textview"),0, 0, this, 0, true );
564 m_aDirName->setToggleAction(true); 564 m_aDirName->setToggleAction(true);
565 int mode = m_cfg->readNumEntry("ListViewMode", 1); 565 int mode = m_cfg->readNumEntry("ListViewMode", 1);
566 if (mode < 1 || mode>3) mode = 1; 566 if (mode < 1 || mode>3) mode = 1;
567 switch (mode) { 567 switch (mode) {
568 case 3: 568 case 3:
569 m_aDirName->setOn(true); 569 m_aDirName->setOn(true);
570 break; 570 break;
571 case 2: 571 case 2:
572 m_aDirShort->setOn(true); 572 m_aDirShort->setOn(true);
573 break; 573 break;
574 case 1: 574 case 1:
575 default: 575 default:
576 m_aDirLong->setOn(true); 576 m_aDirLong->setOn(true);
577 } 577 }
578 m_gListViewMode->insert(m_aDirLong); 578 m_gListViewMode->insert(m_aDirLong);
579 m_gListViewMode->insert(m_aDirShort); 579 m_gListViewMode->insert(m_aDirShort);
580 m_gListViewMode->insert(m_aDirName); 580 m_gListViewMode->insert(m_aDirName);
581 581
582 m_gPrevNext = new QActionGroup(this,"imageprevnext",false); 582 m_gPrevNext = new QActionGroup(this,"imageprevnext",false);
583 m_aNext = new QAction( tr( "Next image" ), Resource::loadIconSet("forward"), 0, 0, this, 0, true ); 583 m_aNext = new QAction( tr( "Next image" ), Resource::loadIconSet("forward"), 0, 0, this, 0, true );
584 m_aNext->setToggleAction(false); 584 m_aNext->setToggleAction(false);
585 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext())); 585 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext()));
586 m_aPrevious = new QAction( tr( "Previous image" ), Resource::loadIconSet("back"), 0, 0, this, 0, true ); 586 m_aPrevious = new QAction( tr( "Previous image" ), Resource::loadIconSet("back"), 0, 0, this, 0, true );
587 m_aPrevious->setToggleAction(false); 587 m_aPrevious->setToggleAction(false);
588 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev())); 588 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev()));
589 m_gPrevNext->insert(m_aPrevious); 589 m_gPrevNext->insert(m_aPrevious);
590 m_gPrevNext->insert(m_aNext); 590 m_gPrevNext->insert(m_aNext);
591 591
592 m_aFullScreen = new QAction( tr( "Show images fullscreen" ), 592 m_aFullScreen = new QAction( tr( "Show images fullscreen" ),
593 Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true ); 593 Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true );
594 m_aFullScreen->setToggleAction(true); 594 m_aFullScreen->setToggleAction(true);
595 if (autoSave) { 595 if (autoSave) {
596 m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false)); 596 m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false));
597 } else { 597 } else {
598 m_aFullScreen->setOn(false); 598 m_aFullScreen->setOn(false);
599 } 599 }
600 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); 600 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool)));
601 601
602 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false); 602 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false);
603 m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true ); 603 m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true );
604 m_aAutoRotate->setToggleAction(true); 604 m_aAutoRotate->setToggleAction(true);
605 605
606 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 606 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
607 m_aAutoRotate->setOn(true); 607 m_aAutoRotate->setOn(true);
608 } else { 608 } else {
609 m_aAutoRotate->setOn(false); 609 m_aAutoRotate->setOn(false);
610 } 610 }
611 if (autoSave) { 611 if (autoSave) {
612 m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn())); 612 m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn()));
613 } 613 }
614 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); 614 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
615 615
616 m_aUnscaled = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); 616 m_aUnscaled = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true );
617 m_aUnscaled->setToggleAction(true); 617 m_aUnscaled->setToggleAction(true);
618 connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); 618 connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool)));
619 if (autoSave) { 619 if (autoSave) {
620 m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false)); 620 m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false));
621 } else { 621 } else {
622 m_aUnscaled->setOn(false); 622 m_aUnscaled->setOn(false);
623 } 623 }
624 624
625 m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ), Resource::loadIconSet( "mag" ), 0, 0, this, 0, true ); 625 m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ), Resource::loadIconSet( "mag" ), 0, 0, this, 0, true );
626 m_aZoomer->setToggleAction(true); 626 m_aZoomer->setToggleAction(true);
627 if (autoSave) { 627 if (autoSave) {
628 m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true)); 628 m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true));
629 } else { 629 } else {
630 m_aZoomer->setOn (true); 630 m_aZoomer->setOn (true);
631 } 631 }
632 connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); 632 connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool)));
633 m_gDisplayType->insert(m_aAutoRotate); 633 m_gDisplayType->insert(m_aAutoRotate);
634 m_gDisplayType->insert(m_aUnscaled); 634 m_gDisplayType->insert(m_aUnscaled);
635 m_gDisplayType->insert(m_aZoomer); 635 m_gDisplayType->insert(m_aZoomer);
636 636
637 m_hGroup = new QActionGroup(this,"actioncollection",false); 637 m_hGroup = new QActionGroup(this,"actioncollection",false);
638 m_hGroup->insert(m_aFullScreen); 638 m_hGroup->insert(m_aFullScreen);
639 639
640 if (!m_SmallWindow) { 640 if (!m_SmallWindow) {
641 m_aForceSmall = new QAction(tr("Dont show seperate windows"),Resource::loadIconSet( "AppsIcon" ), 0, 0, this, 0, true); 641 m_aForceSmall = new QAction(tr("Dont show seperate windows"),Resource::loadIconSet( "AppsIcon" ), 0, 0, this, 0, true);
642 m_aForceSmall->setToggleAction(true); 642 m_aForceSmall->setToggleAction(true);
643 connect(m_aForceSmall,SIGNAL(toggled(bool)),this,SLOT(slotForceSmall(bool))); 643 connect(m_aForceSmall,SIGNAL(toggled(bool)),this,SLOT(slotForceSmall(bool)));
644 } else { 644 } else {
645 m_aForceSmall = 0; 645 m_aForceSmall = 0;
646 } 646 }
647 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false); 647 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false);
648 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness())); 648 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness()));
649 m_IncBrightness = new QAction(tr("Increase brightness by 5"),Resource::loadIconSet( "up" ),0, 0, this, 0, false); 649 m_IncBrightness = new QAction(tr("Increase brightness by 5"),Resource::loadIconSet( "up" ),0, 0, this, 0, false);
650 m_DecBrightness = new QAction(tr("Decrease brightness by 5"),Resource::loadIconSet( "down" ),0, 0, this, 0, false); 650 m_DecBrightness = new QAction(tr("Decrease brightness by 5"),Resource::loadIconSet( "down" ),0, 0, this, 0, false);
651 m_hBright = new QActionGroup(this,"actioncollection",false), 651 m_hBright = new QActionGroup(this,"actioncollection",false),
652 m_hBright->insert(m_setCurrentBrightness);
652 m_hBright->insert(m_IncBrightness); 653 m_hBright->insert(m_IncBrightness);
653 m_hBright->insert(m_DecBrightness); 654 m_hBright->insert(m_DecBrightness);
654} 655}
655 656
656void PMainWindow::setupBrightness() 657void PMainWindow::setupBrightness()
657{ 658{
658 if (!m_disp) { 659 if (!m_disp) {
659 return; 660 return;
660 } 661 }
662 bool reshow=false;
663 if (m_disp->isVisible()&&m_disp->fullScreen()) {
664 m_disp->hide();
665 reshow = true;
666 }
661 int lb = m_disp->Intensity(); 667 int lb = m_disp->Intensity();
662 if (Valuebox(0,-100,100,lb,lb)) { 668 if (Valuebox(0,-100,100,lb,lb)) {
663 m_disp->setIntensity(lb,true); 669 m_disp->setIntensity(lb,true);
664 } 670 }
671 if (reshow) {
672 m_disp->showFullScreen();
673 qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
674 }
665} 675}
666 676
667void PMainWindow::setupToolbar() 677void PMainWindow::setupToolbar()
668{ 678{
669 toolBar = new QToolBar( this ); 679 toolBar = new QToolBar( this );
670 addToolBar(toolBar); 680 addToolBar(toolBar);
671 toolBar->setHorizontalStretchable( true ); 681 toolBar->setHorizontalStretchable( true );
672 setToolBarsMovable( false ); 682 setToolBarsMovable( false );
673 m_aDirUp->addTo( toolBar ); 683 m_aDirUp->addTo( toolBar );
674 684
675 fsButton = new PFileSystem( toolBar ); 685 fsButton = new PFileSystem( toolBar );
676 connect( fsButton, SIGNAL( changeDir( const QString& ) ), 686 connect( fsButton, SIGNAL( changeDir( const QString& ) ),
677 m_view, SLOT(slotChangeDir( const QString& ) ) ); 687 m_view, SLOT(slotChangeDir( const QString& ) ) );
678 connect( this, SIGNAL( changeDir( const QString& ) ), 688 connect( this, SIGNAL( changeDir( const QString& ) ),
679 m_view, SLOT(slotChangeDir( const QString& ) ) ); 689 m_view, SLOT(slotChangeDir( const QString& ) ) );
680 690
681 if (m_aBeam) { 691 if (m_aBeam) {
682 m_aBeam->addTo( toolBar ); 692 m_aBeam->addTo( toolBar );
683 } 693 }
684 m_aShowInfo->addTo(toolBar); 694 m_aShowInfo->addTo(toolBar);
685 m_aTrash->addTo(toolBar); 695 m_aTrash->addTo(toolBar);
686// m_aSetup->addTo(toolBar);
687 696
688 m_gDisplayType->addTo(toolBar); 697 m_gDisplayType->addTo(toolBar);
689 698
690 if (!m_SmallWindow) { 699 if (!m_SmallWindow) {
691 m_gPrevNext->addTo(toolBar); 700 m_gPrevNext->addTo(toolBar);
692 } else { 701 } else {
693 m_gPrevNext->setEnabled(false); 702 m_gPrevNext->setEnabled(false);
694 } 703 }
695} 704}
696 705
697void PMainWindow::setupMenu() 706void PMainWindow::setupMenu()
698{ 707{
699 fileMenu = new QPopupMenu( menuBar() ); 708 fileMenu = new QPopupMenu( menuBar() );
700 menuBar()->insertItem( tr( "File" ), fileMenu ); 709 menuBar()->insertItem( tr( "File" ), fileMenu );
701 dispMenu = new QPopupMenu( menuBar() ); 710 dispMenu = new QPopupMenu( menuBar() );
702 menuBar()->insertItem( tr( "Show" ), dispMenu ); 711 menuBar()->insertItem( tr( "Show" ), dispMenu );
703 settingsMenu = new QPopupMenu( menuBar() ); 712 settingsMenu = new QPopupMenu( menuBar() );
704 menuBar()->insertItem( tr( "Settings" ), settingsMenu ); 713 menuBar()->insertItem( tr( "Settings" ), settingsMenu );
705 714
706 m_aViewfile->addTo(fileMenu); 715 m_aViewfile->addTo(fileMenu);
707 m_aShowInfo->addTo(fileMenu); 716 m_aShowInfo->addTo(fileMenu);
708 m_aStartSlide->addTo(fileMenu); 717 m_aStartSlide->addTo(fileMenu);
709 718
710 fileMenu->insertSeparator(); 719 fileMenu->insertSeparator();
711 m_aDirUp->addTo( fileMenu ); 720 m_aDirUp->addTo( fileMenu );
712 721
713 fsMenu = new QPopupMenu(fileMenu); 722 fsMenu = new QPopupMenu(fileMenu);
714 fileMenu->insertItem(Resource::loadIconSet( "cardmon/pcmcia" ),tr("Select filesystem"),fsMenu); 723 fileMenu->insertItem(Resource::loadIconSet( "cardmon/pcmcia" ),tr("Select filesystem"),fsMenu);
715 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) ); 724 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) );
716 dirChanged(); 725 dirChanged();
717 726
718 if ( m_aBeam ) { 727 if ( m_aBeam ) {
719 fileMenu->insertSeparator(); 728 fileMenu->insertSeparator();
720 m_aBeam->addTo( fileMenu ); 729 m_aBeam->addTo( fileMenu );
721 } 730 }
722 fileMenu->insertSeparator(); 731 fileMenu->insertSeparator();
723 m_aTrash->addTo(fileMenu); 732 m_aTrash->addTo(fileMenu);
724 733
725 listviewMenu = new QPopupMenu(dispMenu); 734 listviewMenu = new QPopupMenu(dispMenu);
726 dispMenu->insertItem(Resource::loadIconSet("opie-eye/opie-eye-thumb"),tr("Listview mode"),listviewMenu); 735 dispMenu->insertItem(Resource::loadIconSet("opie-eye/opie-eye-thumb"),tr("Listview mode"),listviewMenu);
727 m_gListViewMode->addTo(listviewMenu); 736 m_gListViewMode->addTo(listviewMenu);
728 dispMenu->insertSeparator(); 737 dispMenu->insertSeparator();
729 m_aFullScreen->addTo(dispMenu); 738 m_aFullScreen->addTo(dispMenu);
730 m_gDisplayType->addTo(dispMenu); 739 m_gDisplayType->addTo(dispMenu);
731 dispMenu->insertSeparator(); 740 dispMenu->insertSeparator();
732 m_gPrevNext->addTo(dispMenu); 741 m_gPrevNext->addTo(dispMenu);
733 m_setCurrentBrightness->addTo(dispMenu);
734 m_setCurrentBrightness->setEnabled(false);
735 dispMenu->insertSeparator(); 742 dispMenu->insertSeparator();
736 m_hBright->addTo(dispMenu); 743 m_hBright->addTo(dispMenu);
737 m_hBright->setEnabled(false); 744 m_hBright->setEnabled(false);
738 745
739 if (m_aForceSmall) { 746 if (m_aForceSmall) {
740 dispMenu->insertSeparator(); 747 dispMenu->insertSeparator();
741 m_aForceSmall->addTo(dispMenu); 748 m_aForceSmall->addTo(dispMenu);
742 } 749 }
743 750
744 m_aSetup->addTo(settingsMenu); 751 m_aSetup->addTo(settingsMenu);
745 m_aHideToolbar->addTo(settingsMenu); 752 m_aHideToolbar->addTo(settingsMenu);
746} 753}
747 754
748void PMainWindow::listviewselected(QAction*which) 755void PMainWindow::listviewselected(QAction*which)
749{ 756{
750 if (!which || which->isOn()==false) return; 757 if (!which || which->isOn()==false) return;
751 int val = 1; 758 int val = 1;
752 759
753 if (which==m_aDirName) { 760 if (which==m_aDirName) {
754 val = 3; 761 val = 3;
755 } else if (which==m_aDirShort) { 762 } else if (which==m_aDirShort) {
756 val = 2; 763 val = 2;
757 } else if (which==m_aDirLong) { 764 } else if (which==m_aDirLong) {
758 val = 1; 765 val = 1;
759 } 766 }
760 emit changeListMode(val); 767 emit changeListMode(val);
761} 768}
762 769
763void PMainWindow::readConfig() 770void PMainWindow::readConfig()
764{ 771{
765 autoSave =m_cfg->readBoolEntry("savestatus",true); 772 autoSave =m_cfg->readBoolEntry("savestatus",true);
766 m_Intensity = m_cfg->readNumEntry("intensity",0); 773 m_Intensity = m_cfg->readNumEntry("intensity",0);
767} 774}
768 775
769void PMainWindow::polish() 776void PMainWindow::polish()
770{ 777{
771 if (m_disp) { 778 if (m_disp) {
772 odebug << "======================\n" 779 odebug << "======================\n"
773 << "Called via setdocument\n" 780 << "Called via setdocument\n"
774 << "======================" << oendl; 781 << "======================" << oendl;
775 m_setDocCalled = true; 782 m_setDocCalled = true;
776 m_view->setDoccalled(true); 783 m_view->setDoccalled(true);
777 m_disp->setCloseIfHide(true); 784 m_disp->setCloseIfHide(true);
778 } else { 785 } else {
779 m_setDocCalled = false; 786 m_setDocCalled = false;
780 m_view->setDoccalled(false); 787 m_view->setDoccalled(false);
781 } 788 }
782 m_polishDone = true; 789 m_polishDone = true;
783 QMainWindow::polish(); 790 QMainWindow::polish();
784 if (m_setDocCalled) { 791 if (m_setDocCalled) {
785 if (m_aFullScreen->isOn()) { 792 if (m_aFullScreen->isOn()) {
786 QTimer::singleShot(0,this,SLOT(check_view_fullscreen())); 793 QTimer::singleShot(0,this,SLOT(check_view_fullscreen()));
787 } else if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 794 } else if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
788 } 795 }
789 } 796 }
790} 797}
791 798
792void PMainWindow::slotForceSmall(bool how) 799void PMainWindow::slotForceSmall(bool how)
793{ 800{
794 odebug << "Disable separate windows: " << how << oendl; 801 odebug << "Disable separate windows: " << how << oendl;
795 if (m_stack) { 802 if (m_stack) {
796 if (how) { 803 if (how) {
797 m_stack->forceMode(Opie::Ui::OWidgetStack::SmallScreen); 804 m_stack->forceMode(Opie::Ui::OWidgetStack::SmallScreen);
798 } else { 805 } else {
799 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); 806 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
800 } 807 }
801 } 808 }
802 if (autoSave) { 809 if (autoSave) {
803 m_cfg->writeEntry("dontshowseperate",how); 810 m_cfg->writeEntry("dontshowseperate",how);
804 } 811 }
805} 812}
806 813
807bool PMainWindow::Valuebox(QWidget*parent,int min, int max, int current,int&store) 814bool PMainWindow::Valuebox(QWidget*parent,int min, int max, int current,int&store)
808{ 815{
809 QDialog dlg(parent,"brightnessbox",true); 816 QDialog dlg(parent,"brightnessbox",true);
810 QVBoxLayout * m_MainLayout; 817 QVBoxLayout * m_MainLayout;
811 QGridLayout * m_IntensityLayout; 818 QGridLayout * m_IntensityLayout;
812 QSpinBox * m_Intensity; 819 QSpinBox * m_Intensity;
813 QLabel * m_IntensityLabel; 820 QLabel * m_IntensityLabel;
814 821
815 m_MainLayout = new QVBoxLayout( &dlg, 11, 6, "m_MainLayout"); 822 m_MainLayout = new QVBoxLayout( &dlg, 11, 6, "m_MainLayout");
816 m_IntensityLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IntensityLayout"); 823 m_IntensityLayout = new QGridLayout( 0, 1, 1, 0, 6, "m_IntensityLayout");
817 m_Intensity = new QSpinBox( &dlg, "m_Intensity" ); 824 m_Intensity = new QSpinBox( &dlg, "m_Intensity" );
818 m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed)); 825 m_Intensity->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
819 m_Intensity->setButtonSymbols( QSpinBox::PlusMinus ); 826 m_Intensity->setButtonSymbols( QSpinBox::PlusMinus );
820 m_Intensity->setMaxValue( max ); 827 m_Intensity->setMaxValue( max );
821 m_Intensity->setMinValue(min); 828 m_Intensity->setMinValue(min);
822 m_Intensity->setValue( current ); 829 m_Intensity->setValue( current );
823 m_IntensityLayout->addWidget( m_Intensity, 0, 1 ); 830 m_IntensityLayout->addWidget( m_Intensity, 0, 1 );
824 m_IntensityLabel = new QLabel( &dlg, "m_IntensityLabel" ); 831 m_IntensityLabel = new QLabel( &dlg, "m_IntensityLabel" );
825 m_IntensityLabel->setText(QObject::tr("Display brightness:")); 832 m_IntensityLabel->setText(QObject::tr("Display brightness:"));
826 m_IntensityLayout->addWidget(m_IntensityLabel, 0, 0 ); 833 m_IntensityLayout->addWidget(m_IntensityLabel, 0, 0 );
827 m_MainLayout->addLayout(m_IntensityLayout); 834 m_MainLayout->addLayout(m_IntensityLayout);
828 if (dlg.exec()) { 835 if (dlg.exec()) {
829 store = m_Intensity->value(); 836 store = m_Intensity->value();
830 return true; 837 return true;