~rbaker1990/mixxx/sampler

« back to all changes in this revision

Viewing changes to mixxx/src/mixxxview.cpp

  • Committer: System Administrator
  • Date: 2010-06-28 00:58:01 UTC
  • Revision ID: root@macbookpro.local-20100628005801-52dwksuxu3xxzvnv
Sampler window working although it is displayed right over the mixxx gui. I'll fix this soon.

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
    m_pLineEditSearch = 0;
139
139
    m_pTabWidget = 0;
140
140
    m_pTabWidgetLibraryPage = 0;
141
 
    m_pSamplerPage = 0;
142
141
#ifdef __LADSPA__
143
142
    m_pTabWidgetEffectsPage = 0;
144
143
#endif
146
145
    m_pEffectsPageLayout = new QGridLayout();
147
146
    m_pSamplerLayout = new QGridLayout();
148
147
    m_pSplitter = 0;
149
 
    m_pSamplerSplitter = 0;
 
148
    m_pSamplerWindow = 0;
150
149
    m_pLibrarySidebar = 0;
151
150
    m_pLibrarySidebarPage = 0; //The sidebar and search widgets get embedded in this.
152
151
 
530
529
                bg->setPixmap(*background);
531
530
                bg->lower();
532
531
                m_qWidgetList.append(bg);
533
 
                this->setFixedSize(background->width(),background->height()+100);
534
 
                parent->setMinimumSize(background->width(), background->height()+100);
 
532
                this->setFixedSize(background->width(),background->height());
 
533
                parent->setMinimumSize(background->width(), background->height());
535
534
                this->move(0,0);
536
535
                if (!WWidget::selectNode(node, "BgColor").isNull()) {
537
536
                    c.setNamedColor(WWidget::selectNodeQString(node, "BgColor"));
784
783
                    }
785
784
                    m_pOverviewCh2->setup(node);
786
785
                    m_pOverviewCh2->show();
787
 
                } else if (WWidget::selectNodeInt(node, "Channel")==3)
788
 
                {
789
 
                    if (m_pOverviewCh3 == 0) {
790
 
                        m_pOverviewCh3 = new WOverview("[Channel3]", this);
791
 
                        //m_qWidgetList.append(m_pOverviewCh2);
792
 
                    }
793
 
                    m_pOverviewCh3->setup(node);
794
 
                    m_pOverviewCh3->show();
795
786
                }
796
787
            }
797
788
 
934
925
            }
935
926
            else if (node.nodeName()=="SamplerView")
936
927
            {
937
 
                
938
 
                
939
 
                m_pSamplerPage = new QWidget(this);
940
 
                m_pSamplerPage->resize(800,120);
941
 
                m_pSamplerPage->move(0,590);
942
 
                
 
928
                m_pSamplerWindow = new QFrame(this, Qt::Window | Qt::Tool);
 
929
                m_pSamplerWindow->resize(800,100);
 
930
                m_pSamplerWidget = new QWidget(m_pSamplerWindow);
 
931
                m_pSamplerLayout = new QGridLayout(m_pSamplerWidget);
943
932
                m_pSamplerLayout->setContentsMargins(0, 0, 0, 0);
944
 
                m_pSamplerPage->setLayout(m_pSamplerLayout);
945
 
                
946
 
                m_pSamplerSplitter = new QSplitter(m_pSamplerPage);
947
 
                m_pSampler = new WSampler(m_pSamplerSplitter);
948
 
                
949
 
                m_pSamplerSplitter->addWidget(m_pSampler);
950
 
                m_pSamplerLayout->addWidget(m_pSamplerSplitter, 1, 0, 1,3,0);
951
 
                
952
 
                m_pSampler->setup(node);
953
 
                
954
 
                m_pSamplerPage->show();
 
933
                m_pSamplerLayout->setSpacing(2);
 
934
                m_pSamplerWidget->setLayout(m_pSamplerLayout);
 
935
                
 
936
                
 
937
                QDomNode samplerNode = node.firstChild();
 
938
                while (!samplerNode.isNull())
 
939
                {
 
940
                    if (samplerNode.nodeName()=="PushButton")
 
941
                    {
 
942
                        WPushButton * p = new WPushButton(m_pSamplerWidget);
 
943
                        p->setup(samplerNode);
 
944
                        p->installEventFilter(m_pKeyboard);
 
945
                        m_pSamplerLayout->addWidget(p);
 
946
                        m_qWidgetList.append(p);
 
947
                    } else if (samplerNode.nodeName()=="Overview")
 
948
                    {
 
949
                        if (WWidget::selectNodeInt(samplerNode, "Channel")==3)
 
950
                        {
 
951
                            if (m_pOverviewCh3 == 0)
 
952
                                m_pOverviewCh3 = new WOverview("[Channel3]", m_pSamplerWidget);
 
953
                            m_pOverviewCh3->setup(samplerNode);
 
954
                            m_pSamplerLayout->addWidget(m_pOverviewCh3,0,2);
 
955
                                m_pOverviewCh3->show();
 
956
                        }
 
957
                    }
 
958
                    samplerNode = samplerNode.nextSibling();
 
959
                    
 
960
                }
 
961
                m_pSamplerWindow->show();
 
962
                
955
963
            }
956
964
            // set default value (only if it changes from the standard value)
957
965
            if (currentControl) {
996
1004
    if (m_pSliderRateCh2) m_pSliderRateCh2->hide();
997
1005
    if (m_pOverviewCh1) m_pOverviewCh1->hide();
998
1006
    if (m_pOverviewCh2) m_pOverviewCh2->hide();
 
1007
    if (m_pOverviewCh3) m_pOverviewCh3->hide();
999
1008
    if (m_pLineEditSearch) m_pLineEditSearch->hide();
1000
1009
    if (m_pTabWidget) m_pTabWidget->hide();
 
1010
    if (m_pSamplerWindow) m_pSamplerWindow->hide();
1001
1011
 
1002
1012
    //load the skin
1003
1013
    QDomElement docElem = openSkin(qSkinPath);