|
69 | 69 | }, |
70 | 70 | { |
71 | 71 | "cell_type": "code", |
72 | | - "execution_count": 6, |
| 72 | + "execution_count": 10, |
73 | 73 | "metadata": { |
74 | 74 | "collapsed": false |
75 | 75 | }, |
|
79 | 79 | "output_type": "stream", |
80 | 80 | "text": [ |
81 | 81 | "0\n", |
82 | | - "Explore Individual Cell Lines\n" |
| 82 | + "Explore Individual Cell Lines\n", |
| 83 | + "1\n", |
| 84 | + "Cell Line Correlation\n" |
83 | 85 | ] |
84 | 86 | } |
85 | 87 | ], |
|
124 | 126 | " #use button groups\n", |
125 | 127 | " # http://stackoverflow.com/questions/17402452/how-to-get-the-checked-radiobutton-from-a-groupbox-in-pyqt\n", |
126 | 128 | " \n", |
127 | | - " self.button_group.addButton(self.explore_button, 0) # add button at index zero\n", |
| 129 | + " self.button_group.addButton(self.explore_button, 0) # add button at index 0 \n", |
128 | 130 | " self.button_group.addButton(self.correlation_button, 1)\n", |
129 | 131 | " \n", |
130 | 132 | " # Connect each radio button to a method to run when it's clicked\n", |
131 | 133 | " self.connect(self.explore_button, SIGNAL(\"clicked()\"), self.radio_button_clicked)\n", |
132 | 134 | " self.connect(self.correlation_button, SIGNAL(\"clicked()\"), self.radio_button_clicked)\n", |
133 | 135 | " \n", |
134 | 136 | " # Set layout of first tab\n", |
| 137 | + " # button group above is just a way to check if either button is pressed\n", |
135 | 138 | " self.grid.addWidget(self.explore_button, 1,0)\n", |
136 | 139 | " self.grid.addWidget(self.correlation_button, 1,1)\n", |
137 | 140 | " tab1.setGeometry(1000,1000, 1000, 1000)\n", |
|
146 | 149 | " \n", |
147 | 150 | " # self.explore_button is index 0\n", |
148 | 151 | " if self.button_group.checkedId() == 0: \n", |
149 | | - " self.explore_button\n", |
150 | 152 | " self.dropdown1 = QtGui.QComboBox(self)\n", |
151 | 153 | " self.parameters = ['x', 'y', 'z']\n", |
152 | 154 | " self.dropdown1.addItems(self.parameters)\n", |
153 | 155 | " self.grid.addWidget(self.dropdown1, 2,0)\n", |
| 156 | + " elif self.button_group.checkedId() == 1: \n", |
| 157 | + " self.dropdown2 = QtGui.QComboBox(self)\n", |
| 158 | + " self.parameters2 = ['CPQ #', 'CCLE #']\n", |
| 159 | + " self.dropdown2.addItems(self.parameters2)\n", |
| 160 | + " self.grid.addWidget(self.dropdown2, 2,1)\n", |
| 161 | + " \n", |
154 | 162 | " \n", |
155 | 163 | " #self.grid.addWidget(self.explore_button, 1,0)\n", |
156 | 164 | " print(self.button_group.checkedButton().text())\n", |
|
0 commit comments